Memcache设置时遇到的常见问题

    xiaoxiao2023-03-24  4

    原文地址:https://github.com/memcached/memcached/wiki/ProgrammingFAQ#setup-questions

    Setup Questions

    How do I authenticate?

    You don't! Well, you used to not be able to. Now you can. If your client supports it, you may use SASL authentication to connect to memcached.

    Keep in mind that you should do this only if you really need to. On a closed internal network this ends up just being added latency for new connections (if minor).

    How do you handle failover?

    You don't. Some clients have a "failover" option that will try the next server in the case of a failure. As noted in Configuring Clients this isn't always the best idea.

    How do you handle replication?

    It doesn't. Adding replication to the system halves your effective cache size. If you can't handle even a few percent extra cache misses, you have serious problems. Even with replication, things can break. More moving parts. Software to crash.

    Can you persist cache between restarts?

    No. Sometime in the future it might, but as of now it does not. This is often a bad idea since the cache that comes back up will be out of date. Folks who use this really want a database instead.

    Do clients and servers all need to talk to each other?

    Nope. The less chatter, the more scalable.

    转载请注明原文地址: https://ju.6miu.com/read-1201147.html
    最新回复(0)