-
Notifications
You must be signed in to change notification settings - Fork 619
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
Feature: Allow weight tag in Consul #42
Comments
I like the idea but would prefer a different syntax. Especially with the idea of the tcp proxy I'm thinking about using a URL for this:
Examples:
|
@magiconair I like it. Let your imagination fly! |
Hi guys, Any news on this matter? Thanks! |
Maybe we can help developing this feature ? If so, what would be the syntax ?
|
This patch adds support for a 'weight=f' option on the url tag which gets translated to a 'weight f' option on the 'route add' command. This should eventually move into the options to unify the config option syntax. Fixes #42
@nanoz and @tiago-msilva I thought that this would be more work but the Sorry, @nanoz I did not want to take the opportunity for contributing away from you but was done pretty much when I looked at the the place which I wanted to point out to you. To illustrate this I've added a new
Would you mind testing this? This is on the |
@magiconair I don't know a thing about go. |
try this: mkdir ~/go
go get -u github.com/fabiolb/fabio
cd ~/go/src/github.com/fabiolb/fabio
git checkout issue-42-weigh-targets
go install
ls ~/go/bin/fabio |
|
Thanks! I also set the GOPATH to "~/go" and cd to it before running go get. |
@magiconair Moreover I tested it with my use case. Thank you so much. Any idea when this will be on an official release? |
@tiago-msilva Thanks for testing this. I try to do a release a month. It has been three weeks since the last release. I'll have a look what else is on the list and could shoot for a 1.5.1 next week. |
merged to master |
Hi, Good day. Could you maybe add a working example? I tried:
I start fabio with:
I'm using
The weights are not update though. Might be missing something simple? Thanks. Regards. |
@jarrettj you need to register service instances with different weights. If they all have the same then this won't have an effect. |
"registrator" of paths into consul should also allow weight parameter to be passed so that traffic can be balanced to env needs. Some services may be running on nodes with less resources. Right now, rebalancing is distributed evenly.
Enhancement example:
results in...
adding another specific weighted service...
would result in...
The text was updated successfully, but these errors were encountered: