Alexis
Alexis

Reputation: 25233

Figuring out how many simultaneous connections Heroku can have with socket.io

I have a Node.js app on Heroku that uses socket.io. I got Heroku to work with socket.io using long-polling. Then I recently added the WebSocket module to heroku and got socket.io working with WebSockets.

My question is, how can I measure the maximum number of connections the Heroku instance is able to have simultaneously before it thrashes or decreases in performance.

Upvotes: 1

Views: 823

Answers (1)

Yuval Adam
Yuval Adam

Reputation: 165340

You'll need to have two things in place:

  1. Some sort of testing client or script that you can ask to fire up an arbitrary number of WebSockets and keep them open for the remainder of the test.
  2. Proper monitoring on your dyno's performance. For this you want to use a monitoring plugin. I like to use Librato.

After that it's just about running your test scenario and tweaking until you're satisfied with your memory and load limits.

Upvotes: 1

Related Questions