Welcome! Log In Create A New Profile

Advanced

Re: Expert needed to Tune Nginx For Best Performance

November 16, 2019 04:26AM
Optimizing for production is not simply an optimization of one component, e.g., NGINX.

This is also about your security model, the application architecture and scaling abilities.

If you simply have static files to be served, place them into a memory-based file system and you'll serve them blindingly fast - in theory. Actual performance will depend on the locations of your clients, with their latencies and bandwidths, so the approach may be not to accelerate one NGINX server location, but rather have a geographic distribution to serving content at the edge.

If you need to serve to lower-bandwidth clients, gzip compression may be essential for latencies. If you have clients with broadband capabilities, you may want to save the extra CPU cycles for other tasks.

If your security model requires complex signature verification on every request, you may need significantly more CPU power in there, compared to when you simply handle easily-verifiable cookies (which were assigned through a more compute-intensive calculation and verification scheme - but only once per session). OIDC-based schemes come to my mind.

If you have different types of loads, it is sensible to separate them. Static files will be served by one cluster of servers, dynamic content will be served by another. Having auto-scaling groups on the application side , you can scale well, assuming state-less micro-services there.

If there is a broadly varying spectrum of load situations, you may want to consider clusters of NGINX, possibly with auto-scaling, to handle loads more effectively. Optimizing single NGINX instances may not what will really boost performance enough.

So, my point is: optimizing any application environment for production use is not just a matter of nifty directives to speed up NGINX. It's a question of optimizing the architecture AND its components, including the application services. I've seen massive speed-ups just by changing the application into a set of state-less micro-services - focus on "state-less".

While you will find people who help you with NGINX optimization in a given scenario, this may not be what you really need to optimize your entire application, including NGINX.

Cheers,
--j.
Subject Author Posted

Expert needed to Tune Nginx For Best Performance

Anonymous User November 15, 2019 09:44PM

Re: Expert needed to Tune Nginx For Best Performance

j94305 November 16, 2019 04:26AM

Re: Expert needed to Tune Nginx For Best Performance

Anonymous User November 18, 2019 10:00PM

Re: Expert needed to Tune Nginx For Best Performance

gariac November 18, 2019 11:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 90
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready