I've a setup with :
- Jelastic (PaaS) with Auto-Vertical Scaling
- Nginx as SSL/TLS end-Point + Reverse Proxy (inside docker)
- Gunicorn serving a Django application (inside docker)
- Postgres (inside docker)
When the traffic is "heavy" (100 r/s), the page is very slow to be delivered, even if all containers are not very used (cpu 40% in Idle on application container, only use 2gb of 8 RAM used - other container more or less 0 % of CPU usage).
I've already set Gunicorn worker to 16, I've check linux limit (fd, socket) and everything seems OK, so why it doesn't scale up ?
nginx.conf (key value)
worker_processes auto;
events {
use epoll;
worker_connections 4096;
}
http {
sendfile on;
keepalive_timeout 10;
}
Gunicorn start :
gunicorn --bind 0.0.0.0:80 --workers 16 --max-requests 1000 ****.wsgi:application