1. etcd 服务启动配置实践

1 heartbeat timeout 默认为 100ms,推荐配置为 1s;
2 election timeout 默认为 1000ms,推荐为 5s(election timeout >= 5 * heartbeat timeout);
3 quota-backend-bytes 默认为 2G(最大值8G),推荐根据集群容量预估调整;
4 配置 auto-compaction-retention=1 和 auto-compaction-mode=periodic 参数,定期压缩历史数据;
5 推荐通过 cronjob 定期执行 etcdctl defrag(如果 defrag 执行时间 > election timeout,则集群会进入重新选主模式)
Copyright © 温玉 2021 | 浙ICP备2020032454号 all right reserved,powered by Gitbook该文件修订时间: 2023-10-26 17:23:11

results matching ""

    No results matching ""