Answer the question
In order to leave comments, you need to log in
How to effectively build an infrastructure for a web service with a periodic “hilod”?
Hylod is indicated in quotation marks ....
In general, there is a news resource, deployed on one powerful server. PgSQL, nginx, php-fpm and everything is standard like everyone else.
Sometimes about 5000 active users come in, and LA flies into the ceiling because of PHP. There is no need to talk about optimization, what we could have already done or we don’t want to spend time on it.
I would like to quickly put additional resources into operation at the time of high attendance. Either it will be vertical scaling (for example, a server with php-fpm), or some servers with the maximum cache content.
Tell me which way to look?
Answer the question
In order to leave comments, you need to log in
Option 1. Use Varnish for "newsletter" format resources, in my opinion the ideal solution (in version 5.0, support for HTTPv2/SSL appeared in its infancy, judging by the ChangeLog).
Option 2: Use Nginx + load balancing .
Option 3. By quickly riveting or renting a cloud, where resources are allocated dynamically, according to the algorithms that are most optimal for you.
During HL, all "non-users" / guests / readers (who do not need to change data on the server) - give cached pages, users - as usual.
With good caches, you can optimize the load even on stores and services, and on the news site, you can most likely remove up to 90-99% of peak loads.
To do this, connect the site to the CDN from WSR , because. they cache dynamic content too.
Simply put - one user will request a page from the hosting and it will get into their CDN cache, the rest will receive it already prepared in advance without another CMS generation. Accordingly, the load on the server is no longer going.
For editors; authorized, commenting and other "non-standard" visitors, the page cache is automatically turned off, so the functionality does not suffer.
When articles or comments appear, the cache is reset, so it does not interfere in itself either.
And if this ever ceases to be enough, then right at the CDN level you can balance the load by starting to send requests to several servers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question