4 ms·
The Dynamic Upstreams feature looks good, but it doesn't seem to be as nicely integrated with Consul as Traefik is.
by amanzi 4y ago
The Dynamic Upstreams feature looks good, but it doesn't seem to be as nicely integrated with Consul as Traefik is.
- francislavoie 4y agoCould you elaborate on what you mean? For now we only ship with support for SRV and A/AAAA, but anyone can write a Consul implementation if they like. I'm not sure how that would differ from SRV though, since Consul supports SRV anyways. I'm not a Consul user though.
- eliaspro 4y agoQuoting 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...