High traffic on Nginx-Webservers!

Hello,

   We're using the cluster of 5 webservers using nginx (reverse 

proxy)

  • apache to handle php requests. Our web-servers are constantly high
    with
    load-avg of 2.0~3.0. I have seen people using varnish between nginx +
    apache. Could someone guide me if installing Nginx > Varnish > apache
    will
    reduce the server load ?

It’s urgent.

Regards.
Shahzaib

Am Tue, 22 Apr 2014 14:39:53 +0500
schrieb shahzaib shahzaib [email protected]:

Hello,

   We're using the cluster of 5 webservers using nginx (reverse

proxy)

  • apache to handle php requests. Our web-servers are constantly high
    with load-avg of 2.0~3.0. I have seen people using varnish between
    nginx + apache. Could someone guide me if installing Nginx > Varnish

apache will reduce the server load ?

It’s urgent.

If the content is cachable, it will reduce load.

But deploying varnish requires some experience and knowledge of the
application.
Unless the application is e.g. plain-vanilla wordpress, there are no
out-of-the-box varnish tutorials to help you in your specific situation.

If your content is cachable and you don’t require varnish’s
cache-invalidation features, you could use nginx’s proxy-caching
features.

See the wiki/handbook.

Thanks for quick response, well our website is related to video
streaming
just like youtube. Could you provide me some guide to learn varnish for
start-up ?

Any suggestions will be highly appreciated.

Shahzaib

If your content is cachable and you don’t require varnish’s
cache-invalidation features, you could use nginx’s proxy-caching
features.

Well, i want to cache application means, dynamic php pages. Will that be
OK
with nginx ?

Am Tue, 22 Apr 2014 15:21:09 +0500
schrieb shahzaib shahzaib [email protected]:

Thanks for quick response, well our website is related to video
streaming just like youtube. Could you provide me some guide to learn
varnish for start-up ?

Any suggestions will be highly appreciated.

Shahzaib

Do you do the streaming from nginx or from php?

Documentation etc. is on https://www.varnish-cache.org/

For the improved handling of streaming, you will need the recently
released v4.0.
I don’t know much about this, we don’t do much varnish - and no
streaming.

Mex, That’s a high amount of reduction in load-avg than :). Could you
please refer me to some guide to start with nginx-cache ? And also it’s
drawbacks if i put the wrong configs ?

As we’re handling 18000 visitors concurrently on cluster of 5
webservers,
which makes it 3600 concurrent users per server by dividing it with the
5.

if the content is cacheable, using varnish or nginx-cache will
definetely
reduce load.

we have a similar setup (nginx infront of apache+php) with an average of
5000 requests/second,
and using nginx-cache with a cache-time of 1 minute reduced load from
around
8 to
0.5 on the apache-servers, while the nginx-servers are still idleing at
around 0.2

we use to nginx to cache static content as well as dynamic pages

regards,

mex

Posted at Nginx Forum:

depending on your setup you might think about serving static
content and videos directly from nginx:
http://www.nginxtips.com/optimizing-nginx-for-video-sites/

anything served directly from nginx, not going to apache will boost your
performance.

Mex, That’s a high amount of reduction in load-avg than :). Could you
please refer me to some guide to start with nginx-cache ?

http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache

a little more detailed:

And also it’s
drawbacks if i put the wrong configs ?

stale content, but it might be ok to run with a very short cache-time

Posted at Nginx Forum:

PONG

Posted at Nginx Forum:

Shahzaib, you have a different server for the static content like the
videos? I’m talking about AWS cloudfront or something like that…

2014-04-22 7:05 GMT-05:00 mex [email protected]:

PONG

Posted at Nginx Forum:
Re: High traffic on Nginx-Webservers !!


nginx mailing list
[email protected]
nginx Info Page


Un abrazo!

Raúl Hugo http://twitter.com/raulhugo

Miembro Asociadohttp://apesol.org.pe http://apesol.org.pe/SysAdmin
Cel.
#961-710-096 Linux Registered User #482081 - http://counter.li.org/
http://counter.li.org/P Antes de imprimir este e-mail piense bien si
es
necesario hacerlo

On Tuesday 22 April 2014 15:53:27 shahzaib shahzaib wrote:

Mex, That’s a high amount of reduction in load-avg than :). Could you
please refer me to some guide to start with nginx-cache ? And also it’s
drawbacks if i put the wrong configs ?

wbr, Valentin V. Bartenev