← Back to case studies

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.

MicroservicesLogisticsDevOps

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:

ProblemRoot Cause
4-hour deploymentsMonolithic build + deploy pipeline
Cross-module failuresShared process, no isolation
Team blockingShared codebase, shared release cycle
Scaling issuesEntire 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:

ServiceDomainTeamTech
OrdersOrder intake and managementOrders team.NET 8, PostgreSQL
RoutingRoute optimizationDispatch team.NET 8, PostgreSQL
DispatchDriver assignment and trackingDispatch team.NET 8, PostgreSQL
TrackingReal-time GPS trackingDispatch team.NET 8, Redis
BillingInvoicing and paymentsFinance team.NET 8, SQL Server
NotificationsSMS and push notificationsPlatform team.NET 8, MongoDB
Driver AppDriver mobile interfaceMobile teamFlutter

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.

PhaseService ExtractedDurationRisk
1Notifications2 weeksLow (stateless, easy to extract)
2Billing3 weeksMedium (financial logic, needed careful testing)
3Tracking2 weeksLow (read-only, no write conflicts)
4Orders3 weeksMedium (core domain, high traffic)
5Routing4 weeksHigh (complex optimization logic)
6Dispatch3 weeksMedium (real-time, needed the driver app)
7Driver App4 weeksHigh (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 OrderCreated and publishes RouteOptimized
  • Dispatch service subscribes to RouteOptimized and publishes DriverAssigned
  • Tracking service subscribes to DriverAssigned and starts tracking
  • Billing service subscribes to DeliveryConfirmed and 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

MetricMonolithMicroservices
Deployment time4 hours12 minutes (per service)
Cross-module failuresCommonNone (isolated)
Team deployment independenceNoneFull (each team deploys their services)
Uptime97.2%99.9%
Average delivery timeBaseline18% faster (route optimization)
Time to add a new featureWeeks (cross-team)Days (single team)

What we'd do differently

The migration went well, but there are things we'd change:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

Want a result like this for your product?

Start a conversation →