The Power of mod_proxy Proxy servers, load balancers and how to implement with Apache HTTP Server.
Hello World Paul Weinstein Web Programmer/Analyst at Orbit Media Studios, Inc.
Proxy Servers
What is a Proxy Server? When Might a Proxy Server Be Useful? How to Implement a Proxy Server with Apache HTTP Server?
What is a Proxy Server? “A server that acts as an intermediary for requests from clients seeking resources from other servers.” 1 1 From Wikipedia,
When Might a Proxy Server Be Useful? “To provide Internet access to internal clients that are otherwise restricted by a firewall.” “The proxy can also use caching to reduce network usage.” 2 2 Apache Module mod_proxy Documentation,
When Might a Proxy Server Be Useful?
“To provide Internet users access to a server that is behind a firewall.” “Provide caching for a slower back-end server.” “Be used simply to bring several servers into the same URL space” “Be used to balance load among several back-end servers.” 2 2, Apache Module mod_proxy Documentation,
When Might a Proxy Server Be Useful?
Implementing a Proxy Server with HTTP Server In Association with: mod_cache mod_ssl Standard Apache Distribution: mod_proxy mod_proxy_http mod_proxy_ftp mod_proxy_ajp mod_proxy_connect Third Party: mod_proxy_html * * Move to standard distribution as part of v2.4.0,
Implementing a Forward Proxy Server with HTTP Server ProxyRequests On ProxyVia On
Implementing a Proxy Server with HTTP Server Order Deny,Allow Deny from all Allow from
Implementing a Reverse Proxy Server with HTTP Server ProxyRequests Off ProxyPass /back ProxyPassReverse /back ProxyHTMLURLMap /backhttp://backend.example.com
Load Balancers
What is a Load Balancer? When Might a Load Balancing be Useful? How to Implement a Load Balancer with Apache HTTP Server
What is a Load Balancer? “A networking methodology to distribute workload across multiple resources.” 3networking 3 From Wikipedia,
When Might Load Balancing be Useful?
Implementing a Proxy Server with HTTP Server In Association with: mod_cache mod_ssl Standard Apache Distribution: mod_proxy mod_proxy_http mod_proxy_ftp mod_proxy_ajp mod_proxy_connect mod_proxy_balancer Third Party: mod_proxy_html * * Move to standard distribution as part of v2.4.0,
Implementing a Failover Load Balancer with HTTP Server ProxyRequests Off ProxyPass /webapp balancer://cluster ProxyPassReverse /webapp ProxyPassReverse /webapp ProxyHTMLURLMap /webapphttp://prime.example.com:80 ProxyHTMLURLMap /webapphttp://fail.example.com:80 BalancerMember BalancerMember status=+Hhttp://fail.example.com:80
When Might Load Balancing be Useful? “Distribute workload across multiple computers or a computer cluster... to achieve optimal resource utilization, maximize throughput, minimize response time, and avoid overload.” 3computer cluster 3 From Wikipedia,
When Might Load Balancing be Useful?
Implementing a Load Balancer with HTTP Server ProxyRequests Off ProxyPass /webapp balancer://cluster \ stickysession=SESSIONID nofailover=On
Implementing a Load Balancer with HTTP Server ProxyPassReverse /webapp ProxyPassReverse /webapp ProxyPassReverse /webapp ProxyHTMLURLMap /webapphttp://app1.example.com:80 ProxyHTMLURLMap /webapphttp://app2.example.com:80 ProxyHTMLURLMap /webapphttp://app3.example.com:80 ProxyPassReverseCookiePath /webapp/ /webapp RequestHeader unset Accept-Encoding
Implementing a Load Balancer with HTTP Server BalancerMember loadfactor=50 route=app1http://app1.example.com:80 BalancerMember loadfactor=25 route=app2http://app2.example.com:80 BalancerMember loadfactor=25 route=app3http://app3.example.com:80
Implementing a Load Balancer with HTTP Server ProxyRequests Off ProxyPass /webapp balancer://cluster stickysession=JSESSIONID nofailover=On ProxyPassReverse /webapp ProxyPassReverse /webapp ProxyPassReverse /webapp ProxyHTMLURLMap /webapphttp://app1.example.com:80 ProxyHTMLURLMap /webapphttp://app2.example.com:80 ProxyHTMLURLMap /webapphttp://app3.example.com:80 ProxyPassReverseCookiePath /webapp/ /webapp RequestHeader unset Accept-Encoding BalancerMember loadfactor=50 route=app1http://app1.example.com:80 BalancerMember loadfactor=25 route=app2http://app2.example.com:80 BalancerMember loadfactor=25 route=app3http://app3.example.com:80
Resources/Questions ml ml