Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We are running our servers on AWS EC2 instances. The servers have to provide HTTP on port 80 and RTMP (TCP) on port 1935.

Running a single instance works fine. But as soon as I use Elastic Load Balancing to balance the load between two EC2 instances the RTMP (TCP) connection gets lost after a minute. Even though our application should tolerate disconncts it does not right now.

Using haproxy to balance the load we do not experience these early disconncts. Elastic Load Balancer is attractive to us because of the auto-scaling feature though.

Any suggestions why this disconnects happen when we're using AWS Elastic Load Balancer?

share|improve this question
    
The heartbeat solution works fine. –  Jan Aug 2 '10 at 15:04
add comment

2 Answers

up vote 1 down vote accepted

Thanks to l1x I found the answer myself on the AWS Developer Community forum.

It sounds like what is happening is that the connection is timing out.

If there is no data written or read on the connection to the loadbalancer in 60 seconds the connection is closed.

You could send some sort of heartbeat data to the socket periodically to avoid the connection from being closed. What kind of requests are you performing that take longer than 60 seconds and do not send/receive any data?

AWS Developet Community

According to the froum thread AWS engineers are investigating this issue nevertheless. Maybe the timeout is configurable in the near future.

For now I'll try the heartbeat solution.

share|improve this answer
add comment

You need to investigate this issue deeper by asking them to provide support for you I guess. This is too little information to answer your question remotely :)

share|improve this answer
    
You are right. Unfortunately I can't use premium support atm. But I posted the question in the public AWS forum. –  Jan Aug 1 '10 at 9:43
    
@Jan, you can write me an email if need more help with this. –  Istvan Aug 1 '10 at 11:05
    
That's kind of you. I think I have the answer to the problem. –  Jan Aug 1 '10 at 18:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.