-
Notifications
You must be signed in to change notification settings - Fork 81
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
Improve out of the box Docker experience #10
Comments
Dear @eminn , That means we should distribute some discovery service libraries and ask users provide right configuration defined in their hazelcast.xml. Which discovery services you think we should support? |
Dear @mesutcelik , I don't have usage statistics of the discovery services among the ecosystem but I think we can start with ZooKeeper. What do you think ? |
Dear @eminn , If we make sure existing or future hazelcast discovery service libraries i.e hazelcast-zookeeper available in the classpath of hazelcast docker image and have the user provide correct hazelcast.xml configuration, would you be happy to use that way? I am just trying to make up my mind to provide this feature request through one hazelcast docker image. I am happy to listen to other's opinions cc: @noctarius @jerrinot @bitsofinfo @bilalyasar |
Zookeeper appears to be the only discovery mechanism supported directly by Hazelcast while Consul and Etcd are community supported? From this perspective it makes sense to use Zookeeper. However I'm not sure how popular Zookeeper is in the cloud world. |
In the next month or so I'll be revisiting hazelcast and re-attempting configuring it to work in a swarm with nodes coming up/down randomly.... so I'm glad this issue was referenced above, as I dread revisiting it: hazelcast/hazelcast#4537 That said...being included in this thread just alterted me that this hazelcast-docker project even exists and I'm curious as to how it would be used (i.e. my usages of hz is embedding it in another app that itself is already containerized). Overall though? I wouldn't ship anything that forces the user to use any one particular discovery mechanism. |
@bitsofinfo: Many thanks for your insight! I am not a docker expert so please forgive my ignorance here. I understood recommending to use Docker Swarm instead of Zookeeper? Isn't it for all practical intents and purposes just another discovery mechanism? I understand it's meant to de-couple Hazelcast from the actual discovery mechanism (Zookeeper, Consul, etc..), but doesn't it just couple Hazelcast to Swarm instead? How commonly is Swarm used? @bilalyasar: What's you view? |
No. Swarm and zookeeper are entirely different categories of technologies. Zookeeper/consul/etcd would be considered in the service discovery/registry/meta-data realm of things. Traditional swarm (< 1.12) is purely a native clustering technology provided by docker containers. In 1.12 they introduced swarm services which do have some service discovery aspect to them, BUT only in that all swarm nodes provide a consistent set of LB entry points across all swarm participating nodes. But regardless its not really in the same class at all as consul/ZK/etcd etc. |
I think having discovery service jar files i.e hazelcast-zookeper in hazelcast docker image would be a good step forward. By doing that, people would not need to override hazelcast image to discovery service jars but instead they can use directly the discovery service libs from the image by enabling it in hazelcast.xml Currently I am planning to add only hazelcast-zookeeper libraries but we can add more while Hazelcast supports more discovery services officially. |
we're in a mesos/dns discovery env, and would like to be able to just assign domain names and let dns resolution work. unfortunately whilst hazelcast seems to work fine with members declared as ip address lists, handing the same list as domain names fails. |
All, well its been months and we are now revisiting this, ran into this again, perhaps summarized here: hazelcast/hazelcast#9219 |
hi, just wondering if there are any plans / work-in-progress to add a Docker swarm discovery plugin (similar to the AWS and Azure ones) for running Hazelcast in an overlay network? I imagine this could work by querying DNS for "tasks.<servicename>" which returns the swarm IPs of all the containers running the service. Having looked at the Azure plugin, it doesn't look too hard to write a DiscoveryStrategy for this. We're still evaluating Hazelcast, but just wondered if there was any way to run it in a swarm yet? |
There's no discovery plugin as of now but feel free to give it a first shot (just implementing two interfaces) and we're happy to help out on any questions on the way :) |
If we decide to go with Hazelcast I'll have a go at this. In the meantime if anyone else comes across this, the Kubernetes plugin is probably a good place to start as that also uses DNS for discovery, along with the Docker docs. |
Yep it is, wrote it ;) Anyhow in kubernetes DNS discovery is somewhat less reliable than using the REST API services. Still don't know why exactly but technically it should work the same way for any DNS service, only port might be discoverable in a different way. |
I had a go at hacking something together, and it appears to work i.e. the nodes in the swarm on the overlay network discover each other by resolving the "tasks." DNS, but then I get the log output:
You can see them find each other but then they seem to drop the connection. There isn't any NATting going on (afaik) in the swarm, so they should only be communicating on the 10.x IP range. I then tried setting the <interface> in the XML to 10...* and got the below output.
|
@markvr The root causes of these docker issues are:
The connection checks can be disabled but the connection still won't be established because of an another issue: hazelcast/hazelcast#11256 @eminn @markvr Please check out the new SPI: Please create a new issue or reopen this one if this does not suit your use case. |
I see that we have to revisit all comments here and create separate issues if a new enhancement is needed. |
are you suggesting embedding a eureka server in the base image? |
nope but the putting https://github.com/hazelcast/hazelcast-eureka and its dependencies into image might be an easy to use for dynamic environments... User has to manage its own Eureka Server deployment. |
Currently users have to configure tcp-ip configuration for each hazelcast instance in docker.
To overcome this tackle, we should utilize discovery spi mechanisms in our docker images.
Users should be able to run a hazelcast cluster with just configuring the URL of the discovery mechanism.
The text was updated successfully, but these errors were encountered: