image de chargement
Back to glossary

Strangler Fig Pattern

Architectural pattern enabling gradual migration from legacy systems to new architecture by progressively wrapping it with zero downtime.

Updated on January 11, 2026

The Strangler Fig Pattern is an architectural migration strategy inspired by nature, where certain plants (strangler figs) grow around a host tree until completely replacing it. In software context, this pattern enables progressive modernization of legacy systems by developing new features alongside the old system, then gradually redirecting traffic to the new implementation. This approach minimizes risks associated with large-scale migrations and enables smooth transitions without service interruption.

Pattern Fundamentals

  • Incremental migration rather than complete rewrite (big bang)
  • Temporary coexistence of old and new systems via a facade
  • Progressive traffic redirection to new services
  • Gradual decommissioning of legacy features once migrated
  • Rollback capability at each migration stage

Business and Technical Benefits

  • Drastically reduced risk compared to complete rewrites
  • Guaranteed service continuity throughout migration
  • Fast ROI through incremental delivery of new features
  • Continuous learning and adjustments possible during migration
  • Teams can work in parallel on old and new systems
  • Facilitates progressive adoption of new technologies and architectures
  • Enables prioritization of modules based on business value

Practical Architecture Example

Consider migrating an e-commerce monolith to microservices architecture. Here's how to structure the routing facade orchestrating the transition:

strangler-facade.ts
// Facade managing routing between legacy and new services
class StranglerFacade {
  private featureFlags: FeatureFlagService;
  private legacySystem: LegacyMonolith;
  private modernServices: Map<string, MicroService>;

  async handleRequest(request: Request): Promise<Response> {
    const route = this.parseRoute(request);
    
    // Determine if feature is migrated
    if (this.isMigrated(route)) {
      // Route to new microservice
      const service = this.modernServices.get(route.domain);
      return await service.handle(request);
    }
    
    // Otherwise, use legacy system
    return await this.legacySystem.handle(request);
  }

  private isMigrated(route: Route): boolean {
    // Check via feature flags for progressive rollout
    return this.featureFlags.isEnabled(
      `migrate_${route.domain}`,
      { userId: route.userId, percentage: 20 }
    );
  }
}

// Progressive migration configuration
const migrationPlan = {
  phase1: ['product-catalog', 'search'],      // Weeks 1-4
  phase2: ['shopping-cart', 'checkout'],      // Weeks 5-8
  phase3: ['user-profile', 'recommendations'], // Weeks 9-12
  phase4: ['orders', 'payments']              // Weeks 13-16
};

Step-by-Step Implementation

  1. Analyze legacy system and identify functional domains to migrate by priority (business value vs complexity)
  2. Set up a facade/proxy that intercepts all incoming requests
  3. Develop the first module in new architecture parallel to existing system
  4. Implement feature flag mechanism to progressively route traffic (e.g., 5%, then 25%, 50%, 100%)
  5. Synchronize data between old and new systems during coexistence (event streaming, CDC)
  6. Meticulously monitor performance and errors of both systems
  7. Once new module is stable at 100% traffic, decommission corresponding legacy code
  8. Repeat process for each module until complete migration

Pro Tip

Always start by migrating a low-criticality but high-visibility module (e.g., read-only product catalog). This validates facade architecture and deployment processes with minimal risk while quickly demonstrating value to stakeholders. Use feature flags with progressive rollout (1% → 5% → 25% → 50% → 100%) for each migration.

  • API Gateways: Kong, AWS API Gateway, Azure API Management for facade implementation
  • Feature Flags: LaunchDarkly, Unleash, Split.io for progressive routing
  • Service Mesh: Istio, Linkerd for network-level traffic splitting
  • Change Data Capture: Debezium, AWS DMS for data synchronization
  • Monitoring: Datadog, New Relic, Prometheus to compare legacy vs new
  • Reverse Proxies: NGINX, Envoy, Traefik as single entry point

The Strangler Fig Pattern represents the safest strategy for modernizing critical production systems. By enabling incremental migration with continuous validation, this pattern significantly reduces financial and operational risks compared to big bang approaches. Organizations can modernize their technology stack while continuing to deliver business value, transforming a potentially paralyzing migration into a manageable and measurable process.

Themoneyisalreadyonthetable.

In 1 hour, discover exactly how much you're losing and how to recover it.