大网数据广告活动
服务器运维问答

Software Load Balancer - Forward or Redirect to the backend servers?

· 52CE 我爱测

I am a web developer, recently a need has been created to use Load Balancer. I am new in this area. I have chosen which LB to use, its not like it matters so much, HAProxy has all the features needed for as far as I've researched…

问题原文

原帖链接 · Festim Cahani · CC BY-SA 3.0

I am a web developer, recently a need has been created to use Load Balancer. I am new in this area. I have chosen which LB to use, its not like it matters so much, HAProxy has all the features needed for as far as I've researched.

My concern is that, with software based load balancer, It does not "redirect" user to the backend server, the loadbalancer stays in the middle, so all the traffic bandwith and tcp connections, will stay in the middle. Did I get it right?

If yes for the question before, then how can I make a solution so the load balancer will not stay in the middle with Client - Backend server?

Also, I need a "source" lb type, because webapp uses session, and I need users to connect to the same servers they've been using.

Thank you in advance.

已采纳解答

原帖链接 · gxx · CC BY-SA 3.0

Not sure which way most of your traffic flows, if it's client -> server, or server -> client, but if it's the later, you might be interested in using (or checking out, at least) the Linux Virtual Server (LVS) which is

an advanced load balancing solution that can be used to build highly scalable and highly available network services, such as scalable web, cache, mail, ftp, media and VoIP services.

(Excerpt from the website).

To get the traffic of your backend servers directly, without "something in between" to the / your clients, use Direct Routing. You'll find more information in this link, but, to get an idea how this does look like:

Now you could say...well, this sounds nice and fancy in theory, but come on, the website reads "Latest Press News... Wednesday, August 8, 2012"...we're in 2016 now. Yes, you would be completely right then, besides that LVS is proven and rock solid...did I recommend to have a look at least?

The Wikimedia Foundation does use it, as many others do, and here is one last image showing the setup in 2010.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-07-15)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。