I’m with a problem on dockerized applications and Memcached, to store some values, apparently, when a start a new Docker instance, that runs a Spymemcached client, all the data stored in the cache are invalidate, so If I previously stored some values on cache at Node 1 and then I start Node 2, theses values are cleaned from the Memcached server, and finally if a store the same values again on Node 1 and query it on Node 2 they will be shared beyond both nodes without clean the data. Is it the expected behavior? Should I use a Memcached server for each client instance? Or is it possible to share the same Memcached server instance to multiples client without lost the stored data?
2
Answers
I migrated the Memcached client library to Folsom from Spotify and solved my problem. A curiosity about Spymencached, the problem I mentioned occurrs only when clients are running on Windows machine.
You can share the same memcached instance with multiple clients.
You just need to create different docker containers for Node1, Node2 and memcached.
Create them on same container network.
a sample
docker-compose.yml
.