Load Balancing Problem

Load Balancing Problem

Old forum URL: forums.lhotka.net/forums/t/243.aspx


razorkai posted on Thursday, June 01, 2006

Hi guys.

Just tried to use a Remoting DataPortal behind a load balancer (Microsoft NLB) and it all works quite nicely except for the slightly annoying server ip cache problem that Rocky mentions in the book.  Two Servers sit behind the NLB and both work correctly.  However, if I start my test app and disable the server it is using in the Load Balancing software, the next time the app tries to talk to the server it gives out an Exception as below:-

"The underlying connection was closed: A connection that was expected to be kept alive was closed by the server"

I thought that it was supposed to automatically fail over and use the other server in the NLB?

Anyone else using NLB with Csla/Remoting?  Any ideas on this one?

TIA.

John.

RockfordLhotka replied on Thursday, June 01, 2006

This is a known issue with Remoting. It seems to me that someone had come up with a solution, but it has been so very long since I heard about it that I don't remember the specifics. I would bet that google is your friend here Smile [:)]

razorkai replied on Thursday, June 01, 2006

Unfortunately google is not being as helpful as usual.  I have not been able to find anything close to a solution so far Sad [:(]  Maybe I am searching for the wrong keywords...

RockfordLhotka replied on Thursday, June 01, 2006

The first place I always look for remoting answers is Ingo Rammer's page http://www.thinktecture.com/Resources/default.html


Unfortunately google is not being as helpful as usual.  I have not been able to find anything close to a solution so far Sad <img src=" src="/emoticons/emotion-6.gif">  Maybe I am searching for the wrong keywords...

Osword replied on Monday, July 30, 2007

We're having a similar issue with our app.  We have a similar setup (.NET Remoting, SingleCall/binary over HTTP on IIS with Microsoft's NLB).  IIS fails over fine (static pages failover) but the app produces an "underlying connection closed" exception from mscorlib when we kill the services on one box.

This thread was started a while ago... did Rocky or Razorkai ever find a solution to this?  Any help would be greatly appreciated.

Oz

RockfordLhotka replied on Tuesday, July 31, 2007

I didn't research it beyond the posts you see here.

This is a known issue with Remoting, because Remoting (behind the scenes) caches the open TCP connection as an optimization.

Years ago, when Remoting was still considered a "good technology", I thought I'd read something (probably on Ingo's web site or in his book) about how to defeat the TCP connection caching. Unfortunately it has been a very long time and I don't remember specifics, sorry.

marklindell replied on Tuesday, July 31, 2007

We run Binary/HTTP remoting over NLB and BigIP routers just fine.  Do not use sticky connections and make sure you turn HTTP keep alives off in your web server.

I am not aware of a remoting issue surrounding load balancing.  We have been running in productions for 6 months just fine.

Let me know if you have more questions.

Mark Lindell

Osword replied on Thursday, August 02, 2007

Thanks, Rocky.

Mark, we're currently trying a different setup.  Glad to hear someone's got it working, though.

Can you explain why you need the F5 appliance for load balancing in addition to NLB?  Is the BigIP box doing something else?

marklindell replied on Thursday, August 09, 2007

BigIP is just an options for our clients.  We also support NLB.

We have performed two years of extensive load testing our application and never had an issue with CSLA in either environment.

Hope this helps.

Cheers,

Mark Lindell

Copyright (c) Marimer LLC