Running nginx infront of a unicorn or shooting from under elastic load balancing

I have a very simple question. Nginx does reverse proxy buffering for HTTP servers such as Gunicorn and Unicorn. However, if I have an elastic load balancer (offered by Amazon Web Services, also known as ELB), does it make sense to run nginx in front of my application server?

Request----> ELB -------> NGINX-------> UNICORN/GUNICORN HTTP SERVER 
+6
source share
1 answer

In a word: yes. Amazon ELB service is great, but it's only load balancing. Running nginx on your own server gives you a locus of control and a place to overwrite, redirect, compress, intercept headers, cache, etc. In addition, it allows you to use static files as quickly as possible, rather than using a slot on your heavier application server.

+6
source

Source: https://habr.com/ru/post/947127/


All Articles