New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v2: Support SRV DNS discovery for proxy upstreams #3179
Comments
@mholt, I created this issue to track the work we initiated on Twitter |
So... I gave the
|
Branch in question, for reference: https://github.com/caddyserver/caddy/tree/srv-proxy |
@danlsgiga Thanks -- for now, just put a port in there, it won't be used after the SRV lookup, I just wanna see if the SRV lookup is doing its job, basically. |
yup... added the port and it works as expected! ;) |
Great! Okay imma refactor some stuff, brb |
This app specifically runs on an HTTP only port but most of all the other ones are listening on HTTPS... so something like |
Whether TLS is used is a different matter, orthogonal to SRV lookups. I'll figure something out for v2 and clean it up and tag you in a PR to review later! |
Do SRV records have advantages over multiple A/AAAA records, like in #1545? Would it be necessary to implement both? Seems like they do the same thing but SRV is actually built for it... |
@danlsgiga Okay, I've polished it up a bit and created a PR in #3180. Please try it out! |
Multiple A/AAAA records are basically for load balancing when you know what port the service is running and when that port is the same for all targets. SRV records on the other hand are able to do dynamic service discovery and load balacing without the need to provide ports and it allows us to have dynamic port allocation across all nodes (the new normal in schedulers like k8s / nomad / mesos). |
Gotcha, that makes sense. I'll release beta 20 today probably, with this feature! |
* reverse_proxy: Begin SRV lookup support (WIP) * reverse_proxy: Finish adding support for SRV-based backends (#3179)
Hey @mholt, just noticed the docs don't have this feature included yet. Since it is included in the latest beta I just want to make sure it ends there and does not get lost in the wild. ;) |
Thanks for the reminder, I just updated the docs locally and it'll go out next deploy. |
This is to replicate the same feature existing in
v1
here: https://caddyserver.com/v1/docs/proxyThe text was updated successfully, but these errors were encountered: