Gebrettert: How to set a VPS, so he survived?

I would like to know approximate numbers "of garraffello" and what General recommendations for server provisioning to peak loads? Can eat already ready the article / numbers somewhere?


System: Cent OS + Nginx (php-fpm) + MySQL + PHP.
October 7th 19 at 11:46
8 answers
October 7th 19 at 11:48
Gebrettert is a myth. Something about a couple of years ago I wrote an article and for fun I inserted her picture, lying on my own VDS-ke, 500 rubles per month with freebsd and nginx-Ohm. The article and picture in the introduction came to home and stayed there for almost the whole working day before I go to the second page.

The peak request rate was approximately, if memory serves, a little more than a dozen requests per second. And it's not a user clicks on the link, but just people who opened the main page of Habra. My VDS-CA is able to give this picture at a speed of 500-1000 req/sec.

IMHO if it's not a really demanding app, then die from razgruzki can only hulking shit on some monster php engine (which, incidentally, is probably over 90% of the Runet). So don't write clumsy monstrous shit in php and you don't have to configure anything.
and what hardware was in your VDS-Ki? Because they are weak there =) - aniya.Kertzmann65 commented on October 7th 19 at 11:51
I have it in xen and at the rate I'm supposed 700MHz VCPU and 512MB of RAM. But it doesn't matter, I have this example for the sake of figures. IMHO self-respecting website needs to withstand several tens of requests per second to the main without straining the weak (relatively) hardware. - Ignatius.Fadel34 commented on October 7th 19 at 11:54
I have a 70 stood empty framework (512 MB RAM/500 MHz processor), but the fact of the matter that he was empty, if at least some logic starts to work, then 70 it would decrease significantly, because the frame is not difficult. The statics don't need a lot of capacity, there is a file? give, no? 404. It's simple. - aniya.Kertzmann65 commented on October 7th 19 at 11:57
What kind of framework it? - lela_Macejkovic54 commented on October 7th 19 at 12:00
It does not matter, any framework will be an empty run fast, even with a monster =) - aniya.Kertzmann65 commented on October 7th 19 at 12:03
70 it is not fast =) Compare with the "empty" nginx give something from memory, Ala location / { return 200 "Hello world"; }. Or some empty Python application on uWSGI.

90% of the time to completely generate a new page on every request is not necessary, but people for some reason do it. - Ignatius.Fadel34 commented on October 7th 19 at 12:06
October 7th 19 at 11:50
I recommend to start to get rid of a site through loadimpact.com, it will be clear as the website is itself in 1-50 competing requests, how this response suffers.
October 7th 19 at 11:52
On habré there are stack of articles in the style of "How we survived gebrettert" with charts and numbers, plus there was a post on the references to the image in the post when he got home. In General, everything is searched on the same site.
October 7th 19 at 11:54
Ask to notice, that all depends on what you iron.

And then how to expose correctly on the system, configure any innodb... and without gebrettert will cry :)
There is a living example how beautiful the iron is bent due anyhow as written code. This crap is written in Python, so correct one of the respondents: do not write clumsy g in any language. - aniya.Kertzmann65 commented on October 7th 19 at 11:57
October 7th 19 at 11:56
I have a basic VPS at hetzner six Euro withstood annons effect in 18k uniques in less than 12 hours.
The exact number of requests need to go into the archive logs, what to do frankly too lazy, but traffic was ngenerics about 45 gigabytes.

The majority of visitors came to Wordpress 3.1 x with a custom skin and a carriage jQuery in it, plus the third forum on phpBB.
Nothing collapsed, nothing sank — memory siralus about four megabytes, the stone was kept in the region of 40-45%.

Yuzal a bunch of nginx+php5-fpm+percona (Prosobranchia packages from dotdeb) without much fine tuning.
Actually all the tips start with installing nginx.
Next:
to configure static content using nginx
it is advisable to get rid of apache for dynamics, replacing it with php5-fpm

The rest — specific tuning-specific CMS. - aniya.Kertzmann65 commented on October 7th 19 at 11:59
Well, it's true, the rest of the nails except that the scripts remain. - Ignatius.Fadel34 commented on October 7th 19 at 12:02
"18k uniques in less than 12 hours" it's so ridiculous figure that about her, even to say no =) 2 Unica per second =) - aniya.Kertzmann65 commented on October 7th 19 at 12:05
Unico != hits
Hits directly requests, was about 80 thousand. - lela_Macejkovic54 commented on October 7th 19 at 12:08
Count how many out of the RPS and verify that it's a ridiculous figure. - aniya.Kertzmann65 commented on October 7th 19 at 12:11
For 500 MHz upski on Xenu? Well, well. - Ignatius.Fadel34 commented on October 7th 19 at 12:14
Load anything 2-3 requests per second, they even take turns can make it run, if 0.3 — 0.5 each. - anastacio_Stokes commented on October 7th 19 at 12:17
>2 Unica per second =)

It's like you have so happened, then? In 12 hours 43K seconds. If it was 18K uniques, it does not 2 the second, and Vice versa, one unique in 2 seconds ;)
But 80K requests just gives 2 Unica per second. - kay_Rosenbaum commented on October 7th 19 at 12:20
Yes, I mixed up =) Figure in the end it turns out even funnier. - rosalind.Ullrich commented on October 7th 19 at 12:23
October 7th 19 at 11:58
it's very simple. caching.
under WordPress and Drupal configs are using nginx fastcgi_cache.
a bunch of modules caching.
and varnish so all lovely. the server is sleeping...
Why varnish in the presence of nginx? - aniya.Kertzmann65 commented on October 7th 19 at 12:01
looking at your previous message in my question — you have verniciflua? :)
probably then why they made it... - Ignatius.Fadel34 commented on October 7th 19 at 12:04
I wonder why people use cache in Farnese, in the presence of cache in nginx. Genuine curiosity, plus the ability to collect information about the demand for those or other features. - aniya.Kertzmann65 commented on October 7th 19 at 12:07
October 7th 19 at 12:00
Now you asked something like "how to earn a million in a day doing nothing".
The correct answer in your case to pick, you to tune, to look for degradation and bottlenecks in your particular project to rewrite the code.
In General, in dabraabraca there is absolutely nothing to worry about. Usually, it is undergoing any project is set by any manual, if there are no bydlokod and VDS-Ki does not slow disk subsystem. At least my other clients have experienced it like 20 times, I paid attention only to preduprejdali monitoring on slightly jumped the statistics of consumption of nutrition on the carcasses.
October 7th 19 at 12:02
1. Check the settings for Mysql on the subject of optimal in more detail: Optimum tuning of Mysql...

2. If the website content (i.e., few speakers on the page), be sure to use the cache, e.g. Varnish: Varnish - quick start

3. As the first in the queue will be the web server (better use nginx), make sure that you set it up: setup nginx for load

4. For basic validation under load, you can use ab from Apache

On the topic I recommend to read the history of the growth of different projects:
highscalability.com
highload.com.ua
habrahabr.ru/hub/hi

Find more questions by tags * nix-like systemsJabraeffectServer optimization