Private Client · Netherlands
Microservices Done Right: A Logistics Platform That Actually Scales
Their monolith took 4 hours to deploy and a bug in billing took down the whole system. We split it into 7 microservices with independent deployment. Here's the architecture, the migration, and what we'd do differently.
Measured results
- Deployment time reduced from 4 hours to 12 minutes per service
- Independent team deployment — no more cross-team blocking
- Route optimization reduced average delivery time by 18%
- 99.9% uptime with graceful degradation per service
Challenge
The blocker
A Netherlands logistics company was outgrowing their monolith. Deployments took 4 hours, a bug in one module took down the whole system, and teams were blocking each other on every release.
Solution
The approach
We decomposed their monolith into 7 domain-based microservices with independent deployment, a message bus for communication, and a driver mobile app in Flutter.
Execution story
The logistics company had a monolith. It worked fine for the first three years. Then they grew from 50 drivers to 300, from one warehouse to five, and from 1,000 deliveries a day to 8,000. The monolith didn't scale with them.
Deployments took 4 hours because the entire application had to be built, tested, and deployed as one unit. A bug in the billing module took down the routing module because they shared the same process. Three teams (orders, dispatch, billing) were blocking each other on every release because any change required coordination across all three.
They called us when a billing bug on a Friday afternoon took down the entire dispatch system for 3 hours. Drivers couldn't get their routes. Deliveries were missed. The CTO wanted to know if microservices would fix it.
The answer was yes, but not for the reason he thought.
The diagnosis
Before recommending an architecture change, we diagnosed the actual problems:
| Problem | Root Cause |
|---|---|
| 4-hour deployments | Monolithic build + deploy pipeline |
| Cross-module failures | Shared process, no isolation |
| Team blocking | Shared codebase, shared release cycle |
| Scaling issues | Entire app scaled as one unit |
All four problems were real, and all four were addressable with microservices. But we were careful to note: microservices would solve these problems because they were organizational and deployment problems, not because they were performance problems.
"We do not recommend creating a new green-field application using a microservice architectural style. It is too complicated to start that way. A monolith-first approach should be used." — Communications of the ACM
The monolith had been the right choice for the first three years. It was the right choice to extract from now.
The architecture
We identified 7 domains based on the company's team structure and business boundaries:
| Service | Domain | Team | Tech |
|---|---|---|---|
| Orders | Order intake and management | Orders team | .NET 8, PostgreSQL |
| Routing | Route optimization | Dispatch team | .NET 8, PostgreSQL |
| Dispatch | Driver assignment and tracking | Dispatch team | .NET 8, PostgreSQL |
| Tracking | Real-time GPS tracking | Dispatch team | .NET 8, Redis |
| Billing | Invoicing and payments | Finance team | .NET 8, SQL Server |
| Notifications | SMS and push notifications | Platform team | .NET 8, MongoDB |
| Driver App | Driver mobile interface | Mobile team | Flutter |
Each service had its own database, its own deployment pipeline, and its own team ownership. Services communicated through a message bus (RabbitMQ) for asynchronous operations and through HTTP for synchronous queries.
Why .NET 8?
The company's existing team was a C# team. Their monolith was .NET. Choosing .NET 8 for the microservices meant the team could focus on learning distributed systems patterns without also learning a new language. This is an underrated consideration. Architecture changes are hard enough without adding a language change on top.
Why Flutter for the driver app?
The driver app needed to work offline (drivers lose GPS signal in tunnels and rural areas), capture signatures and photos for proof of delivery, and run on the low-end Android devices that the company's drivers used. Flutter handled all three well, and the single codebase meant the small mobile team could maintain it without splitting into iOS and Android specialists.
The migration
We used the strangler fig pattern: build a new microservice, route traffic to it, verify, and repeat until the monolith is empty.
| Phase | Service Extracted | Duration | Risk |
|---|---|---|---|
| 1 | Notifications | 2 weeks | Low (stateless, easy to extract) |
| 2 | Billing | 3 weeks | Medium (financial logic, needed careful testing) |
| 3 | Tracking | 2 weeks | Low (read-only, no write conflicts) |
| 4 | Orders | 3 weeks | Medium (core domain, high traffic) |
| 5 | Routing | 4 weeks | High (complex optimization logic) |
| 6 | Dispatch | 3 weeks | Medium (real-time, needed the driver app) |
| 7 | Driver App | 4 weeks | High (new mobile app, driver training) |
Total migration: 21 weeks. The monolith was decommissioned at the end of phase 7.
The message bus
The message bus was the key architectural decision. Instead of services calling each other directly (which creates tight coupling), services publish events and subscribe to events:
- Orders service publishes
OrderCreated - Routing service subscribes to
OrderCreatedand publishesRouteOptimized - Dispatch service subscribes to
RouteOptimizedand publishesDriverAssigned - Tracking service subscribes to
DriverAssignedand starts tracking - Billing service subscribes to
DeliveryConfirmedand creates an invoice
This means the Orders service doesn't know about Routing, Dispatch, or Billing. It just publishes an event and moves on. Adding a new service (say, a customer notification service) means subscribing to existing events, not modifying existing services.
Graceful degradation
Each service was designed to fail independently. If Billing goes down, orders still flow, routing still works, and drivers still deliver. Billing catches up when it comes back online. If Tracking goes down, dispatch falls back to manual driver assignment. If Notifications goes down, the system works — drivers just don't get push notifications.
This was the single biggest improvement over the monolith. A billing bug no longer takes down dispatch.
The numbers
| Metric | Monolith | Microservices |
|---|---|---|
| Deployment time | 4 hours | 12 minutes (per service) |
| Cross-module failures | Common | None (isolated) |
| Team deployment independence | None | Full (each team deploys their services) |
| Uptime | 97.2% | 99.9% |
| Average delivery time | Baseline | 18% faster (route optimization) |
| Time to add a new feature | Weeks (cross-team) | Days (single team) |
What we'd do differently
The migration went well, but there are things we'd change:
-
Start with the message bus, not the services. We extracted services first and added the message bus in phase 3. If we did it again, we'd set up the message bus first and extract services into it. This would have made phases 1 and 2 cleaner.
-
Invest more in distributed tracing early. We added OpenTelemetry in phase 4. By then, debugging across services was already painful. We should have added it from day one.
-
Don't split the database until you need to. We gave each service its own database from the start. For the first 3 phases, a shared database with separate schemas would have been simpler and faster. We'd split the database when the service actually needed independence, not preemptively.
-
Train the team on distributed systems before, not during. The team was a strong C# team, but they hadn't worked with message buses, eventual consistency, or distributed tracing before. We should have spent the first week on training, not the first week on extraction.
The bottom line
Microservices solved this company's problems because their problems were organizational and deployment problems, not performance problems. The 4-hour deployment time was a deployment pipeline problem. The cross-module failures were a process isolation problem. The team blocking was an organizational alignment problem.
If your problems are the same shape — deployment, isolation, team autonomy — microservices can help. If your problems are performance, database bottlenecks, or complexity, microservices will make them worse, not better.
Know why you're splitting before you split. That's the whole thing.