I am an application developper tasked with maintaining the webserver our applications runs on.
As I am delving deeper into nginx configuration, I came to realize different portions of the application would have different requirements.
Most typical applications I have worked with in the past had nearly default vhost settings, used application wide. One of the applications I maintain seems to be past that stage, when I first was assigned to tackle the beast, average response time was between 3-4 seconds. Now we manage average at around 1.5 seconds.
I now came to the impression/realization that different parts of the application could benefit from being separated in their own vhost.
There is the front-end, static pages that require maximum caching.
There is the back-end application server pages that require particular proxy_buffer and php_fpm buffer configuration.
Then, there is the part of the "api gateway", that handles the reception of external api calls, some of which have over 120k payloads.
How would this be handled by experienced nginx administrators, all in one vhost, with location blocks having their specific directives, different vhosts? Or different IFs in one vhost?
Are there any difference between the approaches for maintanability and performance?
0 Answers