The simplest way to not have all your service instances fail after an update is often, well, not updating all of them at once. That's the key idea behind the incremental variant of blue-green deployments, also called a canary release.
In Envoy, you could put the following in the routes section of your config:
- match:
prefix: "/"
route:
weighted_clusters:
clusters:
- name: new_version
weight: 5
- name: old_version
weight: 95
You should also remember to define the two clusters from the preceding snippet, the first one with the old version of your service:
clusters:
- name: old_version
connect_timeout: 0.250s
type: strict_dns
lb_policy: round_robin
load_assignment:
cluster_name: old_version
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: old_version
port_value: 5678
The second cluster will...