Apache Load Balancer

Source: Internet
Author: User
Tags redmine

Apache Load Balancer

Apache can also achieve load balancing. The load balancing of Apache is mainly mod_proxy_balancer achieved by implementation. So, what is the configuration method for Apache load Balancing?

In the Apache configuration file, httpd.conf add

ProxyPass / balancer://proxy/         #注意这里以"/"结尾 <Proxy balancer://proxy>     BalancerMember http://192.168.6.37:6888/     BalancerMember http://192.168.6.38:6888/ </Proxy> 

It is not necessary to httpd.conf add it directly in ProxyPass / balancer . Another way to do this is to add it to httpd.conf Include conf/httpd-proxy.conf , and then ProxyPass write to it httpd-proxy.conf in.

Here is a detailed description of what this configuration file means:

    • Where ProxyPass is the Configure Virtual Server command
    • /should be class to filter rule, refers to the Web request URL suffix (refer to the URL is said to be a prefix, do not understand). If only the /redmine request is load balanced, it needs to be changed /redmine .
    • balancer://proxyIndicates that you want to configure load balancing to proxy indicate a load balancer name, or to change to another name, for example redmine_cluster .

Indicates that it will be http://192.168.6.37:6888/ registered to load balancer.

The load balancer shown above is polling load balancing, besides, there are load balancing policies weighted by weight and load balancing policies for weight request response. Where the former allocates the load according to the number of requests, while the latter distributes the load according to the request load. For example: According to the former, if there are 4 requests, 3 times are assigned to machine A, 1 times assigned to Machine B. According to the latter, there are 1000bytes requests, 750bytes is assigned to a, 250bytes is assigned to B. Refer to the following link for details

Reference

Apache Load Balancer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.