K
K
kiranananda2019-01-16 18:23:59
memcached
kiranananda, 2019-01-16 18:23:59

Memcached cluster in docker?

Now we are considering options for translating php into docker swarm. It seems to be clear here, we throw test tubes on servers and that's it. Further, the docker itself will figure out who to pull.
But here's the ambush coming out with a memcache. At the moment, 2 servers are raised with it and the data is written to one then to the other, the standard scheme. One big cant in this is if one of the servers crashes, the whole system goes down until the application configs are corrected and the non-working memcache is deleted.
At the moment, one solution suggests itself, a crutch is not a crutch, it’s even difficult to evaluate :). On a third-party server, I poll memcaches and if one does not respond, I edit the application configs by deleting a non-working service.
And here the task becomes more complicated, we think that this matter should also be transferred to a cluster with dockers, and then if there are 2 or more memcaches, nothing comes to mind except for duplicating data in them. It’s bad to duplicate, the load on the database is higher and the data may differ ...
Redis is also not an ideal solution, there is some kind of intricate cluster, it’s easier not to get involved for such a simple task ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kiranananda, 2019-01-16
@kiranananda

It seems that the solution suddenly appeared :)...
If I raise 2 memcache with different names in the docker. And I cling to them from the application by name. In this case, when one of the nodes on which there is a memcache crashes, it simply migrates to another, and that’s all. Just to be honest, I did not twist it all, while in theory. But it looks like it should work... :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question