How to keep message delivery and performance reliable as number of users grow?

There’s a project for a real-time chat app using elixir and phoenix. How to keep message delivery reliable and performance smooth as the number of users grows? And how to handle things like message ordering, delivery guarantees, and managing a ton of connections? Thanks in Advance…

1 Like

Hey @Daan.T! Welcome to the forum :slight_smile:

First, I’d say phoenix is a solid choice for a realtime chat system. That beeing said it is not your finished product. It will make most things in your question a lot easier than with comparable frameworks not running on the Erlang VM (beam), but you’ll have to do the engineering to actually solve the business problems.

That it is possible, especially at scale, is something the Discord case study shows: Real time communication at scale with Elixir at Discord - The Elixir programming language

So if you have a concrete use case that you’re struggeling to implement feel free to describe it in more detail. That way it’s easier to give advice that will actually help you :wink:


As a sidenote, to get a great intro on why the beam (and by extension elixir) is so awesome for a system like yours I cannot recommend @sasajuric’s talk enough - it’s simply an awesome talk.

3 Likes

For reference, there’s also this: Building a Chat with LiveView by the very knowledgeable Sophie DeBenedetto.

Furthermore, Erlang was specifically designed to handle scaling, so a live chat app is a perfect use case for this technology. However, just because the tech was designed for something doesn’t mean it always gets built the most efficient way. Lucky for us, we get world-class documentation and a helpful community!!

Good Luck!

2 Likes