-
Notifications
You must be signed in to change notification settings - Fork 20
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
Keep original server names in HAproxy backends #59
Conversation
to make the logs more useful
Functionally looks good, but I'd like to hear from @ShimmerGlass too. One thing I'm not entirely certain about is changing the generated server names to "disabled_server*" - if there is a possibility of these server names being retained (while the address information is updated), and thus creating confusion as to which ones are active or not - I'd suggest retaining the old non-informative "server_xyz" naming scheme. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cannot work as it is as node.Node might be twice in the list
if host == "" { | ||
host = s.Node.Address | ||
|
||
name := s.Node.Node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name would not be unique: the proxy might try to target several instances of the same service on 1 single node
Closing this because I don't see a way to implement this right now. |
One more thing: Why is reloading HAproxy so bad, @ShimmerGlass and @pierresouchay ? Assuming that only some of the servers change and it happens only every few days, is that a problem? I am asking because perhaps we could add an alternative mode to haproxy-consul-connect that WILL reload BUT will provide more features, like this one. |
@gdubicki, this would mean every server change triggers a reload. This is not so bad with a stable bare-metal architecture with few servers, however, it will be an issue for :
We need to decouple haproxy reloads from server health for a stable service. I don't think an option for that would be a good idea. It is pretty low level and relates to an Haproxy implementation detail and it is hard for users to understand exactly how this can go bad. Instead, if observability is an issue, I propose we focus on prometheus metrics for example, or an HTML status page. |
Mostly to make the HAproxy logs more useful for tracing the requests.
Although it doesn't make much sense without #51 it works independently so it can be reviewed in the same way.
Also related to #45.