1
votes

We are expecting huge surges of traffic for our application - ~1000 websocket keepalive connections opening per second for about 15 minutes. We want to route them through ELB but are worried that we might lose some traffic (haven't run the tests yet) due to the fact that amazon won't provision enough ELB instances on time. My question is - can you force them to provision at least x ELB instances?

The docs suggest you can only get ~64k ports per ELB instance, we need ~1m in total.

Maybe I am mistaken in thinking this is necessary, and 64k is enough since ELB instance doesn't sit in the middle of the websocket connection once established (given our traffic surge characteristic). Clarification on this would be helpful too.

EDIT: The ELB instance seems to be sitting in the middle of the connection. When I close the ELB listeners the connection dies (my websocket server sees it as a client close).

1
64k ports? that the standard port range. You can receive multiple connections per port. You will only create one listener on the standard web socket port. Connection draining should also be turned on.datasage
A single node within an ELB deployment can only forward 64k concurrent connections... but then again, the same as thing is true of the termination capability of the individual back-end instances. Scaling of the ELB would not be my primary concern in this situation.Michael - sqlbot

1 Answers

1
votes
  • You can't force or control ELB provisioning from the API, it will automatically scale according to perceived traffic.
  • You can open a support ticket and request more capacity.
  • If you must handle unpredictable peaks, using more than one ELB in DNS Round Robin may help. Also consider other services more suited to scalable data ingestion, if that is the case, such as Amazon Kinesis.
  • If you use HTTP listeners, ELB will "sit in the middle". For websockets traffic, you probably want TCP listeners.
  • Mind that ELB closes idle connections automatically, consider sending "keep-alives" periodically and recovering from connection drops.