
"Should we use microservices?" comes up in almost every new project discussion I'm part of. Usually it's asked before anyone knows what the product does on day thirty. My honest answer is: probably not yet. But "not yet" is different from "never", and the interesting part is knowing what changes the answer.
What microservices actually cost
Splitting a system into services sounds like organisation. In practice you're buying a set of new problems:
- Network calls instead of function calls. Every one can be slow, fail or time out.
- Distributed data. A transaction that was one database call becomes a coordination problem across services.
- More deployment, monitoring and logging. One app has one log. Six services have six, and a request travels through several of them.
- Versioning between your own services. Now you have internal API contracts to keep compatible.
Big companies pay that price because it buys them something: independent teams, independent scaling and independent releases. A team of five building a new product usually doesn't need any of those yet.
What I build first: a modular monolith
For StaffVertex, SGS and my own projects, the starting point was one Next.js application with MongoDB. That doesn't mean one big ball of code. The idea is one deployable, many clear modules:
- Each module (billing, auth, time tracking, reports, notifications) owns its own models and logic.
- Other modules talk to it through a small set of functions, not by reaching into its collections.
- Cross-cutting rules (tenancy, permissions) live in one shared layer that everyone has to go through.
app/
modules/
billing/ // only billing touches subscriptions
timeTracking/ // owns time logs, exposes getDayTotal()
reports/ // reads through module functions
notifications/
lib/
auth.ts // can(user, "projects.view.team")
tenancy.ts // every query scoped to an org
If a module ever needs to become its own service, the boundary is already drawn. You move code, not rethink it.
Signals that it's time to split something out
Over time I've collected a few signals that make me take the question seriously. Not one of them is "the codebase feels big".
1. One part needs to scale very differently
If screenshot processing needs ten times the compute of everything else, running it inside the main app means scaling everything to feed one part. That's a real reason to separate it.
2. One part has a different reliability need
If the billing webhook must keep working even while you deploy a new dashboard, or a heavy report shouldn't be able to slow down login, isolation starts paying for itself.
3. Different teams keep blocking each other
When several teams are working in one codebase and their releases constantly wait on each other, services can give each team its own release cycle. With one team of three to five people, this isn't a problem yet.
4. A different runtime is genuinely better
Sometimes a job is just better in another language or environment, like heavy image processing, a Python ML model or a long-running worker. That's a good candidate to run separately.
5. Long or scheduled work is hurting request times
Sending thousands of emails, generating big exports or processing queues shouldn't happen inside a web request. A background worker is often the first "service" a project really needs.
Step by step, not all at once
When a split is justified, I prefer to do it gradually:
- Clean the boundary inside the monolith first. No other module touches its data directly.
- Move work to the background. Queues and workers for the slow stuff, still in the same codebase.
- Extract one service, the one with the clearest reason, and keep the old code path ready to fall back to.
- Add the observability you'll need before you need it: request IDs across services, central logs, health checks.
- Repeat only if the next split has its own clear reason.
You can plan the whole target picture up front. In fact it's useful to sketch it. But you add the pieces one at a time, when each one pays for itself.
A note on "serverless" and managed services
A lot of what used to require a separate service now comes as a managed product: file storage like R2, email providers, payment webhooks, scheduled functions. Using them is a kind of service architecture without owning the services. For small teams that's often the sweet spot. You get isolation for the hard parts and keep your own code in one place.
Questions I ask before saying yes
- What exact problem does this split solve, and can we measure it?
- Who will own and be on call for the new service?
- How will data stay consistent across the boundary?
- What happens to users when this service is down?
- Could a background worker or a managed service solve it with less effort?
If those answers are clear, go for it. If they're vague, keep the modular monolith, keep the boundaries clean, and revisit when the product tells you it's time. In my experience, it tells you much later than people expect.