How to Draw a Service Boundary Your Team Can Keep
Rowland Adimoha / November 30, 2026
14 min read
Rowland Adimoha / November 30, 2026
14 min read

Your team needs to change how refunds work. Billing says the refund belongs in billing. Orders says it belongs with the order, because the order holds the state the refund reads. Both engineers have a diagram, and both diagrams survive a whiteboard review.
The question that decides between them is which boundary your team can keep for the next three years. Most teams answer it by drawing boxes first and checking the arrows later. The arrows are where the cost lives, and by then the org chart has already made the decision.
TL;DR. Draw the boundary around the data that must change together, because a transaction cannot span two services without a workflow you then build and operate. Check that the team owning each side can change its side alone for most changes. Keep a module boundary inside one deployable until real changes show that the seam holds. Conway's law will make team conversations match the boundary you draw, so draw one the team can staff and talk across. Write down the signals that would move the line, and review them every quarter.
Here is the frame the rest of this piece uses. A service boundary is a promise about change. It says which things change together and which things can change apart. Each way of cutting a system answers "what changes together?" differently, and each answer carries a cost that lands at a different time.
Diagram of an order total that equals the sum of its lines, with billing and orders on either side of a crossed-out shared commit.
An invariant is a rule that must hold over some set of data at all times. An order's total equals the sum of its lines. A refund never exceeds the amount captured. Inside one database, the engine checks these rules on every commit. If the transaction fails, nothing is left half done.
Put the two halves of a refund in two services, and the engine no longer sees both halves. Nothing checks the rule across the network unless someone builds the check. The usual tool is a saga. Garcia-Molina and Salem described sagas in 1987. A saga replaces one atomic commit with a sequence of local steps, and each step has a compensating step that semantically undoes it if a later step fails.
Here is what that looks like for the refund. Orders marks the line as refunding. Billing sends the money back to the card. If the card provider rejects the call, orders must undo its own step, and it must do that even if its service restarted in the middle. The undo is a business action. Returning the line to active is one example. It runs as a new write, because the first write has already committed. Each step needs an undo, and each undo needs a test. A refund that stops halfway is visible to customers, to support staff, and to the on-call engineer who has to explain it.
Animated diagram of a refund moving from orders to billing to the card provider. The provider rejects it, and undo packets travel back to billing and orders.
Sagas work. They also carry costs that you pay every day. You write each compensation, and then you test it. Readers can see the state between steps, so the interface has to handle a half-finished refund. Someone on call has to reason about a workflow that stopped in the middle, and that reasoning takes longer than reading a single transaction log.
Those costs make the invariant the first test of a boundary. If a rule needs atomicity, its data belongs on one side of the line. If you cannot draw the line that way, you have found a reason to keep the code together for now.
The invariant test is only the first filter. Two teams can each own a side of a clean line, and the line can still be the wrong one for the people who staff it. So who should own each side?
Three cuts appear often. Each one is valid under some conditions, and each one lands the refund in a different place.
The first cut keeps a module boundary inside a single deployable. Billing and orders become two packages that talk through a narrow internal API. The refund stays in one transaction, and the compiler checks every call. The cost is a shared release train and a shared scaling profile. Teams wait on each other at deploy time, and a slow refund path can slow the order page. Martin Fowler made the case for starting here in 2015. "Almost all the successful microservice stories have started with a monolith that got too big and was broken up." He gave the reason that matters most for this decision: "even experienced architects working in familiar domains have great difficulty getting boundaries right at the beginning."
The second cut follows team ownership. Billing is one service that the billing team ships alone, and orders is another that the orders team ships alone. This buys independent releases and one clear owner for each pager. It costs every invariant that crosses a team line. The refund becomes a workflow between two teams, and both teams wake up when it fails. The team lines are also a staffing decision. When the company reorganizes, the boundary moves whether or not anyone planned it.
The third cut follows invariants. Each service owns one rule and the data that must stay consistent with that rule. The refund rule lives with the money, and the line rule lives with the order. This keeps transactions local, and every rule gets one owner. It costs the alignment with teams, because a rule can sit between the work of two teams. You then need a team that owns the rule outright, or a contract that both teams accept and maintain. Headcount can force two of these services back together.
My default is the first cut for a new domain. The third cut wins when an invariant spans teams that can each own a rule. The second cut wins when every invariant lives inside one team. The choice depends on a force that lives in the org chart, which is where the next section starts.
In 1968, Melvin Conway argued that a system's design follows the communication structure of the organization that builds it. His thesis, in the paper, reads: "organizations which design systems (in the broad sense used here) are constrained to produce designs which are copies of the communication structures of these organizations." He also gave a criterion for organizing the work: "a design effort should be organized according to the need for communication."
The mechanism is direct. Two teams that never talk do not negotiate an interface, so their services have no contract between them. Teams that talk often build a detailed interface, and the interface gets more detailed with every conversation. The boundary you draw must therefore sit on conversations that already happen, or on conversations you can staff this year.
Conway describes a constraint that applies over time. Teams can change who talks to whom, but that takes a reorganization, a standing meeting, or a shared on-call rotation, and each one costs something. A boundary that needs a new conversation is a boundary with a price, and the price should appear in the decision.
Test a proposed boundary with three recent changes. For each one, list every person who had to talk to someone on the other side to ship it. If the boundary asks for a conversation the organization does not have, the code will drift back toward the org chart. The boundary then decays in place, and nobody declares it dead. Pull requests start to carry changes for both sides. Reviewers from the wrong team approve them, and the diagram keeps showing the original line.
Conway tells you what the organization will produce. The next question is where the words change, because that is where the organization already draws its own lines.
Domain-Driven Design starts from the claim that one model cannot cover a large business. Martin Fowler summarizes Eric Evans's point this way: "total unification of the domain model for a large system will not be feasible or cost-effective." Fowler also names the factor that usually draws the lines. "Usually the dominant one is human culture, since models act as Ubiquitous Language, you need a different model when the language changes."
Fowler gives a concrete case from his early career. At an electricity utility, the word "meter" meant the connection between the grid and a location, the connection between the grid and a customer, and the physical device that could be replaced when it was faulty. Those meanings collided once they reached software. The conversation smoothed them over. The code could not.
Suppose billing and orders both use the word "refund." In billing, a refund is money sent back to a card. In orders, a refund is a cancelled line that releases stock. Both teams can say the word in a meeting and mean their own thing, and the meeting still works. The code cannot.
The test is simple. Write one sentence about the same event from each side of the proposed line. If one word carries two meanings across the line, you have found a seam. The two meanings should also have two names in the code, and the seam should sit where the rename happens.
Pair the vocabulary test with the invariant test. The best seam sits where the vocabulary changes and every invariant that matters stays on one side. Count the invariants that cross the seam. Zero is a strong result. A few means you either re-model the rule or keep the seam as a module for now. Several means the seam is wrong, however clean its name looks on the diagram.
Vocabulary shows where the words change. It does not show what breaks when the line is wrong. That appears later, and it looks like chatter.
Three services in a chain, each hop labeled, with 99.9 percent times three equals 99.7 percent.
When a boundary is wrong, the first sign is rarely an outage. It is a pull request that touches both sides, a release that waits on another team, or a rollback that breaks a neighbor. The cost builds for months before anyone calls it a design problem.
Latency and availability both add up. A request that crosses services in sequence pays for each hop. If three services each succeed 99.9 percent of the time, and their failures are independent, a request that crosses all three succeeds about 99.7 percent of the time. That is 0.999 times 0.999 times 0.999. Each extra hop in the request path takes a small bite out of the success rate, and the bites accumulate. The same arithmetic explains why a refund that crosses four services fails more often than one that crosses two, even when every service looks healthy on its own dashboard.
Shared data is the other common sign. If two services read and write the same tables, you have one service split in two. Schema changes then need coordinated deploys, and nobody owns the table. The boundary exists on the diagram and not in the database.
Four signs say the line is wrong. I use them as heuristics, not measured thresholds.
Each sign points to a cost you can count in engineer hours and incident minutes. None of them tells you whether moving the line is worth what it takes. For that, you need a decision with a stated trigger.
Pick a default before the first diagram. For a new domain, I start with a module boundary inside one deployable. A network hop costs you on every request, and a separate release pays off only once the teams are large enough to need one. The boundaries are also the part most likely to be wrong at the start. Fowler's point applies here. Early boundaries are hard to get right, and a monolith makes them cheap to move.
Cut into services when the invariant lives entirely inside one team. The team can then ship its service alone, and nothing crosses the line except calls the team chooses to make. Cut along invariants when a rule spans teams and each team can own a part of it under a contract both sides accept. I would not pay for a service split that changes no invariant. I would also not draw a boundary that no staffing plan can keep, because the code will drift toward the people anyway.
Applied to the refund, the decision looks like this. If one team owns both the money and the order, the module cut wins for now. If billing and orders have separate owners who will stay separate, the invariant cut wins, and the team must own the refund rule explicitly, with a written contract for the states the other side may see. The team cut is the trap. It looks clean on the org chart, and it turns the refund into a cross-team workflow on the first bad day.
Decision tree for the refund cut. If one team owns both sides of the rule, use a module cut. If not, use an invariant cut with one owner per rule and a written contract. The team cut is the trap.
Write the revisit conditions in the design doc header, next to the decision. Two signals are enough for most boundaries. The first is the count of changes that touch both sides. The second is the count of times one team waited on another for a release. Pick a window, such as a quarter, and look at both numbers at each review. If the numbers rise, move the line or accept the cost in writing. The trigger is a judgment you make and record, and you should expect to adjust it the first time it fires for the wrong reason.
When the line is already wrong, moving it costs more than drawing it did. Merging two services back into one module is usually cheaper than splitting one apart, because the call path already exists in code and only the deploy boundary changes. Fowler suggests a middle step as well. Start with a couple of coarse services, larger than you expect to end with, and split them once the boundaries stabilize. That keeps the number of contracts low while you learn where the seam really is.
Moving data across a line needs its own plan. Copy the rows, dual-write for a period, compare the reads from both paths, and then switch. Keep the old path until a full cycle of reconciled totals has passed. For the refund, pick a day when nobody is closing the books, and write the reconciliation query before the cutover, not after.
Pick the boundary your team argues about most. Write the invariant it protects in one sentence. Pull the last three changes that touched both sides of the line. Then write the two signals that would reverse the decision, and put them at the top of the design doc. That takes an afternoon, and it leaves the next person a reason to keep the line or move it.