Problem
Cutting over all traffic at once makes any defect or capacity shortfall immediately visible to every user. Teams need a way to build confidence in a new version, region, or backend while keeping a fast path back.
Move production traffic from an old version or system to a new one in controlled increments with verification at each step.
Cutting over all traffic at once makes any defect or capacity shortfall immediately visible to every user. Teams need a way to build confidence in a new version, region, or backend while keeping a fast path back.
Gradual traffic shifting is the general mechanism behind canary, blue-green hybrids, and many migrations. It treats traffic percentage as a dial that is turned slowly while evidence accumulates.
A router holds weights for each target, for example ninety-five percent old and five percent new. After each increase, the system waits for a bake period and compares error rate, latency, and saturation across targets. If signals stay within bounds, the weight steps up through predefined stages. If not, the router restores the previous weight immediately. Sticky hashing keeps a user on one target across requests, and shadow traffic or mirroring may precede live shifting to test without user impact.
# Istio weighted routing
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: orders
spec:
hosts: [orders]
http:
- route:
- destination: { host: orders, subset: v1 }
weight: 90
- destination: { host: orders, subset: v2 }
weight: 10
Teams adopt this approach when migrating to a new version, cluster, or region; validating capacity of a new backend under real load. It is a poor fit when the two targets cannot safely serve traffic at the same time, or when routing infrastructure lacks weighted or header-based control. The central tensions are speed of migration vs risk containment; dual-running cost vs confidence; automation vs manual gate control. The main benefits are that it delivers: limits exposure at every stage; provides capacity feedback before full load; rollback is a weight change; works across versions, regions, and vendors. The main costs to budget for are: longer migration timeline; requires dual operation and compatibility; session affinity and caching complicate splits; needs reliable automated health evaluation. Governance typically looks like this: migration lead sets step schedule and exit criteria; automation enforces them. Expect adoption cost to be medium: weighted routing and monitoring, and a best fit for medium to large teams with service mesh or gateway. Critics point out that extended dual operation increases cost and cognitive load, and that weight based splits can mask problems affecting only specific segments. Treat these concerns as design inputs, and revisit the decision as traffic, team size, and failure history change.