Credits for a one-million-connection Phoenix benchmark (open source)

Hi Fly.io team,

I’m Mandar. I maintain Stampede (GitHub - mandar1045/stampede: Load testing for Phoenix: Channels, LiveView, HTTP and WebSockets, in plain Elixir · GitHub), an open-source load tester written in Elixir that speaks the Phoenix Channels and LiveView protocols directly, so you can load test a Phoenix app with Elixir code instead of hand-rolled WebSocket frames.

I’d like to answer a question people keep asking about Phoenix with a fresh, reproducible number: how many connections can one Phoenix server hold today? Here’s what I’ve measured so far on my laptop:

  • 12,000 LiveView users on a fresh production-mode Phoenix 1.8 app, with joins under 12ms at p95 and no errors
  • 60,000 Channels connections, with no errors
  • About 42 KB of server memory per held Channels connection and about 105 KB per LiveView user

The next step is a million connections to a single Phoenix server, which needs more than my laptop. I’ve already built and tested the whole setup: the app, the scenarios, kernel and BEAM tuning, and scripts that start everything, run the test, collect the results and tear it all down. It’s in the repo under bench/million.

I’d love to run it on Fly. For a few hours I’d need one performance machine with 128 GB of RAM (256 GB to push LiveView to a million) and four or five smaller machines to generate the load. I’d publish everything: the code to reproduce it, the raw results, and a write-up of what held and what broke, credited to Fly.io.

Would you be open to giving some credits for this? Happy to share more details or adjust the plan to whatever works for you.

Thanks,
Mandar Joshi
mandar1045 (Mandar Joshi) · GitHub

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.