Chapter 25 of 27 · Part 11: Organization

Teams and evolutionary architecture

How team structure shapes systems (Conway's law), who owns what, the roles of enabling and platform teams, and how an evolutionary architect guides change with principles, practices and a paved road.

key idea / coordinatorservice / good pathin progress / watch outproblem / failureneutral

Loosely coupled organizations

Microservices without a matching change in how people are organised blunt the payoff: you pay for the architecture and keep the coordination. Newman borrows a checklist from Accelerate: a loosely coupled team can do all of these on its own.

Six abilities of an autonomous teamChange designno permission neededChange designno work for othersFinish workno outside coordinationDeploy and releaseon demandTestno shared test envDeploy by daynegligible downtimeMany of these need behaviour change as well as technology: ownership, trust, tooling.

This is the stream-aligned team: one team owns the end-to-end delivery of a valuable slice of work (a part of the domain), with few hand-offs. Use the six abilities as a test of progress.

From Building Microservices, ch. 15, "Loosely Coupled Organizations".

Conway's law and team structure

Melvin Conway observed in 1968 that an organisation designing a system will produce a design that copies its own communication structure. Four groups on a compiler give a four-pass compiler. So loosely coupled organisations tend to yield loosely coupled systems, and the reverse.

Conway's lawOrg structureteams and talkSystem shapemodules and APIsshapesslowly shapes backEvidence:Loosely coupled orgs wrote moremodular software (paired products).Windows Vista: org metrics bestpredicted error-prone components.Design the org for the architecture you want, or the architecture will copy the org you have.
Reverse Conway: a print firm's website had an input, a core and an output subsystem. IT divisions grew up around those three parts, so when the business changed the system, the org structure held the old design in place. Changing the org was needed to change the system.
Geography matters: across many time zones, meetings get rare and communication becomes asynchronous. Coordination cost rises, which pushes toward autonomous, loosely coupled teams.

From Building Microservices, ch. 15, "Conway's Law", "Evidence", "Geographical Distribution" and "Conway's Law in Reverse".

Small teams and autonomy. Most developers want teams of roughly 5 to 10; Newman cites a study finding productivity worst for projects averaging 9 or more. But adding people does not scale delivery by itself: adding manpower to a late project makes it later (Brooks). The real cost at scale is coordination.

Reducing coordination between teamsTangled workAutonomous teamsTeamTeamTeamTeam 1ServicesTeam 2ServicesTeam 3ServicesFew, well-defined interfaces between teams; coordinate only at service boundaries.
People first: developers used to one language and no operations, or used to handing work over the wall, may find autonomy uncomfortable. Move gradually, start with the willing, and do not push faster than people can change.

From Building Microservices, ch. 15, "Team Size", "Small Teams, Large Organization", "On Autonomy" and "People".

Strong versus collective ownership

Strong ownership: one team owns a microservice and decides every change; outsiders ask or send a pull request the owner may accept. Collective ownership: any team may change any service, so teams must coordinate closely.

Consistency versus local optimisationCollective ownershiphigh consistency neededStrong ownershiproom for local choicesshiftSame tools everywhere, so people can move between services.Teams pick languages and styles; fewer cross-team changes.Collective ownership forces consistency and erodes microservice options.

From Building Microservices, ch. 15, "Strong Versus Collective Ownership" and "Balancing Models".

Enabling, platform teams and communities

Autonomous teams still need help. The Team Topologies vocabulary used in the book names the supporting cast around stream-aligned teams:

Team types around stream-aligned teamsStream-aligned team 1owns services end to endStream-aligned team 2owns services end to endStream-aligned team 3owns services end to endEnabling teamadvice, connecting, spotting gapsCommunities of practicepeer learning, part-timePlatform team: self-service tools for deploy, logs, authpaved road, treats teams as its usersEnabling and platform teams exist to reduce the load on stream-aligned teams.
GroupJobTime commitment
Enabling teamSurveys what teams do, connects people, spots shared pain (e.g. test data), helps rebalance local versus global choicesFull-time or ring-fenced
Community of practicePeer sharing and learning across teamsA few hours a week; fluid membership
Platform teamSelf-service tooling: desired-state deployment, log aggregation, service-to-service authFull team; has users

The platform team's users are developers, so it should collect their feedback, and judge itself by how easy shipping becomes, not by the platform it builds. As one Uswitch story put it, the company did not change its organisation to adopt Kubernetes; it adopted Kubernetes to change its organisation.

Guide, do not mandate: explain the rules and why, and let the platform make following them easy. "You must use this platform" drives people to bypass it and lose sight of the reasons behind the rules.

From Building Microservices, ch. 15, "Enabling Teams", "Communities of Practice" and "The Platform".

Shared microservices and internal open source

One service per team is the goal, yet shared services are common. Understand why before fixing it.

Why services get shared, and what to doToo hard to splitlarge monolithCross-cutting changemulti-user accountsDelivery bottleneckbacklog of changesOptions for a bottleneck on one serviceWaitif it canSplit serviceif it pays offInternal OSSpatches via PRsPluggableplug in modulesPick by how often the service changes and how long the backlog is.

You can also add people to the owning team, which is easier on a standardised stack. Internal open source copies the open source model: a small group of core committers owns the service and vets patches from outside the team. The reviewers must keep quality and consistency, and also be helpful, not gatekeepers who throw their weight around.

FactorGuidance
MaturityOpen a service to outside patches once its core is stable and changes are rare; an unstable service has no clear definition of a good patch
ToolingPull requests, inline review comments, and easy build and deploy via pipelines and a central artifact store
ReviewsPeer review (Accelerate: better results than external approval boards); pairing is the quickest form
Orphaned servicesTeams aligned to bounded contexts still own quiet services; small services are cheap to rewrite
FinanceCo had country teams all needing changes in one central service. Options: country teams contribute pluggable modules, or libraries the central service loads. The cost is that the central team still schedules the deployments and may own the production issues.

From Building Microservices, ch. 15, "Shared Microservices" through "The Orphaned Service".

Case study: realestate.com.au

Newman's 2014 snapshot of REA (an example, not a template) shows structure and architecture aligned.

REA: lines of business, squads and a delivery teamCore delivery servicesenabling team: advice, tooling, automation on AWSLOB: ResidentialSquadSquadfree choice insideLOB: CommercialSquadSquadfree choice insideLOB: OverseasSquadSquadfree choice insideBetween lines of business: async batch only. Squads own services end to end.

Because each line of business could rely on coarse, batch-style integration, it could take its services down at will. Autonomy applied to both the teams and the parts of the business, and services grew from a handful in 2010 to hundreds by 2014.

From Building Microservices, ch. 15, "Case Study: realestate.com.au".

The evolutionary architect

Architecture is the shape of the system. It happens by design or by accident, and "architecture" is also a social construct: it is the part of the design that the people building it understand and share. The architect owns the technical vision and sees the whole system, not just one facet.

Newman's image is the town planner (from Erik Doernenburg), not the designer of one building. A planner sets zones and the movement between them, and does not say which building goes where.

Architect as town plannerMicroservice boundaries are the zonesZone: Ordersteam chooses insideZone: Catalogteam chooses insideZone: Promotionsteam chooses insideArchitect spends most time here: APIs, monitoring, health between the boxes"Be worried about what happens between the boxes, and be liberal in what happens inside."

From Building Microservices, ch. 16, "What Is Software Architecture?", "Making Change Possible" to "Habitability".

Goals, principles, practices and standards

To decide well without being everywhere, give people a small framework. Strategic goals say where the business is going. Principles are a few rules that serve those goals. Practices are detailed, usually technology-specific, and change more often.

From goals to practicesStrategic goalswhere the business is goingPrinciplesfewer than 10; fit on a posterPracticescoding rules, central logs, REST by default; change oftenGoal faster delivery gives principle own life cycle gives practice isolated accounts.
LevelExampleChanges
GoalCut time to market for featuresRarely
PrincipleTeams control the full life cycle and ship independentlySometimes
PracticeDeploy each service into its own isolated cloud accountOften
ConstraintWe run on AzureHard to change; revisit now and then

Large organisations can have different practices per place (a .NET set and a Java set) under the same principles. Check progress with fitness functions from Building Evolutionary Architectures: measure a property, such as response time under 100 ms, and investigate when it leaves bounds. They support, not replace, talking to the people building it.

From Building Microservices, ch. 16, "A Principled Approach" to "Guiding an Evolutionary Architecture".

The required standard. Autonomy has limits. Decide what every microservice must do so the whole is cohesive and one bad service cannot hurt everyone.

Minimum attributes of a good citizenMonitoringcommon metrics and logsInterfacesfew integration stylesSafetytimeouts, breakers, codesone system-wide viewpagination, versioninghonest status codesKeep the inside of the box opaque; standardise what crosses the boundary.

Interfaces: one standard is good, two is tolerable, twenty is not. Safety: if one service returns a success code for an error, circuit breakers elsewhere stop working, so response codes must mean what they say.

From Building Microservices, ch. 16, "The Required Standard" to "Architectural Safety".

Governance and the paved road

Technical governance is agreeing how things are done, making sure people know, and making sure it happens. It should be a group activity led by those doing the work, and it reviews principles and tracks technical risk. The architect's best tool is making the right thing the easy thing: the paved road.

Making the right thing easyNew servicePaved roadExemplarsreal, runningTemplatetailored, wired inPlatformself-serviceOff the road is allowed, but you re-do what the road gives.Imitating good examples gets most teams most of the way.
ToolWhat it isCaution
ExemplarsReal services in production that get things right, to imitateUse real, used services, not toy "perfect" examples
Tailored templateA starter (e.g. Spring Boot plus your libraries, health, metrics, auth, pipeline)Can become a mandated monster; ideally optional, open to contributions. Shared code couples services
Service mesh / sidecarOffload common behaviour from the templateNetflix uses sidecars for non-JVM services

Netflix (JVM) and Monzo (Go) speed up new services by standardising a stack; a template per language would be needed otherwise, which quietly narrows language choice.

From Building Microservices, ch. 16, "Governance and the Paved Road", "Exemplars", "Tailored Microservice Template" and "The Paved Road at Scale".

Technical debt, exceptions and your team

Sometimes the vision loses to the deadline. That is technical debt: a short-term gain with an ongoing cost, which you want to pay down. Debt also appears when the vision changes and old parts no longer match. At REA, product owners were judged on features, so technical debt grew until they were also made accountable for technical health.

Handling exceptionsRulea ruleExceptionlog the decisionPattern emergesmany exceptionsUpdate rulechange itExample: "always MySQL" becomes "MySQL, but Cassandra for very large growth".

From Building Microservices, ch. 16, "Technical Debt", "Exception Handling", "Architecture in a Stream-Aligned Organization" and "Building a Team".

Recap

Quick check

Your company has separate front-end, back-end and database teams. What does Conway's law predict for features?
Show answer

Features need all three teams, with hand-offs and coordination, and the system will mirror those layers. Reorganise around slices of the domain (stream-aligned teams) to change the design.

A platform team says "you must use our platform". Why is that risky?
Show answer

If the platform is hard to use or does not fit, teams bypass it and lose the reasons behind the rules. Explain the rules and make the platform the easy path.

Three principles and thirty practices are written down. Which should change first when the cloud vendor changes?
Show answer

The practices: they are low-level and technology-specific, so they change more often. The principles should stay stable.