Scrivio Interview library
DesignAdvanced6 min read · updated 12 November 2026

Your order management system is a single Spring application used by web, mobile, marketplace sellers and store staff, with 15 teams changing it. Design how you would split responsibilities into services, and how you would decide boundaries.

I would find boundaries from business capabilities and data ownership, such as ordering, fulfilment, returns, pricing and customer communication, and keep the order aggregate's invariants inside one service while other services react to order events. Splitting by technical layer or by channel spreads one business rule across services, so I avoid it. Services talk through events with versioned schemas, cross-domain queries use an order read model, extraction happens incrementally with the strangler fig approach starting with clearly bounded, fast-changing parts, and team ownership follows the service boundaries.

Why this question is asked

A single Spring application changed by 15 teams usually suffers from slow releases, merge conflicts and fear of change: a pricing tweak waits for a fulfilment fix, and every deployment is risky because it contains everybody's work. Splitting it is the obvious answer, but splitting along the wrong lines produces a distributed monolith, where services must still change and deploy together and every call crosses the network. Interviewers ask this question to see how we find the right boundaries and how we move a live system safely. In this answer, we will find boundaries from capabilities and data, keep the order's invariants in one place, see why layer and channel splits fail, connect services with events and read models, extract incrementally and align teams.

1Finding Boundaries From Capabilities and Data

A business capability is something the business does, independent of how the software is built: taking orders, pricing, fulfilling and shipping, handling returns, communicating with customers. Each capability has its own rules, its own vocabulary and usually its own data. Domain-driven design calls such an area a bounded context. These are the strongest candidates for service boundaries, because changes tend to stay inside one capability: a new returns policy touches returns, not pricing.

A practical way to confirm a boundary is to ask who owns each piece of data and who changes it together. If the returns code writes only return records and reads orders, returns is a good candidate. If two areas update the same tables in the same transactions all the time, they probably belong together. Looking at the change history of the monolith helps: files that are always changed in the same commits show where the real boundaries are.

Candidate services and what each owns
ServiceOwnsReacts to
Orderingorder aggregate, lines, status, invariantspayment and fulfilment events
Pricingprices, promotions, tax rulescatalogue changes
Fulfilmentpicking, shipments, stores, carriersOrderConfirmed
Returnsreturn requests, refunds triggersOrderDelivered
Customer commstemplates, preferences, messagesmost order events
Order read modeldenormalised views for queriesevents from all of the above
Boundaries follow capabilities and data ownership, not screens or layers.

2Keeping the Order's Invariants in One Service

Invariants are rules that must always hold, such as "an order cannot be cancelled after it has shipped" or "the order total equals the sum of its lines minus discounts". Each invariant must be enforced by one service that owns all the data it needs, inside one local transaction. If the cancellation rule lived in a channel service while shipping lived elsewhere, two services would have to coordinate on every cancellation, and races would allow a shipped order to be cancelled.

So the order aggregate stays whole in the ordering service. Other services do not change orders directly; they send commands to it or react to its events. Fulfilment listens for OrderConfirmed and publishes ShipmentDispatched, and ordering applies that to the order's state.

3Why Not Split by Layer or Channel?

Two splits look attractive and work badly. Splitting by technical layer, such as a web service, a business logic service and a data access service, means every feature change touches all three and they must deploy together, and every request now makes several network calls. Splitting by channel, such as a web order service, a mobile order service, a marketplace order service and a store order service, copies the order rules into four places. When the cancellation rule changes, four teams must change it at once, and they will drift apart.

Channels differ in presentation and in some flows, which is what backends-for-frontends are for: thin services per channel that shape APIs for that channel and call the shared business services. The business rules themselves stay in one place.

Step throughBoundaries that work
  1. Channel backendsweb, mobile, marketplace, store: shaping only
  2. Business servicesordering, pricing, fulfilment, returns, comms
  3. Eventsversioned schemas on Kafka between services
  4. Read modelsorder history and support views across domains
  5. Dataeach service owns its own tables

5 layers, from the top down. Step through them one at a time.

4Events, Versioned Schemas and Read Models

Between services, events carry what happened: OrderPlaced, OrderConfirmed, ShipmentDispatched, ReturnRequested. They are published through a transactional outbox so they are never lost, and their schemas are versioned in a schema registry (Avro, Protobuf or JSON Schema) with compatibility rules, so a producer can add a field without breaking consumers. Breaking changes require a new event version and a migration period.

Store staff and support need queries that cross domains, such as "show this order with its shipment, return and messages". Instead of each screen calling five services, a read model service consumes events from all of them and keeps a denormalised view per order. Queries are fast and the business services are not coupled to every screen.

5Extracting Incrementally With the Strangler Fig

The strangler fig approach replaces a system piece by piece: new functionality and extracted functionality go into new services, and a routing layer in front sends each request to the old or new implementation, until the old code has nothing left and can be removed. There is no big rewrite and no long freeze.

I would choose the first extraction carefully: a part with a clear boundary, little shared data and a high change rate, so the benefit is felt quickly. Customer communication is often a good first candidate, since it mostly reacts to order events and changes frequently. Pricing or returns may follow. The ordering core, with the most invariants and dependencies, usually comes last or stays as the remaining monolith. For each extraction, the new service gets its own data, kept in sync with the monolith through events or change data capture during the transition, and traffic moves over gradually behind a feature flag.

Step throughExtracting one capability
  1. Pick a capabilityclear boundary, high change rate
  2. Publish events from the monolithoutbox or change data capture
  3. Build the service with its own datafed by those events
  4. Route a share of traffic to itfeature flag, compare results
  5. Results match?
    YesMove all traffic, delete old codeNoFix and keep routing to the monolith

5 steps in order. Play them, or step through them one at a time.

6Aligning Teams With Services

Conway's law observes that systems tend to mirror the communication structure of the organisation that builds them. If the 15 teams are organised by channel, they will keep pushing rules into channel code. So the new boundaries come with team ownership: each business service is owned by one team that builds, deploys and runs it, and a team may own more than one small service but no service has several owning teams. This is what actually removes the coordination cost that motivated the split: a team can change and release its service without waiting for anyone.

7Follow-up questions

How do you know you have drawn a boundary wrongly?

The signs are services that must always be changed and deployed together, chatty synchronous calls between two services on every request, and one business rule that needs coordination across services. When that happens, it is usually better to merge the two services back or move the responsibility, rather than add more coordination between them.

Should the remaining monolith be split completely?

Not necessarily. Once the high-change, clearly bounded parts are out, the remaining core may be a well-structured modular application owned by one or two teams, and splitting it further would add network calls and operational cost without much benefit. The goal is independent teams and safe changes, not a particular number of services.

8Conclusion

In this answer, we split an order monolith by business capability and data ownership rather than by layer or channel, kept the order aggregate's invariants inside the ordering service, connected services through versioned events and served cross-domain queries from a read model. We extracted services incrementally with the strangler fig approach, starting with clear, fast-changing parts, and aligned team ownership with the new boundaries.

What to say in the interviewAbout 100 seconds aloud

Open with

I would draw boundaries around business capabilities and data ownership, not around technology or channels. For an order platform that typically means ordering, pricing, fulfilment, returns and customer communication, and I would confirm each candidate by checking who owns and changes which data, and which parts of the code change together in the commit history.

Then, if they want more

The order aggregate and its invariants, like no cancellation after shipping and totals matching the lines, stay inside one ordering service, because splitting an invariant across services means distributed coordination and race conditions. Other services react to order events or send it commands.

I would avoid splitting by layer, because every change then touches several services that deploy together, and avoid splitting by channel, because web, mobile, marketplace and store would each copy the same order rules and drift apart. Channel differences belong in thin backends-for-frontends.

Between services I would use events published through an outbox with versioned schemas in a registry, and for queries that cross domains, like the support view of an order with shipment and returns, a read model built from those events.

To get there, I would use the strangler fig approach: extract one capability at a time, starting with something like customer communication that has a clear boundary and changes often, route traffic gradually and delete the old code once results match. And each service gets one owning team, so teams can release independently, which is the real goal.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Your order management system is a single Spring application used by web, mobile...": https://scrivio-interview-library.netlify.app/architecture/backend-system-design/bc4693c314/