Page 1 of 1
Smartfox and Amazon Elastic Load Balancer
Posted: 28 May 2010, 21:06
by willf
I am trying to set up my game on smartfox to sit behind Amazon's ELB. I can connect just fine when i direct it to the load balancer but for some reason I get disconnected after a minute or so. (and not due to idle timeout from smartfox at least..)
Is there any special configuration I have to do? I currently only have 1 instance behind the load balancer - I just wanted to test to see if it would work.
Thanks
Posted: 31 May 2010, 09:57
by Lapo
I am not familiar with Amazon load balancer but it sounds like you have network problem. Maybe the balancer can be configured to keep connections alive? Or maybe it has some specific settings for disconnecting clients.
There is no particular setting from the SmartFoxServer side because this really depends on the balancer itself. With SmartFox just make sure that your <MaxIdleTime> setting is set to your preferred value (indicates how much time a user can remain idle before a server disconnection occurs)
Posted: 01 Jun 2010, 05:51
by willf
Well I actually figured out what it was.
My client sends health reports every 2 minutes or so. The MaxIdleTime is set to 5 minutes so I knew it wasn't that.
However, I read on the forums that ELB cuts the tcp connection after 1 minute of inactivity, so I had to switch my health reports to every 30 seconds or so so that it wouldn't get cut off.
Unfortunately, this is not configureable on ELB's end so this will have to do for now.
Posted: 01 Jun 2010, 08:56
by Lapo
Good to know. Sending a ping every 30 seconds doesn't sound too bad.