3 ms·
Quoting the Consul docs [1]: "Note that DNS is limited in size per request, even when performing DNS TCP queries. For services having many instances (more tha
by eliaspro 4y ago
Quoting the Consul docs [1]:
"Note that DNS is limited in size per request, even when performing DNS TCP queries.
For services having many instances (more than 500), it might not be possible to retrieve the complete list of instances for the service.
When DNS SRV response are sent, order is randomized, but weights are not taken into account. In the case of truncation different clients using weighted SRV responses will have partial and inconsistent views of instances weights so the request distribution could be skewed from the intended weights. In that case, it is recommended to use the HTTP API to retrieve the list of nodes."
[1] https://www.consul.io/docs/discovery/dns#service-lookups https://www.consul.io/docs/discovery/dns#service-lookups
- francislavoie 4y agoCool, sounds good. I'll say that it's unlikely we'll work on this unless a sponsor funds the development. The dynamic upstreams feature was funded by a sponsor requiring improved SRV support (we did have SRV support before v2.5.0, but it was rudimentary and insufficient for many usecases). If someone needs this and can spend some time developing it, essentially it's just a module which implements this interface: https://pkg.go.dev/github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy#UpstreamSource https://pkg.go.dev/github.com/caddyserver/caddy/v2/modules/c...