Home > Backend Development > PHP Tutorial > Is memcache's distributed consistent hashing implemented automatically or by manually writing an algorithm?

Is memcache's distributed consistent hashing implemented automatically or by manually writing an algorithm?

WBOY
Release: 2016-08-18 09:16:00
Original
1183 people have browsed it

When memcache set stores data, it needs to calculate which memcache it should be placed on based on the consistent hashing algorithm. Does the implementation of this algorithm require us to write it manually, or after it is installed and configured with the parameters of multiple memcache, it will be automatically Now that it’s implemented, we just need to set it directly?

Reply content:

When memcache set stores data, it needs to calculate which memcache it should be placed on based on the consistent hashing algorithm. Does the implementation of this algorithm require us to write it manually, or after it is installed and configured with the parameters of multiple memcache, it will be automatically Now that it’s implemented, we just need to set it directly?

This needs to be implemented on the client side.
It has been implemented in the Memcached extension of PHP. You can set up the consistent distribution algorithm, and you can also specify access to different servers through the *ByKey method.

memecache’s client implements consistent hashing algorithm

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template