Welcome! Log In Create A New Profile

Advanced

Re: Ngix Performace as a Reverse Proxy

Sergey Budnevitch
October 29, 2012 05:14AM
On 29 Oct2012, at 02:26 , Niall Gallagher - Yieldbroker <Niall.Gallagher@yieldbroker.com> wrote:

> According to documentation for proxy_buffering
>
> "For Comet applications based on long-polling it is important to set proxy_buffering to off, otherwise the asynchronous response is buffered and the Comet does not work."
> I have tried the following and am not getting better results, however its still being outperformed by the Java HTTP proxy by about 10% - 15%.

Try to set
postpone_output 0;


> worker_processes 2;
> worker_cpu_affinity 01 10;
> worker_rlimit_nofile 20000;
>
> However spikes of up to 20 seconds are still frequent under high load.
>
> -----Original Message-----
> From: nginx-bounces@nginx.org [mailto:nginx-bounces@nginx.org] On Behalf Of Sergey Budnevitch
> Sent: Friday, 26 October 2012 11:04 PM
> To: nginx@nginx.org
> Subject: Re: Ngix Performace as a Reverse Proxy
>
>
> On 26 Oct2012, at 08:36 , Niall Gallagher - Yieldbroker <Niall.Gallagher@yieldbroker.com> wrote:
>
>> Hi,
>>
>> We have been doing some testing with Nginx as a reverse proxy. We have been comparing it to a number of solutions which it easily beats, like IIS and Apache with mod_proxy etc. However, as an experiment we have been comparing it to an adapted NIO server written in Java. This seems to be out performing Nginx in the reverse proxy role by a factor of 3 times. We are convinced our configuration is wrong. Both run on the same box (at different times) with the same sysctl settings (see below). We also saw some spikes, up to 3 seconds per request at times, and some at 10 over a 1 million request test of 1000 concurrent clients.
>>
>> We are using a fairly straight forward configuration for Nginx. Since we have two processors on the box we tried worker_processes of 4 with worker_connections of 6000, then we tried worker_processes of 40 with worker_connections of 5000. No change. We need to be able to support responsive Ajax requests with strategies like HTTP streaming and long polling in our setup.
>>
>> Any ideas what we can do to boost our throughput and latency?
>
> Buffers. nginx should not write/read anything to/from disk while proxing for maximum performance. Check your average request and response sizes and tune buffers sizes accordingly (look at proxy_buffers, proxy_buffer_size, proxy_max_temp_file_size documentation).
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Ngix Performace as a Reverse Proxy

Niall Gallagher - Yieldbroker October 26, 2012 12:38AM

Re: Ngix Performace as a Reverse Proxy

Sergey Budnevitch October 26, 2012 08:06AM

RE: Ngix Performace as a Reverse Proxy

Niall Gallagher - Yieldbroker October 28, 2012 06:28PM

Re: Ngix Performace as a Reverse Proxy

Sergey Budnevitch October 29, 2012 05:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 188
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready