# How should engineering team structure change as a software system grows?

> Start with one team, then split by slice of the business, move the lines in the code with the lines between teams, add a thin platform when work repeats and watch for the signs you are behind

- Author: Ash Gaikwad (https://ashgaikwad.com)
- Published: 2023-06-02
- Topics: team topologies, conway's law, engineering leadership, platform engineering
- Canonical: https://ashgaikwad.com/blogs/how-should-engineering-team-structure-change-as-a-software-system-grows

Team structure should change in step with the system. One team that owns everything works while its people can talk to each other all day. As the system grows, split into long-lived teams that each own one slice of the business end to end (the code, the data and the on-call), draw the same lines inside the code, add a thin platform team once several teams repeat the same infrastructure work, and write down how teams ask each other for things. These changes belong together, because a system ends up shaped like the communication between the people who build it. That is Conway's law.

I am Ash, a Staff engineer in Toronto. At a company I worked at, I led a team of 7 that used domain-driven design to turn a tangled MVC codebase, in place, into one that is easy to read and maintain. On one platform I ran, all 120 services deploy through one template. In my current job I lead a move from a monolith to services, sponsored by the CTO, and it starts with one team. This article is for staff engineers and engineering leaders who see teams waiting on each other and want to know what to change first.

![Team structure grows with the system in four steps. One team owns everything and has one pager. Teams by slice each own the code, data and pager for one business slice. A thin platform is built once as self-service when many teams repeat work. Written contracts replace meetings and tickets. Move code and team lines together, starting with one team.](/images/blogs/team-structure-follows-the-system.svg)

## Why structure has to change when the system grows

Melvin Conway wrote the idea down in 1968. On [his own page for the paper](http://www.melconway.com/Home/Committees_Paper.html) he gives the short version: "Any organization that designs a system (defined more broadly here than just information systems) will inevitably produce a design whose structure is a copy of the organization's communication structure." Two parts of the paper matter for team design.

The first is that every team boundary is already a design decision. The paper says that given any team organisation, "there is a class of design alternatives which cannot be effectively pursued by such an organization because the necessary communication paths do not exist."

The second is that talking does not scale. The paper says "the number of possible communication paths in an organization is approximately half the square of the number of people". Ten people have 45 possible pairs, and forty people have 780. Past a certain size you have to restrict communication, and the restriction becomes the structure of your system.

Martin Fowler's page on [Conway's law](https://martinfowler.com/bliki/ConwaysLaw.html) adds the practical side. He says "a dozen or two people can have deep and informal communications", so they will build a monolith, and that is fine. The law starts to matter when people need organising.

## Keep one team for as long as it works

A small team that owns the whole system has no queues and no hand-offs. In my experience, the usual mistake is a reorganisation that arrives before anyone knows where the real seams are, so you draw lines and then redraw them.

Conway's paper points the same way. The first design "is almost never the best possible", so "flexibility of organization is important to effective design." Split when the pain of staying together is clear. Guides often give headcount ranges for each stage, but the only marker I could source is Fowler's dozen or two, and I trust the signs below more than a number.

## Split by slice of the business, not by layer

When one team is no longer enough, the choice of lines is the main decision. My default is to organise teams around a slice of the business, such as checkout or search, and not around a technical layer or a step in the process. Fowler explains why. Teams split by software layer produce layered structures, which is a problem because "each feature needs close collaboration between the layers". Teams split by activity (analysis, design, coding, testing) mean "lots of hand-offs to get a feature from idea to production."

Team Topologies calls the slice-owning team a stream-aligned team, which its [key concepts page](https://teamtopologies.com/key-concepts) defines as "aligned to a flow of work from (usually) a segment of the business domain". Fowler's [summary of Team Topologies](https://martinfowler.com/bliki/TeamTopologies.html) adds that it is full-stack and full-lifecycle.

Two more team types exist, and you need them less often. An enabling team "helps a Stream-aligned team to overcome obstacles" and "detects missing capabilities", so it works by coaching and should not become an approval gate. A complicated subsystem team is for work "where significant mathematics/calculation/technical expertise is needed". Add either only when a specific team keeps hitting the same wall.

The lines have to exist in the code as well. If two teams still edit the same module, you have changed the org chart and nothing else. For the domain-driven design work I mentioned, I wrote the architecture documents and ran the design reviews. If your system is still one deployable, [when a modular monolith is better than microservices](/blogs/when-is-a-modular-monolith-better-than-microservices) covers how to enforce those boundaries before you split anything out.

## Ownership means code, data and the pager

A team owns a slice only if it owns everything that can hurt the slice. That means its code, the data behind it and the production alerts. The key concepts page calls stream-aligned teams "You Built It, You Run It" teams, with no hand-offs to other teams.

On one platform I ran, I reduced on-call load by 80% by removing noisy alerts, routing each alert to the team that owns the service, and writing runbooks. Routing needs one named owner for every service, so the ownership list has to exist first. A shared rotation that pages "engineering" is a sign that ownership was never decided. I wrote more about this in [how to reduce the on-call load on an engineering team](/blogs/how-do-i-reduce-the-on-call-load-on-my-engineering-team).

## Cognitive load is the limit, not headcount

The key concepts page says "Teams can only handle so much complexity before breaking down." Fowler calls this the bright insight of Team Topologies, because full-stack, full-lifecycle teams "are often faced with an excessive cognitive load, which works against the desire for small, responsive teams."

So when a team struggles, ask first how much it owns and not how many people it has. In my opinion the signs are a team that cannot explain every service it is on call for, and new members who take long to become useful. Shrink the scope or write the knowledge down. On one platform I ran, I wrote down the standards that took new-hire onboarding from 3 weeks to 2 days.

## Decide how teams will interact

Much waiting between teams comes from nobody deciding how the two should work together. Team Topologies says there are three ways. Collaboration is "working together for a defined period of time to discover new things". X-as-a-Service is "one team provides and one team consumes something". Facilitation is "one team helps and mentors another team".

In my experience, two teams are in collaboration mode by accident whenever one needs the other's time for routine work. Make it a choice. Use collaboration for a fixed period, with an end date, when the interface is new. Use X-as-a-Service for anything routine, with an API or a document in place of a meeting. Use facilitation when one team has a skill the others need. I have mentored 5+ engineers and run design reviews, which are facilitation in this sense.

## When to form a platform team

Form a platform team when several teams repeat the same infrastructure work, such as deploy pipelines, monitoring or access control, and that work keeps them from the slice they own. Fowler says "the primary benefit of a platform is to reduce the cognitive load on stream-aligned teams". That is the test.

Start smaller than you think. Fowler says smaller organisations can work with one platform team that produces "a thin layer over an externally provided set of products". With two small teams, one strong engineer building a template is usually enough.

The platform has to be self-service. DORA's page on [platform engineering](https://dora.dev/capabilities/platform-engineering/) says it is best understood "as an internal product designed specifically for developers" and not "merely as a collection of infrastructure tickets". Fowler adds that while a platform team builds a service it may work in collaboration mode with its customer teams, as a temporary stage.

On one platform I ran, I built one deployment template with health checks, resource limits and rolling deploys. All 120 services deploy through it, so no team writes its own infrastructure. I also wrote a command-line suite as the self-service side, so engineers run common operations work themselves, and manual support during production incidents fell by over 90%. Getting teams to use a platform is a separate job, covered in [how to get engineering teams to adopt an internal developer platform](/blogs/how-do-i-get-engineering-teams-to-adopt-an-internal-developer-platform).

## Signs your structure is behind your system

The signs I look for are these. A routine change needs a ticket in another team's queue. One feature touches the code of three teams before it ships. An alert pages a group, or nobody can say which team a page belongs to. Two teams edit the same module and argue about who reviews it. A new engineer cannot tell who owns what.

DORA's page on [loosely coupled teams](https://dora.dev/capabilities/loosely-coupled-teams/) describes the opposite. Its teams "can make large-scale changes to the design of their systems without the permission of somebody outside the team", are "able to complete work without needing fine-grained communication and coordination with people outside the team", and "deploy and release their product or service on demand, independently". Each sign above breaks one of those lines.

## What it costs and what I would not do

Changing the structure around an existing system is slower than drawing it. Fowler warns that with a rigid architecture, changing the organisation "isn't going to be an instant fix" and may leave a mismatch between developers and code. He recommends "taking small steps while being vigilant for feedback."

I would not reorganise everything at once. In my current job the move from a monolith to services starts with one team. I got the plan agreed with product, design, customer support and engineering leadership, and I keep those groups current as each part moves. A reorganisation touches everyone's work, so the people around the team need to hear about it from you.

Three costs come with the change. Independent teams solve similar problems differently, so shared templates and written standards are how you limit the drift. More teams means more interfaces, and Conway's paper is clear that coordination "appears to lower the productivity of the individual in the small group". A platform team can become a queue of requests, the thing it was meant to remove.

I would also not split by layer, since that builds hand-offs into every feature, and I would not build a large platform before there are teams with a shared problem. Nor would I make one architecture committee the gate for every decision, because it turns the people who understand the system into the bottleneck.

## How to tell it worked

Use the DORA list as a test. Can a team change its own design without asking anyone? Can it deploy on demand, and do most of its testing "on demand, without requiring an integrated test environment"? Then count what the structure was meant to reduce, such as requests in other teams' queues, pages per team and days from asking for a change to having it testable, before and after.

## A plan for the first month

1. List every service, database and alert with its owning team, and mark the ones with no owner or two owners.
2. Pick the one slice of the business with the most waiting, and make a single team own its code, data and on-call. Keep that team together long enough to learn the slice.
3. Enforce the boundary in the code, so other teams reach that slice through an API or a documented interface.
4. Write down how each neighbouring team will interact with the new team, and put an end date on any collaboration.
5. Watch what the new team keeps asking others for. When three teams ask for the same thing, build it as a template.
6. Measure the same questions and counts, then pick the next slice from what you saw.

If you need the people around you to agree, [how to lead a technical initiative across several teams](/blogs/how-do-i-lead-a-technical-initiative-across-several-teams) covers finding a sponsor and starting with one team. A reorganisation is a design, so draw it in pencil first.

## Frequently asked questions

### Does Conway's law mean I should reorganise to get the architecture I want?

You can. It is called the inverse Conway manoeuvre, and DORA describes it as designing team structures "to promote the expected architectural state". Fowler says it is not an instant fix for a rigid system, so change the teams and the code together, in small steps.

### How big should a team be?

Fowler says a stream-aligned team ideally is a "Two Pizza Team". Cognitive load is the better limit, so if a team cannot hold its slice in its head, shrink the slice before you add people.

### Who owns on-call for a service that many teams use?

One named team, and its alerts page that team. For shared infrastructure the platform team is the usual owner. A rotation shared by everyone means ownership was never decided.
