Heroku recently started to support WebSockets
As I understand any runtime application (client side) will keep this WebSocket open to communicate with the server. And the server will have a socket open to communicate with a client side.
Also, As I know Heroku dyno handled just one open socket previous. All requests were handled serially.
Obviously, it's not gonna fly with WebSockets (it will require 100 dynos to server just 100 simultaneous users).
And I can't seem to find info, on how many WebSockets are allowed per dyno for Heroku.
Have you seen any info on this subject?
Update 1
Oh.. I found some unofficial statistics: http://veldstra.org/2013/10/25/heroku-websocket-performance-test.html
Still looking for some more official info.
Heroku Routers limit the number of active requests per dyno to 50. There is no coordination between routers, however, so this request limit is per router.
In terms of concurrent connections there is a theoretical limit of 50 connections per Heroku router instance but we don't currently publicise the number of router instances running at any one time.
By default, applications are limited to 100 total dynos across all process types. Additionally, a single process type that uses performance dynos can't be scaled to more than 10 dynos. Submit a request to raise this limit for your application.
For more details on the WebSocket protocol refer to RFC 6455, which is the version supported on Heroku.
Maximum WebSocket connection would be limited by their concurrent connection limit and server resource of your dyno.
I contacted Heroku support team and they replied me (Sep 19, 2016):
There are no limitations on the free dyno tier in terms of resources. In terms of concurrent connections there is a theoretical limit of 50 connections per Heroku router instance but we don't currently publicise the number of router instances running at any one time. In general, for the EU region you can expect to have around 1500 connections available at any given time."
Later he clarified, this limit is for all dyno types. Even paid ones.
I use NodeJs because it can handle many concurrent connections with low server resource. So, quite a lot users can connect at the same time.
You need to run stress test/load test on your server to get an idea of the limit. There are tools which can help you to run such tests or you can design simple test yourself.
Heroku Routers limit the number of active requests per dyno to 50. There is no coordination between routers, however, so this request limit is per router. I think they also select the routers randomly.
Oh.. I found some unofficial statistics: http://veldstra.org/2013/10/25/heroku-websocket-performance-test.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With