惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
The Last Watchdog
The Last Watchdog
Project Zero
Project Zero
T
Threatpost
T
The Blog of Author Tim Ferriss
云风的 BLOG
云风的 BLOG
N
Netflix TechBlog - Medium
B
Blog
The GitHub Blog
The GitHub Blog
F
Full Disclosure
MyScale Blog
MyScale Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Y
Y Combinator Blog
GbyAI
GbyAI
Recent Announcements
Recent Announcements
MongoDB | Blog
MongoDB | Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Docker
NISL@THU
NISL@THU
爱范儿
爱范儿
Spread Privacy
Spread Privacy
F
Fortinet All Blogs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
博客园 - 叶小钗
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Hacker News - Newest:
Hacker News - Newest: "LLM"
Simon Willison's Weblog
Simon Willison's Weblog
S
Security @ Cisco Blogs
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
PCI Perspectives
PCI Perspectives
V
V2EX
人人都是产品经理
人人都是产品经理
W
WeLiveSecurity
IT之家
IT之家
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
博客园_首页
Forbes - Security
Forbes - Security
Cloudbric
Cloudbric
有赞技术团队
有赞技术团队
Application and Cybersecurity Blog
Application and Cybersecurity Blog
B
Blog RSS Feed
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Palo Alto Networks Blog
The Register - Security
The Register - Security
Google DeepMind News
Google DeepMind News
Hacker News: Ask HN
Hacker News: Ask HN
腾讯CDC
T
Threat Research - Cisco Blogs
Cyberwarzone
Cyberwarzone

Learn Cloud Native

Agentgateway rate limiting for agents | Learn Cloud Native Local development with coding agents on Kubernetes using Signadot | Learn Cloud Native cuenv: one typed file for your whole project | Learn Cloud Native Preflight: AI Code Review Before You Push Anatomy of AI Agents Accessing Google Drive from Next.js Deploying to Fly.io using Dagger and Github Top Cloud-Native & Kubernetes Certifications [2026 Guide] Rapid microservices development with Signadot How to prepare for Istio certified associate exam (ICA) Global Rate Limiting in Istio with Envoy Rate Limit Service My Journey with Istio: From Incubation to Graduation Cilium Network Policy Tutorial: Secure Kubernetes Step by Step Kubernetes Networking: How kube-proxy and iptables Work Istio ServiceEntry: DNS vs. STATIC Resolution & Endpoints Explained Apply an Istio DestinationRule Globally (Mesh-Wide) Istio Rate Limiting: Configure a Local Rate Limiter in Envoy How to expose custom ports on Istio ingress gateway Portainer Tutorial: A Web UI for Kubernetes & Containers Traefik Proxy 2.x and TLS 101 Kubernetes CLI (kubectl) tips you didn't know about Setting up SSL certificates with Istio Gateway ArgoCD Best Practices You Should Know 在 OCI Ampere A1 计算实例上运行 AI Running AI On OCI Ampere A1 Instance How to Deploy Traefik Proxy Using Flux and GitOps Principles Firebase Emulators with Next.js: Local Setup Guide Running Hugo on free Ampere VM (Oracle Cloud Infrastructure) How to use kwatch to detect crashes in Kubernetes clusters Continuous profiling in Kubernetes using Pyroscope Monitoring containers with cAdvisor Creating a Kubernetes cluster in Google Cloud (LAB) Your first Kubernetes Pod and ReplicaSet (LABS) Container Lifecycle Hooks Maybe Convert Wasm Extension Config? GetIstio - CLI, training, and community Attach multiple VirtualServices to Istio Gateway Kubernetes Volumes Explained: Keep Data Beyond the Pod Send a Slack message when Docker images are updated Kubernetes Network Policy Ambassador Container Pattern Start Kubernetes Release Sidecar Container Pattern Kubernetes Init Containers Deploying multiple Istio Ingress Gateways Branch by Abstraction Pattern Kubernetes Development Environment with Skaffold Securing Kubernetes Ingress with Ambassador and Let's Encrypt All About the Ingress Resource How to quarantine Kubernetes pods? Getting started with Kubernetes Horizontal partitioning in MongoDB Docker image tagging scheme Six things to keep in mind when working with Dockerfiles Beginners guide to Docker Beginners guide to gateways and proxies Deploy and Operate Multiple Istio Meshes in one Kubernetes Cluster Managing service meshes with Meshery Circuit Breaking in Istio Explained Build and push your Docker images using Github Actions Kubernetes and Istio service mesh workshop materials Build Netlify-like deployment for React app using Kubernetes pods Six exciting enhancements in Istio 1.4.0 Fallacies of Distributed Systems CAP Theorem Explained Master the Kubernetes CLI (kubectl) - Cheatsheet Minikube Basics and How to Get Started with Kubernetes 5 Tips to Be More Productive with Kubernetes What are sticky sessions and how to configure them with Istio? Debugging Kubernetes applications using Istio Kubernetes Ingress and Istio Gateway Resource Zero Downtime Releases using Kubernetes and Istio Traffic Mirroring with Istio Service Mesh Expose a Kubernetes service on your own custom domain
The Strangler Pattern
Peter Jausovec · 2020-08-11 · via Learn Cloud Native

Scenario

The strangler pattern is used in scenarios when you're migrating from monolithic systems by extracting pieces of functionality and moving that functionality into new services.

As more and more functionality gets replaced by the new services, the old monolith is becoming smaller and the collection of new services replacing the functionality is increasing. You're strangling the old system, using it for support while you're developing new services, and once your new services are implemented, the old system becomes obsolete and you can get rid of it.

The name for this pattern comes from the strangler fig tree. The strangler fig tree can live without having any roots and starts growing atop of other trees. It grows the roots downwards and envelops the host tree. At some point the original support tree dies, and the strangler fig tree takes its place.

Translating this to software - the idea is to have the new system or service be supported by the existing system. Both old and new systems coexist and once the new system is ready, it can take over and replace the old system.

The key benefit of the strangler pattern is to allow you to do incremental changes to the new system. Since the old system keeps running while you're making changes, you can stop or pause your migration at any point, without impacting the old system. During the migration the traffic continues to be served by the old system.

The strangler pattern works best for the scenarios where you can easily intercept the calls before they reach the functionality inside the monolith. For example, if the functionality you're trying to extract is exposed from the monolith through an API (e.g. /users or /invoices), then the strangler pattern is a good fit. However, if the functionality is buried deeper inside the monolith and not exposed from it, the strangler pattern might not be a good fit.

Steps

There are three steps involved when implementing the strangler pattern.

1. Identify the functionality

Identify the functionality
Identify the functionality

In the first step, you are identifying the part of an existing system you want to move out of the monolith. As part of this step, you should also place a proxy between the monolith and your gateway or the UI. This proxy can be any piece of software you can configure to route the traffic from one endpoint to another - we will use this proxy to eventually route the traffic from the monolith to the new service. At this point though, this proxy is just passing the calls through to the monolith.

2. Move the functionality

Move the functionality
Move the functionality

Once you have identified the functionality and you have the proxy in place, you can start extracting the functionality from the monolith and putting it into the new service. You can also break this step into multiple smaller steps. At first, you can only implement a service skeleton and return HTTP 501. Once you have that you can deploy the service to production, but don't release it. Deploying simply means that the service is running production, but it's not released and there's not traffic being sent to it. Doing this incrementally allows you to set up the CI/CD pipelines, ensure sure you have all metrics flowing, and also test this new service, without impacting the existing functionality.

3. Redirect the calls

Redirect the calls
Redirect the calls

Once you have fully implemented and tested the new service you can update the proxy configuration and redirect the calls from the monolith to the new service.

Conclusion

The strangler pattern is useful when you are extracting functionality from the monolith that can be easily intercepted at the edge of the monolith. By putting a proxy in place you can switch the calls from the monolith to the new service (and vice-versa) with a simple configuration change.

For functionality that is deeper inside the monolith and can't be intercepted at the edge, you can look at the branch by abstraction pattern.