How do I configure zone aware routing?¶
There are several steps required for enabling zone aware routing between source service (“cluster_a”) and destination service (“cluster_b”).
Envoy configuration on the source service¶
This section describes the specific configuration for the Envoy running side by side with the source service. These are the requirements:
Envoy must be launched with
--service-zoneoption which defines the zone for the current host.
Both definitions of the source and the destination clusters must have EDS type.
local_cluster_name must be set to the source cluster.
Only essential parts are listed in the configuration below for the cluster manager.
cluster_manager: local_cluster_name: cluster_a static_resources: clusters: - name: cluster_a type: EDS eds_cluster_config: ... - name: cluster_b type: EDS eds_cluster_config: ...
Envoy configuration on the destination service¶
It’s not necessary to run Envoy side by side with the destination service, but it’s important that each host in the destination cluster registers with the discovery service queried by the source service Envoy. Zone information must be available as part of that response.
Only zone related data is listed in the response below.
locality: zone: us-east-1d
The above configuration is necessary for zone aware routing, but there are certain conditions when zone aware routing is not performed.