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

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

Smartfox and Amazon Elastic Load Balancer

Postby willf » 28 May 2010, 21:06

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: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 31 May 2010, 09:57

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

Postby willf » 01 Jun 2010, 05:51

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: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 01 Jun 2010, 08:56

Good to know. Sending a ping every 30 seconds doesn't sound too bad.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 42 guests