我是靠谱客的博主 忧虑小鸭子,最近开发中收集的这篇文章主要介绍why redis-cluster use 16384 slots?,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

The reason is:

  1. Normal heartbeat packets carry the full configuration of a node, that can be replaced in an idempotent way with the old in order to update an old config. This means they contain the slots configuration for a node, in raw form, that uses 2k of space with16k slots, but would use a prohibitive 8k of space using 65k slots.
  2. At the same time it is unlikely that Redis Cluster would scale to more than 1000 mater nodes because of other design tradeoffs.

So 16k was in the right range to ensure enough slots per master with a max of 1000 maters, but a small enough number to propagate the slot configuration as a raw bitmap easily. Note that in small clusters the bitmap would be hard to compress because when N is small the bitmap would have slots/N bits set that is a large percentage of bits set.

https://github.com/redis/redis/issues/2576

最后

以上就是忧虑小鸭子为你收集整理的why redis-cluster use 16384 slots?的全部内容,希望文章能够帮你解决why redis-cluster use 16384 slots?所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(41)

评论列表共有 0 条评论

立即
投稿
返回
顶部