On-line LVS load Balancer request does not forward case simple solution analysis one case

Source: Internet
Author: User

The structure of an online architecture is basically as follows:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/8B/wKioL1WfnYXzALyeAApDtOPL5Sg960.jpg "title=" GSDG Gdg.png "alt=" Wkiol1wfnyxzalyeaapdtopl5sg960.jpg "/>

Basic Schema Description:

The front-end uses lvs+keepalived to do load balancing and high availability to forward the client's request to the backend Business Server, which is the 4 set of Nginx+tomcat business servers. To be more straightforward, those nginx+tomcat can simply be understood as LVS clients.


Fault Description:

When LVS forwards to 58.2.12.20 this server, the value of Activeconn also some, inactconn almost no value. In order to this problem tangled for a few days delay, because just to the company can not solve these problems oh.


Solution Ideas:

1) The first is to determine whether the back end of the realserver can be normal access, the results of one-to-one debugging access, no problem found.


2) View keepalived.conf also found no problems


3) View the VIP of each realserver can also get to, even later write their own script to the LVS server to regain, and found that no different, also can get to VIP address, prove this VIP configuration no problem;


4) Contact the operation of the whole friends, asked a few remote also did not see what is the specific problem, I am depressed oh.


5) The elimination method, since some LVS client, that is Realserver (nginx+tomcat), then compare these normal forwarding Nginx configuration file (that is, the LVS client configuration file, Nginx this piece to start), Then download to the local Windows system, and another nginx configuration file that cannot be forwarded is compared with Beyond Compare 3. Found a major problem. Where the abnormal can be forwarded is not in the Nginx configuration file, as follows

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6F/8F/wKiom1WfnvjRa7hfAAKaJ9USOt8000.jpg "title=" Qq20150710180324.png "alt=" Wkiom1wfnvjra7hfaakaj9usot8000.jpg "/>

Can not forward the Nginx configuration file inside, directly write dead to use eth0 to handle customer requests, that is, to directly deal with the LVS service side thrown over the request.


Solution: Directly to the Nginx listen listening IP address using SED to replace the empty, and then save, restart Nginx.


Observe again:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6F/8F/wKiom1Wfn4nw-jOBAAI4XQsY3A0551.jpg "title=" LVS does not forward requests. png "alt=" wkiom1wfn4nw-jobaai4xqsy3a0551.jpg "/>

As you can see, it's OK.

Because the collation of the relatively hasty, what is not in place, but also ask you a lot of guidance. A lot of criticism. It is hereby recorded and kept as a memo.

Herd 2015 07 10


This article from "The Herd-Han Yanwei-Yun Road" blog, declined reprint!

On-line LVS load Balancer request does not forward case simple solution analysis one case

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.