Load Balancing


<Location /balancer-manager> SetHandler balancer-manager Order deny,allow Deny from all Allow from localhost </Location> <Proxy balancer://balancer/ stickysession=PHPSES- SIONID> BalancerMember http://www1.example.com/ BalancerMember http://www2.example.com/ BalancerMember http://www3.example.com/ </Proxy> ProxyPass /content balancer://balancer/


Starting with Apache 2.2, mod_proxy includes a new backend that enables load-balancing capabilities. The load balancing code is generic and allows you to balance multiple other protocols in addition to HTTP. To configure load balancing, first you need to define a group of backend servers with a <Proxy balancer://...> section, as shown here. Once defined, you can use the balancer ID with a regular ProxyPass directive. Each balancer ID and balancer member can take options to specify balancing strategies (based on traffic), fail over, connection pooling, and session support.

Finally, you can check the status of your load-balancing setup with the regular status handler and you can manipulate it with the balancer-manager handler.




Apache(c) Phrase Book(c) Essential Code and Commands
Apache Phrasebook
ISBN: 0672328364
EAN: 2147483647
Year: 2006
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net