A
A
alexdora2016-01-23 12:39:57
Nginx
alexdora, 2016-01-23 12:39:57

What is the performance of Nginx in proxy mode?

I didn't know how to phrase the question correctly. There is a powerful server on which costs Apache + mysql + PHP. There was a task to proxy NGIXN, but not on the basis of the same server, but on a separate one (for example, low-power VPS hosting only for this task). And then a reasonable question arose: what kind of performance would be required for NGINX.
In my understanding, when executing a request to the site, the main load is created by Apache + mysql + PHP, a finger to the sky is about 90%. That is, approximately if you take a VPS, it should be 10 times less productive. I understand that you can configure proxying in different ways. Now we are talking about the standard setting. How correct is my understanding? Comments on this topic are welcome.

I will add a question. Server from the topic: https://toster.ru/q/279025.
Since there are several home lines and they don’t give me BGP, I want to take a low-power server or VPS on a good site so that it is an access point to the HTTP server. That is, in the event of a drop in one channel, it automatically requested everything through the second / third. Something like this. And of course, I want to pay less for the access server. After all, my machine is in every way more productive than servers up to 500 euros.
Now, for the sake of experiment, I use VestaCP in the virtual machine. So far I have seen that it allows you to choose the return of the site in the format: Apache + NGINX Proxy or just Apache.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vlad Zhivotnev, 2016-01-23
@alexdora

About a lot. Rest not in memory / cpu, but in the network capabilities of your virtual machine. A gigabyte of memory with a gigabit channel is enough to proxy 10k rps. If you do not reap the traffic, do not hang https, then the cpu is almost not used (10-20% of the modern kernel).

M
Mikhail Osher, 2016-01-23
@miraage

As far as I understand, you want to make a reverse proxy.
Give statics through nginx, and skip scripts further to Apache.
This will give a noticeable increase in the return of statics.
Your best bet is to get rid of Apache and install php-fpm.
If Apache describes rewrite heaps, it's time to get rid of this. 2016 is in the yard, after all.
That is, approximately if you take a VPS, it should be 10 times less productive
Why all of a sudden? You need the same power to process scripts. nginx will give a win on statics.

N
neol, 2016-01-23
@neol

It is unlikely that you have such traffic that nginx creates a noticeable load, so absolutely any VPS will suffice. If only the channel was not too narrow.

Z
zooks, 2016-01-23
@zooks

There is no need to fence Apache with nginx proxying these days.
Install a bunch of nginx + php-fpm, so there will be less memory consumption.
VPS should be about the same performance.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question