How to access this cluster from another container running memtier_benchmark? #131
-
I want to use two containers, one running this cluster, the other running a tool such as memtier_benchmark, or just the redis-cli. However this doesn't work because this cluster always redirects to 127.0.0.1 as its address, and the other container can't figure out the true address needed! Is there a way to set the IP address this cluster uses to its address allocated by docker? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
First i would not really run any benchmarks or anything similar to get an accurate reading or view of how performant redis cluster really is in a single container solution. You should really build your dev/staging/prod envrionment and run the tests against those kinds of builds/setup instead of doing it against this container. This container and setup is not really or ever will be really suited for production environment or similar setups where performance is really a factor or a consideration. But... to answer your question, the only suggestion i have is to attempt to setup both containers with a host network so that the inside of both containers is exposed to 127.0.0.1 on both ends, then any tool in any other container should work out fine i guess. If you get that to work, please drop a line as it might be good information for future us to see :) |
Beta Was this translation helpful? Give feedback.
-
Thanks! Actually I’m not doing any benchmarking at all! I’m simply using memtier_benchmark as a client to put some data in the system. My real goal is to use the subsequent cluster as a platform against which to test a metrics gathering client. I solved the problem: My script builds a network with a known subnet, allocates a specific address to the cluster and then (after sleeping a little), connects from the memtier_benchmark container.
Hope that helps in your future efforts! |
Beta Was this translation helpful? Give feedback.
Thanks! Actually I’m not doing any benchmarking at all! I’m simply using memtier_benchmark as a client to put some data in the system. My real goal is to use the subsequent cluster as a platform against which to test a metrics gathering client.
I solved the problem:
My script builds a network with a known subnet, allocates a specific address to the cluster and then (after sleeping a little), connects from the memtier_benchmark container.