TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Rivet – Open-source game server management with Nomad and Rust

327 pointsby NathanFlurryalmost 2 years ago
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:&#x2F;&#x2F;Krunker.io" rel="nofollow noreferrer">http:&#x2F;&#x2F;Krunker.io</a>) (acq by FRVR) &amp; other popular multiplayer web games. After wasting months rebuilding dedicated server infrastructure + DDoS&#x2F;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 &amp; 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, &amp; 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 &amp; as a CDN cache to lower our S3 bill.<p>- ClickHouse used for analytics &amp; game server logs. It’s so simple, I have nothing more to say.<p>- Serving Docker images with Apache TS is simpler &amp; cheaper than running a Docker pull-through cache.<p>- Nebula has been rock solid &amp; 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 &amp; tinker with Rivet themselves. We get a lot of questions about this: [4] [5]<p>Some HN-flavored FAQ:<p>&gt; Why not build on top of Agones or Kubernetes?<p>Nomad is simpler &amp; more flexible than Agones&#x2F;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>&gt; [Fly.io](<a href="http:&#x2F;&#x2F;Fly.io">http:&#x2F;&#x2F;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>&gt; Are you affected by the recent Nomad BSL relicensing [8]?<p>Maybe, see [9].<p>&gt; 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>&gt; Do you handle networking logic?<p>No. We work with existing tools like FishNet, Mirror, NGO, Unreal &amp; Godot replication, and anything else you can run in Docker.<p>&gt; 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:&#x2F;&#x2F;github.com&#x2F;rivet-gg&#x2F;microgravity.io">https:&#x2F;&#x2F;github.com&#x2F;rivet-gg&#x2F;microgravity.io</a><p>[2]: <a href="https:&#x2F;&#x2F;github.com&#x2F;rivet-gg&#x2F;rivet&#x2F;tree&#x2F;main&#x2F;docs&#x2F;libraries&#x2F;bolt">https:&#x2F;&#x2F;github.com&#x2F;rivet-gg&#x2F;rivet&#x2F;tree&#x2F;main&#x2F;docs&#x2F;libraries&#x2F;b...</a><p>[3]: <a href="https:&#x2F;&#x2F;github.com&#x2F;rivet-gg&#x2F;rivet&#x2F;blob&#x2F;main&#x2F;docs&#x2F;infrastructure&#x2F;SBOM.md">https:&#x2F;&#x2F;github.com&#x2F;rivet-gg&#x2F;rivet&#x2F;blob&#x2F;main&#x2F;docs&#x2F;infrastruct...</a><p>[4]: <a href="https:&#x2F;&#x2F;github.com&#x2F;rivet-gg&#x2F;rivet&#x2F;blob&#x2F;main&#x2F;docs&#x2F;philosophy&#x2F;LICENSING.md">https:&#x2F;&#x2F;github.com&#x2F;rivet-gg&#x2F;rivet&#x2F;blob&#x2F;main&#x2F;docs&#x2F;philosophy&#x2F;...</a><p>[5]: <a href="https:&#x2F;&#x2F;github.com&#x2F;rivet-gg&#x2F;rivet&#x2F;blob&#x2F;main&#x2F;docs&#x2F;philosophy&#x2F;WHY_OPEN_SOURCE.md">https:&#x2F;&#x2F;github.com&#x2F;rivet-gg&#x2F;rivet&#x2F;blob&#x2F;main&#x2F;docs&#x2F;philosophy&#x2F;...</a><p>[6]: <a href="https:&#x2F;&#x2F;www.hashicorp.com&#x2F;c2m" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.hashicorp.com&#x2F;c2m</a><p>[7]: <a href="https:&#x2F;&#x2F;www.hashicorp.com&#x2F;case-studies&#x2F;roblox" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.hashicorp.com&#x2F;case-studies&#x2F;roblox</a><p>[8]: <a href="https:&#x2F;&#x2F;www.hashicorp.com&#x2F;blog&#x2F;hashicorp-adopts-business-source-license" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.hashicorp.com&#x2F;blog&#x2F;hashicorp-adopts-business-sou...</a><p>[9]: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=37084825">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=37084825</a><p>[10]: <a href="https:&#x2F;&#x2F;rivet.gg&#x2F;docs&#x2F;matchmaker">https:&#x2F;&#x2F;rivet.gg&#x2F;docs&#x2F;matchmaker</a><p>[11]: <a href="https:&#x2F;&#x2F;rivet.gg&#x2F;docs&#x2F;cdn">https:&#x2F;&#x2F;rivet.gg&#x2F;docs&#x2F;cdn</a><p>[12]: <a href="https:&#x2F;&#x2F;rivet.gg&#x2F;docs&#x2F;kv">https:&#x2F;&#x2F;rivet.gg&#x2F;docs&#x2F;kv</a>

19 comments

bcjordanalmost 2 years ago
OK, this is awesome. As a fellow game developer who learned to navigate the complexities of matchmaking and server orchestration the hard way (and begrudgingly), seeing Rivet open source a matchmaker and server orchestrator is exciting and honestly refreshing. For those outside of games, the use of modern webdev &#x2F; infra tooling is frustratingly nascent, and production-ready OSS usable by smaller-than-AAA-sized studios is even more rare, just beginning to come online (the efforts behind <a href="https:&#x2F;&#x2F;game.ci" rel="nofollow noreferrer">https:&#x2F;&#x2F;game.ci</a> are a recent shining example in game infra).<p>I&#x27;m particularly encouraged here by the tools and approaches chosen — Redis for matchmakers, ClickHouse for analytics&#x2F;logs, Rust for speedy backend operations were tools I eventually came upon as best for the job after a long and painful process of iteration with inappropriate cloud dev tooling (with basically any datastore other than Redis you will run in to issues matchmaking).<p>High traffic&#x2F;concurrency in matchmaking is a hard problem when you need fast, consistent matches. Existing industrial-sized matchmakers (Google&#x27;s OSS OpenMatch, AWS GameLift, etc.) require locking in to a very specific format or spinning up an entire K8S cluster, which for game devops teams already stretched thing is a tall ask). And for all that effort, you may discover the performance characteristics of their approaches aren&#x27;t what you need, or (as has happened to us with different game web service&#x2F;API&#x2F;middleware providers) they may choose to abruptly deprecate the service upon which you built.<p>Appreciate the dedication to making this available and the focus on helping gamedevs get up and running as fast as possible. Looking forward to playing around with Rivet and seeing where it might fit in our stack — &amp; would love to talk shop on this with anyone since I&#x27;ve been tortured by &#x2F; interested in these problems while trying to simultaneously run a game studio &#x2F; make new games &#x2F; keep everything online the last few years!
评论 #37195575 未加载
评论 #37192037 未加载
评论 #37192185 未加载
Thaxllalmost 2 years ago
The fact that this solution is based on nomad is a big red flag:<p>- no updates after December<p>- you probably won&#x27;t have the right to use nomad after that<p>- every providers offer Kubernetes managed solution, by using nomad now you&#x27;re pushing that burden to host and manage infra since no one is offering nomad services<p>Using Kubernetes is a huge advantage since all the dev ops tool can run on it, it&#x27;s tested and everyone is using it.<p>As for more flexible than Agones I highly doubt that, do you have example?
评论 #37196313 未加载
评论 #37193657 未加载
评论 #37195461 未加载
评论 #37194248 未加载
评论 #37207598 未加载
eole666almost 2 years ago
Really cool! I&#x27;ll consider it when launching my godot game. Is there any plan to support &quot;relayed multi-player&quot;, with the actual game server being one of the players, and rivet in charge of match making and making the bridge between the remote players. Like nakama : <a href="https:&#x2F;&#x2F;heroiclabs.com&#x2F;docs&#x2F;nakama&#x2F;concepts&#x2F;multiplayer&#x2F;relayed&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;heroiclabs.com&#x2F;docs&#x2F;nakama&#x2F;concepts&#x2F;multiplayer&#x2F;rela...</a>
sovietmudkipzalmost 2 years ago
Cool project (based on me skimming the documentation). I’m a hobbyist game dev whose been attempting a deploy of a simple multiplayer game on AWS, specifically gamelift, for about four months.<p>Turns out I thought I knew more than I really did thus I’ve been spending much of my hobbyist time learning more AWS. I’m pretty stubborn about a local dev experience which takes time to establish an appropriate mental model to do. So it goes. Pro tip: find your application “interfaces” and discover what tooling can be used instead of a cloud resource (e.g. a mongoDB compatible document database is the interface to which AWS DocumentDB and MongoDB are concrete implementations). I have a docker compose file I use for local dev. It’s the best setup I’ve found for myself but I am open for advice.<p>Anyways I’d just like to voice myself as a possible target audience. Being able to develop locally is important to me and the hardest parts with AWS is having little support on how exactly to do this. Assuming this is even a fair ask to make…<p>P.S. another pro tip; I use Unity + Mirror networking for my multiplayer games. GameLift requires code integrated into your game code for it to function. I use nested prefabs to handle two cases: (1) when I want gamelift code to execute and (2) when I just want to focus on writing the multiplayer code. My production code uses (1) and I usually do development in (2). (2) is a child of (1).<p>P.P.S. GameLift has a lag of about 2-3 minutes when registering my running game server in Unity editor with a “gamelift anywhere fleet” before it can receive traffic. I didn’t know about this for a while and stressed out over the inconsistency. Make sure to measure timings on this so you don’t go crazy.
评论 #37189763 未加载
nextaccounticalmost 2 years ago
When you say open source, do you mean that I can self host everything and not use your rivet.gg SaSS for anything?<p>What are the features only available in SaSS? Do you anticipate to have new features only for SaSS users? Is there a policy for releasing SaSS features to open source users?
评论 #37195447 未加载
kapilvtalmost 2 years ago
fwiw re [9] and nomad w&#x2F; HashiCorp license changes, the referenced sbom <a href="https:&#x2F;&#x2F;github.com&#x2F;rivet-gg&#x2F;rivet&#x2F;blob&#x2F;main&#x2F;docs&#x2F;infrastructure&#x2F;SBOM.md">https:&#x2F;&#x2F;github.com&#x2F;rivet-gg&#x2F;rivet&#x2F;blob&#x2F;main&#x2F;docs&#x2F;infrastruct...</a><p>lists nomad as apache 2.0, when its either MPL or BUSL depending on version.<p>also fwiw, your ci is failing, because your secrets detection ci hook is barfing on recently updated click house sha 256 in your nix file.
Brighthurstalmost 2 years ago
Wow, this is super cool. As a hobbyist game dev, I really hope to see bevy support soonish, as it has a dedicated community and is also Rust-based. Or rather, a rust crate for whatever rust-based engine wants to use it. Rust-based game engines show a lot of promise so I think the crate would be a worthwhile endeavor
评论 #37192486 未加载
nravicalmost 2 years ago
This is so cool! Out of curiosity, could you walk through your decisionmaking around using Nix and how it fits in with Rivet?
lionkoralmost 2 years ago
&gt; Apache Traffic Server is under-appreciated as a large file cache. Used as an edge Docker pull-through cache to improve cold starts &amp; as a CDN cache to lower our S3 bill.<p>I would love to know more!
opportunealmost 2 years ago
Very cool, I have an abandoned web game side project and may try to run it on this!<p>One question, am I correct in understanding you bake in the assumption that 1 lobby = 1 container? I can see how that’d be desirable for the nice properties it gives you architecturally but if your game isn’t very demanding (mine’s turn based) might that end up stranding a lot of resources?
waughpewalmost 2 years ago
So glad to see open source. Bold step.
clemo_raalmost 2 years ago
Good stuff &amp; great that you&#x27;ve gone ahead and open sourced it. Been following for a while and you seem to be steadily shipping and improving the product. Keep it up.
redgetanalmost 2 years ago
wow, this is really cool, i remember krunker going viral when it was launched and how smooth it was. definitely one of the top IO games. so really cool that you&#x27;re opensourcing this
say_it_as_it_isalmost 2 years ago
Plausible as a log store confuses me. We don&#x27;t aggregate logs. Why use a columnar database for storing logs?
singinwhalealmost 2 years ago
I would be interested in knowing how this compares to Epic Online Services (EOS). We use EOS for connecting P2P lobbies and doing server browsing. When using unreal that service is basically free. Managing game servers is of course not part of the EOS package but it&#x27;s a big question if your game really needs dedicated servers or could do with p2p lobbies. Running your own servers is quite expensive after all. Also console support is also always a concern for us so whether they check all the boxes so we can use them inside the console ecosystem would be very important to know.
评论 #37192595 未加载
ForHackernewsalmost 2 years ago
Nice to see some more good press for Nomad. IMHO it&#x27;s superior to Kubernetes for most use cases.
jordoalmost 2 years ago
Open sourced - nice!
riku_ikialmost 2 years ago
given nomad is under business license now, can Hashi come after you?
评论 #37192930 未加载
评论 #37192058 未加载
williamzeng0almost 2 years ago
Nice to see this open source :)
评论 #37191985 未加载