-
1. Re: Running Infinispan server in a Docker Swarm
sebastian.laskawiec Sep 5, 2017 2:23 AM (in response to karlvr)Unfortunately I'm not a Docker Swarm expert but I have some experience with Kubernetes, so I will assume things work similarly in both those environments.
The Infinispan Hot Rod client can operate in 3 modes. When a topology-aware or hash-distribution-aware client connects to the cluster, it download information about the servers to optimize querying. The idea is to retrieve data from the server that has it and to avoid additional hops. This requires all servers to be reachable by the client. Unfortunately this is not true if you hide them inside Docker Swarm and expose only a Service (which I'm assuming is a load balancer and/or virtual IP) to access it.
Currently the only way is to use client basic mode and use the service IP for it. There is an ongoing work to implement this in Infinispan but it's not high priority.
-
2. Re: Running Infinispan server in a Docker Swarm
karlvr Sep 5, 2017 2:37 AM (in response to sebastian.laskawiec)Thank you very much for the quick reply!
I presume that using client basic mode would potentially result in additional hops, as the client wouldn't necessarily query the owner. Is that right?
As there's work currently ongoing to implement this, I guess it isn't possible to operate the Java client in basic mode right now? Assuming you could tolerate the additional hops.
It seems like swarming isn't really viable with Infinispan at the moment where one needs to Hotrod into the cluster from outside the swarm. Maybe I'll try routing packets into the swarm and see if I can make that work!
-
3. Re: Running Infinispan server in a Docker Swarm
sebastian.laskawiec Sep 5, 2017 3:34 AM (in response to karlvr)I presume that using client basic mode would potentially result in additional hops, as the client wouldn't necessarily query the owner. Is that right?
That's correct.
As there's work currently ongoing to implement this, I guess it isn't possible to operate the Java client in basic mode right now? Assuming you could tolerate the additional hops.
Of course you can. Just use this method in ConfigurationBuilder.
It seems like swarming isn't really viable with Infinispan at the moment where one needs to Hotrod into the cluster from outside the swarm. Maybe I'll try routing packets into the swarm and see if I can make that work!
That sounds like an idea! Even though the single hop has a lot of advantages, it really depends on your data and your network configuration how much boost you will get. I highly recommend to measure both configuration and maybe using basic mode will not be that bad in your case.