2

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?

Jan Deinhard
  • 2,383
  • 5
  • 26
  • 33

2 Answers2

1

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.

Jan Deinhard
  • 2,383
  • 5
  • 26
  • 33
0

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 :)

Istvan
  • 2,582
  • 3
  • 22
  • 29