Smartfox and Amazon Elastic Load Balancer

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
willf
Posts: 14
Joined: 01 May 2010, 18:44

Smartfox and Amazon Elastic Load Balancer

Post 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
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post 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)
Lapo
--
gotoAndPlay()
...addicted to flash games
willf
Posts: 14
Joined: 01 May 2010, 18:44

Post 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.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Good to know. Sending a ping every 30 seconds doesn't sound too bad.
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply