Should the SSL terminate at the Nginx proxy buffer or at the Amazon Elastic Load Balancer?

Question!

I have two ubuntu machines running django with gunicorn as my Python HTTP WSGI server. I currently have a ELB sitting in front of these two machines.

Many sources claim I should add NGINX to my stack for proxy buffering. However I don't know where Nginx should be placed and how it can be configured to point to the ELB which in turns points to the app servers.

               NGINX                                                ELB                        2 Django/Gunicorn Servers
(proxy buffering, prevents DDOS attacks) -------> (Load balances between two app servers) ------> (My two app servers)

Is this setup appropriate? If so how can I configure it?



Answers

NGINX sort of becomes a single point of failure. Unless there is a reason to do so otherwise, I would likely put the ELB in front of nginx and run nginx on both app servers (could run on separate servers if needed).

The web server can also take care of static requests, which would probably be handled more efficiently than your app stack.

By : datasage


Since ELB is inherently scalable and fault tolerant, it is general practice to have them at front. You can attach your Web servers to ELB . By adding Nginx on the top you will be bringing Single point of failure.



This video can help you solving your question :)
By: admin