Advanced load balancing patterns
medium 30 minA load balancer decides which server gets a request, so it can also decide which version gets it and what happens when a server misbehaves.
Where it shows up
The same pattern appears across everyday software.
Canary with Argo Rollouts or Flagger
Both run on Kubernetes, change traffic weights step by step, ask a metrics system between the steps and go back by themselves when the numbers are bad.
Weighted target groups on AWS
An application balancer rule can forward to several target groups with weights from 0 to 999. A release moves the weights.
Blue-green at a ticket office
The new version is tested on green during the day. The switch happens at a quiet hour. Blue stays for a day, and database changes follow expand and contract.
Mirroring a search engine
Every search goes to the old engine and a copy to the new one. The team compares delay and results for a week before one user sees the new engine.
Ejection of one sick server
One of forty servers returns errors at once because its disk is full. By least connections it would attract traffic, since it answers so fast. Ejection after five errors in a row removes it in seconds.
A retry storm stopped by a budget
A cache restart made 30% of calls fail. Three layers each retried three times and kept the database down. With a budget of 20% in one layer the system recovered by itself.