Monoliths, modules and services
One program or many?
Shard Garden's servers have many jobs: sign-in, saves, the shop, matchmaking, leaderboards.
Remy reads about companies running hundreds of microservices: small programs that each do one job and talk to each other over the network. Should Shard Garden start that way?
Three shapes
A game's backend usually takes one of three shapes:
- MonolithOne program that does every job, deployed as one piece.
- Modular monolithStill one program, but split into modules with clear rules about which may call which.
- ServicesSeparate programs, deployed separately, that call each other over the network.
Quick check
What is a microservice?
- A small program that does one job and talks to others over the network
- A very small game
- A module inside one program
Show the answer
A small program that does one job and talks to others over the network
A service runs as its own program. A module is a part of one program, which is why a modular monolith is still a monolith.
What the network costs
A function call inside one program cannot get lost. A call between services crosses the network: it can be slow, it can fail, and it needs retries.
Each service also needs its own deploys, its own monitoring and a contract with every service that calls it. That work buys independence, but only a big team needs that much of it.
Monolith first
Martin Fowler, a well-known writer on software design, wrote in 2015: "Almost all the successful microservice stories have started with a monolith that got too big and was broken up."
And systems built as microservices from scratch, he wrote, mostly "ended up in serious trouble". The splits are easier to choose once you know where the real boundaries are.
Quick check
Fowler's advice is to start a new system as many microservices, so it never needs splitting.
- True
- False
Show the answer
False
Fowler says the opposite: start with a monolith, and split it once the team knows where the natural boundaries are.
Pick the shape
Shard Garden has three developers and no players yet. Which backend shape should Remy pick?
- A modular monolith: one program with clear modules that can be split out later
- Twenty microservices, one per feature
- No backend at all
Show the answer
A modular monolith: one program with clear modules that can be split out later
Three people cannot run twenty services well. Clear modules keep the code tidy and leave the door open to split one out when it truly needs it.
When to split
Split a part out when it must scale differently or ship on its own schedule. Shard Garden's match servers run one per garden, thousands at a time, so they are separate from day one. Everything else stays in one program.
Bolt says: Next: an API contract, the promise between two programs.
Fact-checked 12 October 2026
- Martin Fowler: MonolithFirst martinfowler.com