Wednesday, May 16, 2012

Large number of WebSocket connections

I am writing an application that keeps track of content pushed around between users of a certain task. I am thinking of using WebSockets to send down new content as they are available to all users who are currently using the app for that given task.



I am writing this on Rails and the client side app is on iOS (probably going to be in Android too). I'm afraid that this WebSocket solution might not scale well. I am after some advice and things to consider while making the decision to go with WebSockets vs. some kind of polling solution.



Would Ruby on Rails servers (like Heroku) support large number of WebSockets open at the same time? Let's say a million connections for argument sake. Any material anyone can provide me of such stuff?



Would it cost a lot more on server hosting if I architect it this way?



Is it even possible to maintain millions of WebSockets simultaneously? I feel like this may not be the best design decision.



This is my first try at a proper Rails API. Any advice is greatly appreciated. Thx.





No comments:

Post a Comment