Pipeline & Application Architecture
A guide to improving your delivery pipeline and application architecture for Continuous Delivery
3 minute read
This guide provides steps and best practices for improving your delivery pipeline and application architecture. Please review the CD Getting Started guide for context.
1. Build a Deployment Pipeline
The first step is to create a single, automated deployment pipeline to production. Human intervention should be limited to approving stage gates where necessary.
Entangled Architecture - Requires Remediation
Characteristics
- No clear ownership of components or quality
- Delayed quality signal
- Difficult to implement Continuous Delivery
Common Entangled Practices
- Team Structure: Feature teams focused on cross-cutting deliverables
- Development Process: Long-lived feature branches
- Branching: Team branches with daily integration to trunk
- Testing: Inverted test pyramid common
- Pipeline: Focus on establishing reliable build/deploy automation
- Deploy Cadence / Risk: Extended delivery cadence, high risk
Entangled Improvement Plan
Find architectural boundaries to divide sub-systems between teams, creating product teams. This will realign to a tightly coupled architecture.
Tightly Coupled Architecture - Transitional
Characteristics
- Changes in one part can affect other parts unexpectedly
- Sub-assemblies assigned to product teams
- Requires a more complex integration pipeline
Common Tightly Coupled Practices
- Team Structure: Product teams focused on decoupling sub-systems
- Development Process: Continuous integration
- Branching: Trunk-Based Development
- Testing: Developer Driven Testing
- Pipeline: Working towards continuous delivery
- Deploy Cadence / Risk: More frequent deliveries, lower risk
Tightly Coupled Improvement Plan
- Extract independent domain services with well-defined APIs
- Consider wrapping infrequently changed, poorly tested components in APIs
Loosely Coupled Architecture - Goal
Characteristics
- Components delivered independently
- Reduced complexity
- Improved quality feedback loops
- Relies on clean team separations and mature testing practices
Common Loosely Coupled Practices
- Team Structure: Product teams maintain independent components
- Development Process: Continuous integration
- Branching: Trunk-Based Development
- Testing: Developer Driven Testing
- Pipeline: One or more independently deployable CD pipelines
- Deploy Cadence / Risk: On-demand or immediate delivery, lowest risk
2. Stabilize the Quality Signal
After establishing a production pipeline, focus on improving the quality signal:
- Remove flaky tests from the pipeline
- Identify causes for test instability and take corrective action
- Bias towards testing enough, but not over-testing
- Track pipeline duration and set a quality gate for maximum duration
3. Continuous Improvement
Use the Theory of Constraints (TOC) to continuously improve your delivery process:
- Identify the system constraint
- Decide how to exploit the constraint
- Subordinate everything else to the above decisions
- Elevate the constraint
- If a constraint is broken, return to step one
Common constraints include:
- Resource Constraints: Limited capacity of people or environments
- Policy Constraints: Policies or practices that impede flow
Further Reading
Title | Author |
---|---|
Accelerate | Forsgren, Humble, & Kim - 2018 |
Engineering the Digital Transformation | Gruver - 2019 |
A Practical Approach to Large-Scale Agile Development | Gruver et al - 2012 |
Theory of Constraints | Goldratt |