News for hackers. Stuff that matters.
Re:Everybody gets WebSockets by ddorian43 on Thursday May 05, 2016 @05:30PM (#11639802)
Ugh, how do you shard websocket connections when you have more connection than 1 server can handle ?
Re:Everybody gets WebSockets by al_chemist on Thursday May 05, 2016 @08:57PM (#11640931)
If you use Elixir/Phoenix, you can have many servers running same code, connected with each other as Erlang nodes. When client wants to broadcast something in whole network, it is broadcasted locally but is also sent do all servers and servers broadcasts it to their local clients. It's very easy to write.
Re:Everybody gets WebSockets by ianlevesque on Thursday May 05, 2016 @07:51PM (#11640628)
It's not ideal for sure but you can use DNS to divvy it up by adding several IPs to your domain name.
Re:Everybody gets WebSockets by jmtulloss on Thursday May 05, 2016 @08:25PM (#11640787)
You can also do it out of band and have an API call that returns the server you're supposed to be connected to.