Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Service Discovery with Envoy

How does it work with Envoy?

Let's say I have configured an upstream cluster like this:

  clusters:
    - 
      name: "service_a_cluster"
      connect_timeout: "0.25s"
      type: "strict_dns"
      lb_policy: "ROUND_ROBIN"
      hosts:
        - 
          socket_address: 
            address: "service_a"
            port_value: 8786

How is my Envoy instance (ClusterManager?) going to resolve service_a?
To whom is it going to send DNS queries?

like image 958
whowhenhow Avatar asked Sep 10 '25 15:09

whowhenhow


1 Answers

Envoy has internal mechanisms for doing resolution, and these are all available through configuration. It looks like you're using Envoy v2 apis, so the relevant high level config is in the cluster object here.

If you read that, you'll notice the hosts field references the type field. This type field tells envoy how to handle discovery/resolution. The full details of that mechanism is here.

like image 61
justincely Avatar answered Sep 13 '25 04:09

justincely