Comments (5)
Not really a issue - but to answer your question, gunicorn will balance incoming requests for you. Gunicorn is similar to Unicorn (unicorn.bogomips.org) in this regard - so feel free to read there for more info. Perhaps some architecture notes should be added to docs?
from gunicorn.
Load balancing is done by the OS. You can still use NGINX to load balance between different machine. Or even if you need by launching 2 in instances of gunicorn on same app.
from gunicorn.
There's no difference between Unix and TCP sockets here. Each listen() socket gets a connection queue, and accept() just pops a connection from that queue. In gunicorn each worker just pops a new connection from that queue as its able. Its similar to the classic producer/consumer model in that the producer just happens to be managed by the kernel.
The load balancing in nginx is orthogonal to a certain degree. If you're used to doing something like using nginx to proxy to 4-12 mongrels on the same machine, you probably just need nginx to proxy to a single gunicorn instance with 4-12 workers.
from gunicorn.
think answer have been done, feel free to reopen it if needed.
from gunicorn.
The only difference I can note between the two is the overhead created by TCP/IP when using ip:port. Ip:port is a bit more flexible as it works on any OS. Unix sockets less portable but faster, everything else is the same. Maybe something can be added to the docs to note the differences.
from gunicorn.
Related Issues (20)
- Can someone help me with this error below HOT 2
- Add a minimun time before restart when `max_requests` is defined HOT 4
- the worker was restart during the woker is running HOT 2
- Unable to report vulnerability HOT 2
- fix header value to be compliant with new RFC 9110 HOT 6
- Boto3 can not upload a file to AWS S3 [CRITICAL] WORKER TIMEOUT HOT 1
- Gunicorn gthread deadlock HOT 3
- Unable to launch gunicorn + gevent: `OSError: [Errno 92] Protocol not available`
- Why can a single worker process use multiple cores in a k8s environment? HOT 2
- How to programmatically get the number of current worker connections? HOT 2
- Gunicorn server startup failure messes up signal handling and affects further calls to `subprocess.run` HOT 1
- Rare bug - gunicorn worker stuck during TCP socket sendall HOT 2
- Getting 404 while using Gunicorn with NginX in Django deployment HOT 5
- Choosing a number of workers in a distributed system scenario HOT 1
- Security mailbox seems broken
- Does gunicorn want to support WSGI+ ?
- Is gunicorn project still alive? HOT 4
- The redundancy of argument parser (possibly its removal) in the class gunicorn.app.wsgiapp.WSGIApplication from file wsgiapp.py HOT 1
- Clarification sought on some aspects of the source code HOT 4
- proc_name not being assigned (Linux) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gunicorn.