What's the best option for websocket functionality in a scalable app?
Asked by
_tea_is_steeping
I'm building an MVP for a project that will rely heavily on concurrent websocket connections. As the app grows, I need to manage a scalable number of connections efficiently. I know managed services like Pusher are user-friendly, but I'm worried about costs as I expand, especially since this is a bootstrapped project. If you were in my shoes and looking for a budget-friendly yet scalable solution, what would you choose or recommend?
Answers
While Elixir offers great scalability, Iโd suggest weighing the learning curve if youโre switching from Ruby. Have you ever worked with Elixir in production? It might be a great choice, but just be prepared for the transition if you go that route.
Reply to this answer
First off, consider whether you *really* need websockets. Sometimes server-sent events (SSEs) might do the trick without the extra overhead. Theyโre easier to handle for certain use cases if youโre looking for something straightforward. Just make sure your provider supports them well, as not all do.
Reply to this answer
If you are considering a custom backend, Iโd recommend looking into Elixir and Erlang. They can handle millions of concurrent connections efficiently and can be quite cost-effective, around a few hundred bucks a month. Plus, if youโre familiar with Ruby on Rails, the transition might not be as rough as you'd think.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions