nginx as load balancer + apache as a web server issue

Reinis Rozitis r at roze.lv
Tue Aug 10 23:22:23 MSD 2010


> Thanks for your quick response, Im going to try that now.
> The thing is I have two webservers, on which one should I store this? If
> Im not wrong if the server that has the memcache running goes down my
> website will wont work, is that correct?

You can run a memcached instance on each webserver and provide both to the 
php client/extension. It will automatically distribute / loadbalance and in 
case one server goes down continue to work with other (typically all 
memcache extensions disable the failed instance for given time period (15 
secs) and retry later so there is bassically also no connect delays because 
of unresponding servers).

Depending on the needs there is possibility to replicate the session data 
(sessions are written to both memcache servers) by setting the PHP ini 
variable memcache.session_redundancy for example to 2.


rr 



More information about the nginx mailing list