Skip to content
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

Why does network need to be multiple of 8? #52

Open
dovi5988 opened this issue Sep 13, 2020 · 5 comments
Open

Why does network need to be multiple of 8? #52

dovi5988 opened this issue Sep 13, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request techdebt This may hamper further development

Comments

@dovi5988
Copy link

Hi,

Is here any reason why wesher is set up so that nework side needs to a multiple of 8? This currently restricts you to having your network block being a minimum of a /24. Since a random IP from the network is assigned there is no way to know if a host's IP will end in 1 or 95.

@costela
Copy link
Owner

costela commented Sep 13, 2020

Hi, yes, this is currently an unfortunate side-effect of the (somewhat naive) IP assignment implementation. With a bit of refactoring, it should be perfectly possible to get rid of this limitation.

Having said that, I didn't think this would be a problem for all but the most extreme cases. What use-case do you have in mind? Do you have so many networks, where /24 becomes prohibitive?

@costela costela added enhancement New feature or request techdebt This may hamper further development labels Sep 13, 2020
@dovi5988
Copy link
Author

Quite the opposite. We are using keydb where you need to list every other IP in the network. Since we don't know what IP a host will get if we have a /24 we need to configure every host to try to connect to every other node on the network (since each node does not know when the other nodes come and go). If we that IP usage started at the bottom and we had say 10 hosts then I would just add:
172.16.50.1
172.16.50.2 etc. and add the first 10 IP's.

@costela
Copy link
Owner

costela commented Sep 14, 2020

Ah, I see, so it's basically a trick to compensate for the lack of service-discovery?
Wouldn't looping over a set of hostnames help? The hostnames are added to /etc/hosts to help with this kind of problem.

(but don't get me wrong: I still intend on getting rid of the original limitation; just gotta find the time)

@dovi5988
Copy link
Author

@costela I would not help since KeyDB has no way of knowing when hosts join and leave. The only "easy" way is if I know I plan on having a max of 10 hosts then list those ten in keydb.

@costela costela self-assigned this Jan 10, 2021
@sbrl
Copy link

sbrl commented Mar 30, 2021

@dovi5988 What about running Consul too? Consul is able to keep track of hosts in the cluster and provide a queryable HTTP API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request techdebt This may hamper further development
Projects
None yet
Development

No branches or pull requests

3 participants