Team Topologies
Author: Matthew Skelton, Manuel Pais, and Ruth Malan
Last Accessed on Kindle: May 10 2024
Ref: Amazon Link
By explicitly agreeing on interaction modes with other teams, expectations on behaviors become clearer and inter-team trust grows.
Team Topologies provides four fundamental team typesâstream-aligned, platform, enabling, and complicated-subsystemâand three core team interaction modesâcollaboration, X-as-a-Service, and facilitating. Together with awareness of Conwayâs law, team cognitive load, and how to become a sensing organization, Team Topologies results in an effective and humanistic approach to building and running software systems.
The key takeaway here is that thinking of software architecture as a standalone concept that can be designed in isolation and then implemented by any group of teams is fundamentally wrong.
The Team Topologies approach advocates for organization design that optimizes for flow of change and feedback from running systems. This requires restricting cognitive load on teams and explicitly designing the intercommunications between them to help produce the software-systems architecture that we need (based on Conwayâs law).
âIf the architecture of the system and the architecture of the organization are at odds, the architecture of the organization wins.â
An organization that is arranged in functional silos (where teams specialize in a particular function, such as QA, DBA, or security) is unlikely to ever produce software systems that are well-architected for end-to-end flow.
Communication paths (along formal reporting lines or not) within an organization effectively restrict the kinds of solutions that the organization can devise. But we can use this to our strategic advantage. If we want to discourage certain kinds of designsâperhaps those that are too focused on technical internalsâwe can reshape the organization to avoid this. Similarly, if we want our organization to discover and adopt certain designsâperhaps those more amenable to flowâthen we can reshape the organization to help make that happen.
We have managers deciding ⌠which services will be built, by which teams, we implicitly have managers deciding on the system architecture.â
One key implication of Conwayâs law is that not all communication and collaboration is good. Thus it is important to define âteam interfacesâ to set expectations around what kind of work requires strong collaboration and what doesnât. Many organizations assume that more communication is always better, but this is not really the case.
Cohn is addressing the need to ensure that if, logically, two teams shouldnât need to communicate based on the software architecture design, then something must be wrong if the teams are communicating. Is the API not good enough? Is the platform not suitable? Is a component missing? If we can achieve low-bandwidth communicationâor even zero-bandwidth communicationâbetween teams and still build and release software in a safe, effective, rapid way, then we should.
Fast flow requires restricting communication between teams. Team collaboration is important for gray areas of development, where discovery and expertise is needed to make progress. But in areas where execution prevailsânot discoveryâcommunication becomes an unnecessary overhead.
Research by Google on their own teams found that who is on the team matters less than the team dynamics; and that when it comes to measuring performance, teams matter more than individuals.
Dunbarâs number, anthropological research shows that the type and depth of relationship we can have with people has clear limits:7 Around five peopleâlimit of people with whom we can hold close personal relationships and working memory Around fifteen peopleâlimit of people with whom we can experience deep trust Around fifty peopleâlimit of people with whom we can have mutual trust Around 150 peopleâlimit of people whose capabilities we can remember Some researchers have identified possible limits to effective social relationships at around 500 and 1,500 (there is roughly a three times multiplier at work here).
Therefore important to consciously limit the size of team groupings to Dunbarâs number to help achieve predictable behavior and interactions from those teams: A single team: around five to eight people (based on industry experience) In high-trust organizations: no more than fifteen people Families (âtribesâ): groupings of teams of no more than fifty people In high-trust organizations: groupings of no more than 150 people Divisions/streams/profit & loss (P&L) lines: groupings of no more than 150 or 500 people
Team-first software architecture is driven by Dunbarâs number. Expect to change the architecture of software systems to fit with the limits on human interactions set by Dunbarâs number. Approaches like microservices can help if applied with a team-first perspective.
Every part of the software system needs to be owned by exactly one team. This means there should be no shared ownership of components, libraries, or code.
Recent research in both civilian and military contexts strongly suggests that teams with members of diverse backgrounds tend to produce more creative solutions more rapidly and tend to be better at empathizing with other teamsâ needs.
Cognitive load was characterized in 1988 by psychologist John Sweller as âthe total amount of mental effort being used in the working memory.â22 Sweller defines three different kinds of cognitive load: Intrinsic cognitive loadârelates to aspects of the task fundamental to the problem space (e.g., âWhat is the structure of a Java class?â âHow do I create a new method?â) Extraneous cognitive loadârelates to the environment in which the task is being done (e.g., âHow do I deploy this component again?â âHow do I configure this service?â) Germane cognitive loadârelates to aspects of the task that need special attention for learning or high performance (e.g., âHow should this service interact with the ABC service?â)
Broadly speaking, for effective delivery and operations of modern software systems, organizations should attempt to minimize intrinsic cognitive load (through training, good choice of technologies, hiring, pair programming, etc.) and eliminate extraneous cognitive load altogether (boring or superfluous tasks or commands that add little value to retain in the working memory and can often be automated away), leaving more space for germane cognitive load (which is where the âvalue addâ thinking lies).
A simple and quick way to assess cognitive load is to ask the team, in a non-judgmental way: âDo you feel like youâre effective and able to respond in a timely fashion to the work you are asked to do?â
Simple and quick way to assess cognitive load is to ask the team, in a non-judgmental way: âDo you feel like youâre effective and able to respond in a timely fashion to the work you are asked to do?â
Identify distinct domains that each team has to deal with, and classify these domains into simple (most of the work has a clear path of action), complicated (changes need to be analyzed and might require a few iterations on the solution to get it right), or complex (solutions require a lot of experimentation and discovery). You should finetune the resulting classification by comparing pairs of domains across teams: How does domain A stack against domain B? Do they have similar complexity or is one clearly more complex than the other? Does the current domain classification reflect that? The first heuristic is to assign each domain to a single team. If a domain is too large for a team, instead of splitting responsibilities of a single domain to multiple teams, first split the domain into subdomains and then assign each new subdomain to a single team. (See Chapter 6 for more help on how to break down large domains.) The second heuristic is that a single team (considering the golden seven-to-nine team size) should be able to accommodate two to three âsimpleâ domains.
The first heuristic is to assign each domain to a single team. If a domain is too large for a team, instead of splitting responsibilities of a single domain to multiple teams, first split the domain into subdomains and then assign each new subdomain to a single team. (See Chapter 6 for more help on how to break down large domains.)
The second heuristic is that a single team (considering the golden seven-to-nine team size) should be able to accommodate two to three âsimpleâ domains.
The third heuristic is that a team responsible for a complex domain should not have any more domains assigned to themânot even a simple one.
The last heuristic is to avoid a single team responsible for two complicated domains. This might seem feasible with a larger team of eight or nine people, but in practice, the team will behave as two subteams (one for each domain), yet everyone will be expected to know about both domains, which increases cognitive load and cost of coordination.
âMinimize cognitive load for othersâ is one of the most useful heuristics for good software development.
The team API includes: Code: runtime endpoints, libraries, clients, UI, etc. produced by the team Versioning: how the team communicates changes to its code and services (e.g., using semantic versioning [SemVer] as a âteam promiseâ not to break things) Wiki and documentation: especially how-to guides for the software owned by the team Practices and principles: the teamâs preferred ways of working Communication: the teamâs approach to remote communication tools, such as chat tools and video conferencing Work information: what the team is working on now, whatâs coming next, and overall priorities in the short to medium term Other: anything else that other teams need to use to interact with the team
Organizations must design teams intentionally by asking these questions: Given our skills, constraints, cultural and engineering maturity, desired software architecture, and business goals, which team topology will help us deliver results faster and safer? How can we reduce or avoid handovers between teams in the main flow of change? Where should the boundaries be in the software system in order to preserve system viability and encourage rapid flow? How can our teams align to that?
âan organization has a better chance of success if it is reflectively designed.â
A cross-functional feature team can bring high value to an organization by delivering cross-component, customer-centric features much faster than multiple component teams making their own changes and synchronizing into a single release. But this can only happen when the feature team is self-sufficient, meaning they are able to deliver features into production without waiting for other teams.
The feature team typically needs to touch multiple codebases, which might be owned by different component teams. If the team does not have a high degree of engineering maturity, they might take shortcuts, such as not automating tests for new user workflows or not following the âboy-scout ruleâ (leaving the code better than they found it). Over time, this leads to a breakdown of trust between teams as technical debt increases and slows down delivery speed. A lack of ownership over shared code may result from the cumulative effects of several teams working on the same codebase unless inter-team discipline is high.
Product teams (identical in purpose and characteristics to a feature team but owning the entire set of features for one or more products) still depend on infrastructure, platform, test environments, build systems, and delivery pipelines (and more) for their work to become available to end users. They might have full control over some of these dependencies, but they will likely need help with others due to the natural cognitive and expertise limits of a team (as explained in Chapter 3).
Product teams end up frequently waiting on âhard dependenciesâ to functional teams (such as infrastructure, networking, QA). There is increased friction as product teams are pressured to deliver faster, but they are part of a system that does not support the necessary levels of autonomy.
Product teams need autonomy to provision their own environments and resources in the cloud, creating new images and templates where necessary. The cloud team might still own the provisioning processâensuring that the necessary controls, policies, and auditing are in place (especially in highly regulated industries)âbut their focus should be in providing high-quality self-services that match both the needs of product teams and the need for adequate risk and compliance management. In other words, there needs to be a split between the responsibility of designing the cloud infrastructure process (by the cloud team) and the actual provisioning and updates to application resources (by the product teams).
Low maturity organizations will need time to acquire the engineering and product development capabilities required for autonomous end-to-end teams. Meanwhile, more specialized teams (development, operations, security, and others) are an acceptable trade-off, as long as they collaborate closely to minimize wait times and quickly address issues.
Detect and track interdependencies. Spotify relies on a simple spreadsheet to detect and track interdependencies between squads and tribes. It highlights whether a dependency is on a squad within the same tribe (acceptable) or in a different tribe (potentially a warning that team design or work assignment is wrong). The tool also tracks how soon the dependency will impact the flow of the depending team.
Setting up new team structures and responsibilities reactively, triggered by the need to scale a product, adopt new technologies, or respond to new market demands, can help in the present moment but often fails to achieve the speed and efficiency of well thought-out topologies.
A stream-aligned team is a team aligned to a single, valuable stream of work; this might be a single product or service, a single set of features, a single user journey, or a single user persona. Further, the team is empowered to build and deliver customer or user value as quickly, safely, and independently as possible, without requiring hand-offs to other teams to perform parts of the work.
Generally speaking, each stream-aligned team will require a set of capabilities in order to progress work from its initial (requirements) exploration stages to production. These capabilities include (but are not restricted to):
Aligning a teamâs purpose with a stream helps to reinforce a focus on flow at the organization levelâa stream should flow unimpeded.
In this multi-channel, highly connected context, a âproductâ can mean very different things, making it hard to understand what the responsibilities of a âproduct teamâ are.
Not all software situations need products or features (especially those focused on providing public services), but all software situations benefit from alignment to flow.
An enabling team is composed of specialists in a given technical (or product) domain, and they help bridge this capability gap. Such teams cross-cut to the stream-aligned teams and have the required bandwidth to research, try out options, and make informed suggestions on adequate tooling, practices, frameworks, and any of the ecosystem choices around the application stack. This allows the stream-aligned team the time to acquire and evolve capabilities without having to invest the associated effort (in our experience, such efforts and their impact on the rest of the team also tend to be dramatically underestimated by ten to fifteenfold). Enabling
Often they are focused on more specific areas, such as build engineering, continuous delivery, deployments, or test automation for particular client technology (e.g., desktop, mobile, web).
A complicated-subsystem team is responsible for building and maintaining a part of the system that depends heavily on specialist knowledge, to the extent that most team members must be specialists in that area of knowledge in order to understand and make changes to the subsystem.
Examples of complicated subsystems might include a video processing codec, a mathematical model, a real-time trade reconciliation algorithm, a transaction reporting system for financial services, or a face-recognition engine.
The purpose of a platform team is to enable stream-aligned teams to deliver work with substantial autonomy. The stream-aligned team maintains full ownership of building, running, and fixing their application in production. The platform team provides internal services to reduce the cognitive load that would be required from stream-aligned teams to develop these underlying services.
Don Reinertsen recommends using internal pricing (for infrastructure and services) to regulate demand, helping to avoid everyone asking for premium level.15 An example could be tracking cloud-infrastructure costs by team or service.
A thick platform might consist of the combination of several inner platform teams providing a myriad of services. A thin platform could simply be a layer on top of a vendor-provided solution.
Generally speaking, teams composed only of people with a single functional expertise should be avoided if we want to deliver software rapidly and safely. Traditionally, many organizations created islands, or âsilos,â of functional expertise by grouping the staff, such as:
Most teams in a flow-optimized organization should be long-lived, multi-disciplined, stream-aligned teams. These teams take ownership of discrete slices of functionality or certain user outcomes, building strong and lasting relationships with business representatives and other delivery teams. Stream-aligned teams can expect to have cognitive load matched to their capabilities through the support and help they get from enabling teams, platform teams, and complicated-subsystem teams.
There are many kinds of monolithic software, some of which are hard to detect at first. For example, many organizations have taken the time and effort to split up an application monolith into smaller services only to produce a monolithic release further down the deployment pipeline, wasting an opportunity to move faster and safer. We need to be fully aware of what kinds of monoliths weâre working with before we start making changes.
A fracture plane is a natural seam in the software system that allows the system to be split easily into two or more parts.
It is usually best to try to align software boundaries with the different business domain areas. A monolith is problematic enough from a technical standpoint (particularly, the way it slows down the delivery of value over time as building, testing, and fixing issues takes increasingly more time). If that monolith is also powering multiple business domain areas, it becomes a recipe for disaster, affecting prioritization, flow of work, and user experience.
Splitting off subsystems or flows within the monolith that are in the scope of regulations is a natural fracture plane.
Splitting along the regulatory-compliance fracture plane simplifies auditing and compliance, as well as reduces the blast radius of regulatory oversight.
Splitting off the parts of the system that typically change at different speeds allows them to change more quickly. The business needs now drive the speed of change, rather than the monolith imposing a fixed speed for all.
Splitting off subsystems with clearly different risk profiles allows mapping the technology changes to business appetite or regulatory needs. It also allows each subsystem to evolve its own risk profile over time, adopting practices like continuous delivery that allow increasing speed of change without incurring more risk.
In products with tiered pricing, the subset is built in by design (higher paying customers have access to more features than lower or non-paying customers). In other systems, admin users have access to more options and controls than regular users; or simply, more experienced users make more use of certain features (like keyboard shortcuts) than novice users. Thus, it makes sense to split off subsystems for user personas in these types of situations.
To understand how and when to adapt the Team Topologies model for software systems, we need to define and understand three essential ways in which teams can and should interact, taking into account team-first dynamics and Conwayâs law: Collaboration: working closely together with another team X-as-a-Service: consuming or providing something with minimal collaboration Facilitating: helping (or being helped by) another team to clear impediments
The collaboration team mode is suitable where a high degree of adaptability or discovery is needed, particularly when exploring new technologies or techniques. The collaboration interaction mode is good for rapid discovery of new things, because it avoids costly hand-offs between teams.
Conwayâs law tells us that with the discovery and rapid learning that comes from the collaboration mode, the responsibilities and architecture of the software will tend to be more blended together. If clear, well-defined interfaces to services or systems between two teams is needed, then using the collaboration mode for extended periods is not likely to be the best choice.
Table7.1: Advantages and Disadvantages of Collaboration Mode
Table7.2: Advantages and Disadvantages of X-as-a-Service Mode
Table7.3: Advantages and Disadvantages of Facilitation Mode
Behavioral studies suggest that humans work best with others when we can predict their behavior. As humans, we can build trust by providing consistent experiences for others in the organization. Clear roles and responsibility boundaries help this by defining expected behavior and avoiding what some refer to as âinvisible electric fences.â
Promise theory as a way to design systems for team interaction. Promise theoryâdevised by technologist and researcher Mark Burgessâexplains how and why it is preferable to construct inter-team relationships in terms of promises rather than in terms of commands and enforceable contracts. For example, by adhering to the meaning of the major/minor/patch/build numbering indicated by semantic versioning (SemVer), the team promises not to break software that depends on their code.6
How to train for collaboration mode. Some training or coaching in basic collaboration skills such as pair programming, mob programming, and whiteboard sketchingâtogether with specific training around boundary-spanning collaborationâcan be valuable for teams interacting using collaboration mode.
How to train for X-as-a-Service mode. Some training or coaching in core user-experience (UX) and developer-experience (DevEx) practices can be valuable for teams interacting using X-as-a-Service mode.
How to train for facilitating mode. Some training or coaching in how to facilitate or how to be helped by another team can be valuable for teams interacting using facilitating mode.
The architect should be thinking: âWhich team interaction modes are appropriate for these two teams? What kind of communication do we need between these two parts of the system, between these two teams?â The architect in an organization following the Team Topologies approach is therefore the designer of team APIs that anticipate the intended software architecture.
If an organization is trying to establish a new X-as-a-Service interaction, the same pattern applies: collaborate closely to establish viable âas a serviceâ boundaries and then continue with lightweight collaboration to validate that the boundaries are effective.
The collaboration team interaction mode can be used to drive the rate of innovation of both application and platform/infrastructure, which is particularly useful for new and emerging products or service offerings.
Collaborate on potentially ambiguous interfaces until the interfaces are proven stable and functional.
Techniques from domain-driven design (DDD) such as event storming and context mapping can help accelerate awareness of appropriate boundaries. See Chapter 6 for more details on DDD.
Trigger: Software Has Grown Too Large for One Team Symptoms A startup company grows beyond fifteen people (Dunbarâs number).
Trigger: Delivery Cadence Is Becoming Slower Symptoms Team members qualitatively feel it takes longer to release changes than it used to.
Trigger: Multiple Business Services Rely On a Large Set of Underlying Services
Moving quickly relies on sensory feedback about the environment. To sustain a fast flow of software changes, organizations must invest in organizational sensing and cybernetic control.
In the The DevOps Handbook, Gene Kim and colleagues define The Three Ways of DevOps for modern, high-performing organizations:9 Systems thinking: optimize for fast flow across the whole organization, not just in small parts Feedback loops: Development informed and guided by Operations Culture of continual experimentation and learning: sensing and feedback for every team interaction
How can we encourage teams to continue to care about the software long after they have finished coding a feature? One of the most important changes to improve the continuity of care is to avoid âmaintenanceâ or âbusiness as usualâ (BAU) teams whose remit is simply to maintain existing software. Sriram Narayan, author of Agile IT Organization Design, says âseparate maintenance teams and matrix organizations ⌠work against responsiveness.â11 By separating the maintenance work from the initial design work, the feedback loop from Ops to Dev is broken, and any influence that operating that software may have on the design of the software is lost (see Figure 8.9).
First, as an organization ask yourself: What does the team need in order to: