Hey folks, I’ve been a long-time mostly-lurker on these forums, but I know we’re always looking for examples of Elixir running in production. I’ve built and been running a product for the last two years, Approximated.app, which runs on Elixir/Phoenix and I thought might be another good example.
What it does
It lets you easily automate custom domains at scale for any web application.
Example use cases: blog hosts, marketplaces, cloud dev environment providers, SAAS apps of all kinds.
The stack
- Elixir, Phoenix, Ecto
- Oban for queueing
- Liveview for dashboard UI
- Customized Caddy server builds for proxy server clusters
- Fly.io for distributed instances
- Postgres for cloud DB, SQLite or Postgres for on-prem enterprise version
Some interesting stats:
- It currently serves over 200,000 custom domains
- The main Elixir app manages hundreds of globally distributed proxy clusters (at least one per customer)
- Millions of requests per day go through the clusters
- Over a billion Oban jobs run so far (most tasks get queued, got to monitor every domain too)
- 99.87% average uptime for each domain
- I suspect this is actually higher, but current monitoring is in 5 min increments so sometimes a regular internet networking blip for a single request shows as 5 mins of downtime on the charts
- One developer so far (me)
Engineering stories
- Early on I deployed a bug that, under the right circumstances, pretty much guaranteed that all CPU would be maxed out no matter what resources were thrown at it. This manifested one night while I was sleeping. 8 cores were maxed out for 8 hours, but no one noticed because of the process scheduling built into the beam. To users, everything was just working as it should.
- I’ll add some more when I have time!
I’m not sure what people might want to know, but if anyone has any particular questions they want answered just let me know and I can update this to reflect!