# Load-balancing

**URL:** <https://www.ruby-forum.com/t/load-balancing/209820>\
**Category:** NGINX\
**Created:** [July 23, 2011, 5:35pm UTC](https://www.ruby-forum.com/t/load-balancing/209820 "2011-07-23T17:35:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [July 23, 2011, 5:35pm UTC](https://www.ruby-forum.com/t/load-balancing/209820/1 "2011-07-23T17:35:37Z")

</div>

Hi,

I have a question about nginx configured as a load-balancer. Usually,  
when HTTP requests are balanced to a back-end server, the HTTP reply is  
sent back to the client through the load-balancer. Is this also the case  
for nginx, or is it also possible to configure nginx that the backend  
server will directly respond to the client? I wonder…

Thank you,  
Andrej

Posted at Nginx Forum:

> **[load-balancing](https://forum.nginx.org/read.php?2,212866,212866#msg-212866)**
>
> Hi, I have a question about nginx configured as a load-balancer. Usually, when HTTP requests are balanced to a back-end server, the HTTP reply is sent back to the client through the load-balancer. Is this also the case for nginx, or is it also...

---

<div class="post-metadata">

**Author:** ![andrejvanderzee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/9d8465/32.png) [@andrejvanderzee](https://www.ruby-forum.com/u/andrejvanderzee)\
**Post date:** [July 23, 2011, 6:05pm UTC](https://www.ruby-forum.com/t/load-balancing/209820/2 "2011-07-23T18:05:55Z")

</div>

I don’t think that is technically possible because of the way that whole  
http thing works. Browser expects to get reply’s from the server they  
requested information from. They don’t open ports and wait for servers  
to  
connect to them. Also, web server doesn’t connect to anyone, they just  
open  
ports and wait until some browser ask some information. So, what you  
asking  
is not technically possible.

Best Regards,

Yaar Arabac

2011/7/23 andrejvanderzee [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![andrejvanderzee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/9d8465/32.png) [@andrejvanderzee](https://www.ruby-forum.com/u/andrejvanderzee)\
**Post date:** [July 23, 2011, 6:09pm UTC](https://www.ruby-forum.com/t/load-balancing/209820/3 "2011-07-23T18:09:01Z")

</div>

Yes that is what my thoughts are too, just want to have a confirmation,  
especially from a nginx-developer.

Cheers,  
Andrej

Posted at Nginx Forum:

> **[Re: load-balancing](https://forum.nginx.org/read.php?2,212866,212869#msg-212869)**
>
> Hi, I have a question about nginx configured as a load-balancer. Usually, when HTTP requests are balanced to a back-end server, the HTTP reply is sent back to the client through the load-balancer. Is this also the case for nginx, or is it also...

---

<div class="post-metadata">

**Author:** ![andrejvanderzee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/9d8465/32.png) [@andrejvanderzee](https://www.ruby-forum.com/u/andrejvanderzee)\
**Post date:** [July 23, 2011, 6:14pm UTC](https://www.ruby-forum.com/t/load-balancing/209820/4 "2011-07-23T18:14:34Z")

</div>

Umm, just to clarify things, I am not an nginx developer.

2011/7/23 andrejvanderzee [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![andrejvanderzee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/9d8465/32.png) [@andrejvanderzee](https://www.ruby-forum.com/u/andrejvanderzee)\
**Post date:** [July 23, 2011, 11:57pm UTC](https://www.ruby-forum.com/t/load-balancing/209820/5 "2011-07-23T23:57:19Z")

</div>

Hello!

On Sat, Jul 23, 2011 at 11:35:05AM -0400, andrejvanderzee wrote:

> I have a question about nginx configured as a load-balancer. Usually,  
> when HTTP requests are balanced to a back-end server, the HTTP reply is  
> sent back to the client through the load-balancer. Is this also the case  
> for nginx,

Yes.

> or is it also possible to configure nginx that the backend  
> server will directly respond to the client? I wonder…

No.

Maxim D.

---

<div class="post-metadata">

**Author:** ![andrejvanderzee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/9d8465/32.png) [@andrejvanderzee](https://www.ruby-forum.com/u/andrejvanderzee)\
**Post date:** [July 24, 2011, 3:36am UTC](https://www.ruby-forum.com/t/load-balancing/209820/6 "2011-07-24T03:36:18Z")

</div>

what you are looking for is a LB with DSR mode (direct server return)  
this is done by manipulating the mac add header … you could hack  
something up yourself or purchase an appliance from known vendors that  
support dsr mode (brocade/a10 being 2 of many…)

-Payam

---

<div class="post-metadata">

**Author:** ![andrejvanderzee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/9d8465/32.png) [@andrejvanderzee](https://www.ruby-forum.com/u/andrejvanderzee)\
**Post date:** [July 24, 2011, 8:09am UTC](https://www.ruby-forum.com/t/load-balancing/209820/7 "2011-07-24T08:09:00Z")

</div>

Hi,

or use Linux IPVS which has a DR Mode.

Regards,  
Sven

Am 24.07.2011 03:35, schrieb Payam C.:
