负载均衡器拖慢网站 [英] Load balancer slowing down the site

查看:178
本文介绍了负载均衡器拖慢网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有6个Web服务器和负载平衡器之间。

We have 6 web servers and a load balancer in between.

但是,负载平衡似乎确实放缓的事。如果我访问使用任何服务器的IP地址的站点中被快速开相比,通过负载均衡器访问。

But load balancing seems to actually slowing down the things. If I access the site using any server's IP address the site gets opened fast compared to accessing through load balancer.

在负载平衡器似乎请求等待,直到长他们从其他请求的响应,特别是对于JS code。负载均衡器配置了会话,虽然亲和力。
有些时候,上面还有重定向循环。在某些网络响应不来都离开现场破碎。

On load balancer it seems requests wait for long till they get response from other requests, especially for JS code. Load balancer is configured with session affinity though. Some times there are even redirect loops. On certain networks the response doesn't come at all leaving the site broken.

有没有我需要遵循任何提示。如何知道如果配置和负载平衡器正常工作?

Are there any tips that I need to follow. How to know if load balancer is configured and working properly?

负载均衡是Apache和网站使用PHP的了。

Load balancer is on apache and site is built using PHP.

更新
负载均衡是通过LVS完成,所使用的算法是循环调度。
我不知道需要什么其他细节,但问题是,当我直接访问使用任何一台服务器的IP地址的网站,它涉及罚款和pretty快,但是,当我使用负载平衡器的IP地址,一些资源如CSS /图像不加载在所有与本站会持续时间长并最终失败。
我试图与所有服务器的所有IP地址和所有做工精细,好像有与LB一个问题,只是不知道怎么就知道了。让我知道如果我再错过任何重要信息确切地知道这个问题。

UPDATE: Load balancing is done through LVS and the algorithm used is Round-Robin scheduling. I am not sure what other details are required, but the problem is, when I access the site directly using any one server's IP address, it comes fine and pretty fast, but, when I use load balancer IP address, some resources like css/images don't load at all and site keeps loading for long time and then eventually fails. I tried with all IP addresses of all servers and all work fine, seems like there is a problem with LB, just not sure how to know. Let me know if I am missing any crucial info again to know the problem exactly.

任何帮助是极大AP preciated。

Any help is greatly appreciated.

感谢

推荐答案

我想我找到了原因就在这里。

I guess I found out the reason here.

这是无关的负载平衡器。我ping通的域名服务器,并发现了许多包都迷路。

It is nothing to do with load balancer. I pinged the nameservers and found out many packets were getting lost.

现在增加了TTL,希望将别人解决问题将有自己的域名服务器。

Now have increased the ttl, hoping it will resolve the issue else going to have own nameservers.

感谢

这篇关于负载均衡器拖慢网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆