whowhenhow
whowhenhow

Reputation: 119

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?

Upvotes: 4

Views: 4493

Answers (1)

justincely
justincely

Reputation: 1080

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.

Upvotes: 3

Related Questions