Hey HN!<p>Rivet is an OSS game server management tool that enables game developers to easily deploy their dedicated servers without any infra experience.<p>We recently open-sourced Rivet after working on it for the past couple of years. I wanted to share some of my favorite things about our experience building this with the HN community.<p>My cofounder and I have been building multiplayer games together since middle school for fun (and not much profit [1]). In HS, I stumbled into building the entire infrastructure powering [Krunker.io](<a href="http://Krunker.io" rel="nofollow noreferrer">http://Krunker.io</a>) (acq by FRVR) & other popular multiplayer web games. After wasting months rebuilding dedicated server infrastructure + DDoS/bot mitigation over and over, we started building Rivet as a side project.<p>Some interesting tidbits:<p>- ~99% Rust and a smidgeon of Lua.<p>- Bolt [2] – Cluster dev & management toolchain for super configurable self-hosted Rivet clusters. It’s way over-engineered.<p>- The entire repo is usable as a library. Our EE repo uses OSS as a submodule.<p>- Traefik used as an edge proxy for low-latency UDP, TCP+TLS, & WSS traffic.<p>- Apache Traffic Server is under-appreciated as a large file cache. Used as an edge Docker pull-through cache to improve cold starts & as a CDN cache to lower our S3 bill.<p>- ClickHouse used for analytics & game server logs. It’s so simple, I have nothing more to say.<p>- Serving Docker images with Apache TS is simpler & cheaper than running a Docker pull-through cache.<p>- Nebula has been rock solid & easy to operate as our overlay network.<p>- We use Redis Lua scripts for complex, atomic, in-memory operations.<p>- Obviously, we love Nix.<p>- We keep a rough SBOM [3].<p>- Licensed under Apache 2.0 (OSI-approved). We seriously want people to run & tinker with Rivet themselves. We get a lot of questions about this: [4] [5]<p>Some HN-flavored FAQ:<p>> Why not build on top of Agones or Kubernetes?<p>Nomad is simpler & more flexible than Agones/Kubernetes out of the box, which let us get up and running faster. For example, Nomad natively supports multiple task drivers, edge workloads, and runs as a standalone binary.<p>> [Fly.io](<a href="http://Fly.io">http://Fly.io</a>) migrated off of Nomad, how will you scale?<p>Nomad can support 2M containers [6]. Some quick math: avg 8 players per lobby * 2M lobbies * 8 regional clusters = ~128M CCU. That’s well above PUBG’s 3.2m CCU peak.<p>Roblox’s game servers also run on top of Nomad [7]. We’re in good company.<p>> Are you affected by the recent Nomad BSL relicensing [8]?<p>Maybe, see [9].<p>> How do you compare to $X?<p>Our core goal is to get developers up and running as fast as possible. We provide extra services like our matchmaker [10], CDN [11], and KV [12] to make shipping a fully-fledged multiplayer game require only a couple of lines of code.<p>No other project provides a comparably accessible, OSS, and comprehensive game server manager.<p>> Do you handle networking logic?<p>No. We work with existing tools like FishNet, Mirror, NGO, Unreal & Godot replication, and anything else you can run in Docker.<p>> Is anyone actually using this?<p>Yes, we’ve been running in closed beta since Jan ‘22 and currently support millions of MAU across many titles.<p>[1]: <a href="https://github.com/rivet-gg/microgravity.io">https://github.com/rivet-gg/microgravity.io</a><p>[2]: <a href="https://github.com/rivet-gg/rivet/tree/main/docs/libraries/bolt">https://github.com/rivet-gg/rivet/tree/main/docs/libraries/b...</a><p>[3]: <a href="https://github.com/rivet-gg/rivet/blob/main/docs/infrastructure/SBOM.md">https://github.com/rivet-gg/rivet/blob/main/docs/infrastruct...</a><p>[4]: <a href="https://github.com/rivet-gg/rivet/blob/main/docs/philosophy/LICENSING.md">https://github.com/rivet-gg/rivet/blob/main/docs/philosophy/...</a><p>[5]: <a href="https://github.com/rivet-gg/rivet/blob/main/docs/philosophy/WHY_OPEN_SOURCE.md">https://github.com/rivet-gg/rivet/blob/main/docs/philosophy/...</a><p>[6]: <a href="https://www.hashicorp.com/c2m" rel="nofollow noreferrer">https://www.hashicorp.com/c2m</a><p>[7]: <a href="https://www.hashicorp.com/case-studies/roblox" rel="nofollow noreferrer">https://www.hashicorp.com/case-studies/roblox</a><p>[8]: <a href="https://www.hashicorp.com/blog/hashicorp-adopts-business-source-license" rel="nofollow noreferrer">https://www.hashicorp.com/blog/hashicorp-adopts-business-sou...</a><p>[9]: <a href="https://news.ycombinator.com/item?id=37084825">https://news.ycombinator.com/item?id=37084825</a><p>[10]: <a href="https://rivet.gg/docs/matchmaker">https://rivet.gg/docs/matchmaker</a><p>[11]: <a href="https://rivet.gg/docs/cdn">https://rivet.gg/docs/cdn</a><p>[12]: <a href="https://rivet.gg/docs/kv">https://rivet.gg/docs/kv</a>