Cloud Design Patterns: Reusable Fixes, With Strangler Fig and Sidecar
A pattern is a named, proven answer to a problem that keeps coming back. See how Strangler Fig and Sidecar solve two common cloud problems.
In short
A cloud design pattern is a named, proven answer to a problem that keeps coming back, such as Strangler Fig for replacing legacy systems and Sidecar for helper tasks.
12 min readFree
What You Will Learn
Cloud design patterns are named, reusable answers to problems that come up again and again when teams build systems on cloud infrastructure. In this lesson you will learn what a pattern is and why cloud systems create their own repeated problems. You will also see two patterns in practice: Strangler Fig, which replaces an old system safely, and Sidecar, which places helper jobs beside an app. A worked example walks through both.
Read the key words first. Each one appears later in the lesson.
Key words
- Cloud
- Computers that a provider owns and runs. You rent them and reach them over a network.
- Design pattern
- A proven solution to a problem that keeps coming back, with a name so teams can talk about it.
- Cloud design pattern
- A design pattern written for systems that run on cloud infrastructure.
- Legacy system
- An older working system that people still depend on, often hard to change.
- Monolith
- One large application where all features live together and deploy as one unit.
- Facade
- A single entry point that receives requests and forwards each one to the right backend. It is also called a proxy.
- Downtime
- A period when users cannot use the system.
- Decommission
- Shut a system down for good and remove it.
- Cross-cutting concern
- A job that many parts of an app need, such as logging or settings.
- Sidecar
- A helper process or container that runs beside the main app.
- Container
- A packaged unit that runs one program with the files it needs, kept apart from other programs.
- Metrics
- Numbers that describe how a running system behaves, such as how many requests arrived or how many failed.
What Is a Design Pattern?
A design pattern is a solution that people have tried, tested, and given a name. The name matters. When an engineer says 'put a facade here', the team can picture the same shape without a long explanation. Cloud design patterns apply this idea to cloud systems. Patterns address recurring problems in cloud-native applications.
A pattern is not a rule you must follow. Microsoft's Azure catalog presents each entry with the problem it solves, the things to think about before using it, and an example built on its cloud services. Each pattern in this catalog describes the problem that it addresses, considerations for applying the pattern, and an example based on Microsoft Azure services and tools.
Every pattern also has a price. Teams use patterns to make deliberate choices, accepting a cost in one area to gain something in another. Some patterns might introduce trade-offs that affect the goals of other pillars. So the question is never only 'does this pattern work?' It is also 'what does it cost us?'
Why Do Cloud Systems Repeat Their Problems?
Why do cloud systems keep producing the same problems? The reasons are simple. Cloud systems are spread out, they break, and they change size.
Spread Out
Parts of the system run across many machines, sometimes in several zones or regions, and they talk to each other over a network. Services run across zones or regions.
Things Break
A machine or a network link can fail at any time. A sound design plans for breakdowns instead of assuming none will happen. Designed for failure, not perfection.
Changing Size
Capacity grows and shrinks with demand, so the design has to cope with a system that keeps changing size.
Microsoft's microservices guidance names similar challenges, including failures that spread from one part to another and the work of connecting new parts to an older system during a move. That independence changes how you handle the following common architectural challenges, and both problems appear in the patterns below.
Strangler Fig: Replace a Legacy System Piece by Piece
Strangler Fig is a pattern for moving away from a legacy system one step at a time. You build the new system beside the old one and slowly send more work to it. Old systems age. Their tools and hosting can become outdated, and every new feature makes them harder to change. Strangler Fig supports incremental migration from a legacy system by gradually replacing specific pieces of functionality with new services.
The pattern works through a facade. Clients keep talking to one address. The facade decides, request by request, whether the old system or the new one should answer. A Strangler Fig facade routes client requests between the legacy system and the new system.
- 1
Place the facade
Put a facade between the clients, the old system, and the new system. The Strangler Fig pattern begins by introducing a façade (proxy) between the client app, the legacy system, and the new system. At first, most requests still go to the old system.
- 2
Move one piece at a time
Pick one feature, build it in the new system, and send its requests there. The facade routes some requests to the legacy system and other requests to the new system. Repeat with the next feature, so the new system takes a growing share.
- 3
Retire the old system
When every feature has moved and nothing depends on the old system, you decommission it. The facade routes them all to the new system.
- 4
Remove the facade
Finally, take the facade out and point clients straight at the new system. The client interacts directly with the new system. The migration is then complete.
Tip
Before you start, check that you can intercept the old system's requests. If no route exists to send traffic through, and you cannot change the old system, this pattern will not work well.
The facade is a temporary structure, and it costs something to run. Think of it as a short-term part of the design. Compare the safety it buys with the extra servers it needs while it stands. Conceptualize this as transitional architecture, and balance this architecture's risk mitigation benefits against its temporary infrastructural costs.
Tip
Do not let the facade become a bottleneck or a single point of failure. If it goes down, every client goes down with it, so it needs the same care as the systems behind it.
Why Not Simply Rewrite Everything?
A big-bang rewrite replaces the whole system in one switch. If something goes wrong, every user feels it at once. Strangler Fig takes a controlled and phased approach to modernization, so each step is small enough to check and, if needed, undo.
What Is a Sidecar?
A sidecar is a helper that runs next to your main application. It runs as its own process or its own container, on the same host as the app. Sidecar deploys helper components of an application as a separate container or process to provide isolation and encapsulation. In plain words, the helper stays apart from the app's code but works with it.
Why bother? Many apps need the same extra jobs, such as writing logs, routing network traffic, and reading settings. If each app carries its own copy of that code, the same effort repeats and each app gets tied to one language. A sidecar takes those shared jobs out of the app, which keeps the app code simple.
Logging means writing down what happened. Proxying means a helper sends or receives network traffic on the app's behalf. Configuration means the settings an app reads when it starts. These are cross-cutting concerns, because every service needs them. A close relative of this idea, the Ambassador pattern, uses a helper service that sends network requests on behalf of a consumer.
Why a Sidecar Fits Cloud Systems
Why does a sidecar fit cloud systems so well? Its benefits show up in four areas.
Language Neutral
One sidecar design can serve apps written in different languages. You can use one sidecar implementation across applications written in different languages.
Shared Resources
The helper can reach the same resources as the app, so it can watch the system use that both parts depend on. For example, the sidecar can monitor system resources that both components use.
Short Distance
The sidecar's proximity to the primary application minimizes communication latency.
Separate Upkeep
You can update the helper without changing or redeploying the app itself. You can update and maintain the sidecar independently of the application.
Each copy of an app gets its own sidecar, and the two start and stop together. Each application instance gets its own sidecar instance that shares its life cycle. This keeps the helper matched to the app it serves.
Tip
Keep the sidecar focused on shared jobs. If you start putting the app's business rules into the sidecar, you rebuild the tangle the pattern was meant to remove.
Quick check
Several small services are written in different languages. The team wants every service to send its logs to one place, without changing each service's code. Which choice fits best?
Worked Example: An Online Retailer Moves Order Tracking
An online retailer runs an old monolithic checkout. It works, but every change to it is risky. The team wants to add a new order tracking service without breaking checkout for live customers. It uses Strangler Fig to move the feature, and a sidecar to handle the new service's logs and metrics.
- 1
Add the proxy
Place a routing proxy in front of the old checkout. Customers now call the proxy's address. At first, every request still reaches the monolith.
- 2
Build the new service
Create an order tracking service that answers only tracking questions. It lives in its own project, so it can be changed and deployed alone.
- 3
Route one feature
Tell the proxy to send tracking requests to the new service. Everything else still goes to the monolith. The rule is small and easy to undo.
- 4
Add the sidecar
Deploy a sidecar container beside the tracking service. It collects the service's logs and metrics and ships them to a central place. The tracking code contains no shipping logic.
- 5
Repeat, then retire
Move the next feature the same way. When nothing depends on the monolith, decommission it and remove the proxy.
# A routing rule, like the one the proxy uses
LEGACY = 'old-monolith'
NEW = 'order-tracking-service'
MOVED_PATHS = {'/orders/track'}
def route(path):
if path in MOVED_PATHS:
return NEW
return LEGACY
for path in ['/cart', '/orders/track', '/checkout']:
print(path, '->', route(path))
Output
/cart -> old-monolith /orders/track -> order-tracking-service /checkout -> old-monolith
Look at what changed. Only one path moved. The cart and checkout paths still reach the old system, so customers see no break. Each later move is one more line in the routing rule, which is why the pattern reduces risk.
Tip
Pick a first feature with few links to the rest of the system.
Quick check
Your team must replace a ten-year-old monolith that serves live customers and cannot afford downtime. Which approach fits best, and what is the first step?
How Do You Choose Between the Two Patterns?
Strangler Fig and Sidecar solve different problems. Strangler Fig answers the question of how to replace an old system safely. Sidecar answers the question of where shared helper jobs should run. Teams often use both, as the retailer did.
Migration Question
If your problem is moving work off an old system over time, look at Strangler Fig first.
Shared Job Question
If many services need the same helper work, such as logs or settings, consider a sidecar.
Cost Question
Both patterns add moving parts. Count the extra servers and effort before you commit, and remove the temporary parts when they are no longer needed.
Quick check
A team wants to move old reporting code off a database server. The reports can only be reached by direct database access, with no network route in front of them. The team wants a gradual move. What should it do first?
Key Takeaways
A cloud design pattern is a named, tested answer to a problem that keeps coming back, and it always comes with trade-offs. Strangler Fig moves a legacy system over in small steps, using a facade to decide where each request goes. Sidecar places shared helper jobs in a container or process beside the app, which keeps app code simple. Other lessons in this course cover caching, failure handling, messaging, and monitoring in more depth. Pick a pattern that fits your problem, and check its limits before you commit.
Sources
- Strangler Fig pattern, Azure Architecture Center (Microsoft Learn)
- Cloud design patterns catalog, Azure Architecture Center (Microsoft Learn)
- Sidecar pattern, Azure Architecture Center (source file on GitHub)
- Design patterns for microservices, Azure Architecture Center (Microsoft Learn)
- Architecture design patterns that support operational excellence, Microsoft Azure Well-Architected Framework
- Cloud Architecture Pattern Explained, Svitla blog
- Cloud Architecture Patterns: Ultimate Guide, GitNexa blog
- Design Patterns (Microsoft patterns and practices cloud guide)
Last updated on 18 November 2026
Related lessons
- Design systemsDesign Language: The Look, Feel, and Voice Behind a Design System
- Design systemsPattern: Combining Components Into Reusable User Solutions
- Design systemsDesign Principles: Short Statements That Settle Design Trade-Offs
- Design systemsDefining Design Tokens: Named Design Decisions Shared by Designers and Builders
Learn with me
Every lesson is free. I add new ones as I learn. Have a question, or want help with your own work? Book a short call.