0

We are planning to put an nginx reverse proxy in front of a static site and expect a traffic of about 120k http requests per minute on that.

Mostly doing proxy_pass with some address concatenation op on the incoming request...

We wanted to know from nginx experts here if nginx needs more of a cpu intensive server hardware or memory intensive or both? What cpu and memory do you think will be optimal for this application?

Thanks in advance for the expert help...

The suggested links (capacity planning) and (load testing) to other questions are totally different from what we are looking for. We are specifically looking for answers related to nginx server requirements whereas the suggested links talk about capacity planning and load testing for large infrastructure projects with multiple components to it (both are irrelevant to our question) We are looking for nginx server optimization and requirements.

  • 2
    Unfortunately you're unlikely to get useful guidance on queries like this here. You're probably better off using Google to search, or doing some benchmarking yourself. You can easily spin up an AWS instance with high CPU or high RAM and see what happens with your use case. 2000 requests per second is pretty high, you should probably be using multiple servers for redundancy and reliability, a load balancer, and a CDN to offload most of the traffic given it sounds largely static and cacheable. CloudFlare is a good CDN, pay for one of their business plans to get good support. – Tim Jul 29 '20 at 09:18
  • 3
    Nginx provide some guidance here ( https://www.nginx.com/blog/performance-tuning-tips-tricks/ ). TLS termination is probably going to take some CPU if you support https, which you really need to do. If you use CloudFlare they can do TLS termination for you and send requests to you over http, which isn't really as secure as it could be and isn't acceptable for financial stuff but reduces CPU usage. – Tim Jul 29 '20 at 09:21
  • We will be running cloudflare in front of the reverse proxy so only unchached requests will come to our nginx origin server. Thanks for the tip on not doing the tls termination on nginx - we can afford to do the termination on cloudflare since there is no really sensitive data going over the wire. Its a news blog. Would you be having some idea on what cpu and memory we should go for? Any numbers that you can put out here from your experience? – Muhammad Ebrahym Jul 29 '20 at 18:43
  • I have no experience to guide you sorry. My only suggestion is to spin up a variety of VMs in the cloud and benchmark, but that will take some effort. – Tim Jul 29 '20 at 19:52
  • 1
    I got a third of the hits on one location. Nginx is very economical. My 8 cores and 32 GB RAM are mainly bored. – uav Jul 29 '20 at 20:03
  • Please find a reference article from NGINX team related to the infrastructure sizing of reverse proxies. https://www.nginx.com/blog/nginx-plus-sizing-guide-how-we-tested/ – Gokul Alex Feb 02 '22 at 12:38

0 Answers0