讲解分布式数据存储的核心算法,数据分布的算法 hash 算法 -> 一致性 hash 算法(memcached) -> redis cluster 的 hash slot 算法 用不同的算法,就决定了在多个 master 节点的时候,数据如何分布到这些节点上去,解决这个问题 看到这里的时候,已经明白 ...
分类:
编程语言 时间:
2020-07-04 18:41:36
阅读次数:
62
这一节我们在三个主节点部署高可用的etcd集群,官方建议5节点或者7节点,我们三节点也是够用的。我们开始吧! 一、环境准备 10.13.33.29 etcd-0 10.13.33.40 etcd-1 10.13.33.38 etcd-2 etcd 数据目录:ETCD_DATA_DIR="/data/ ...
分类:
Web程序 时间:
2020-07-04 16:58:29
阅读次数:
87
获取特定开发人员的提交日记,--author=panzidong 指定提交记录的条数: -n 5 如下所示 root@vmuser:~/tmp/git_stm32cube_stm32f429igt# git log --author=panzidong -n 5commit af5923dcf022 ...
分类:
其他好文 时间:
2020-07-04 15:25:54
阅读次数:
75
如何声明字符串变量,并赋值?#!/bin/bashTARGET_CLUSTER_NODE_IP="10.245.110.69"printf “%s \n” $TARGET_CLUSTER_NODE_IP如何初始化一个字符串数组变量,并遍历输出其每一个字符串元素的值?#!/bin/bashdeclar... ...
分类:
其他好文 时间:
2020-07-03 19:39:15
阅读次数:
62
详细可以参看《redis官网文档》或者《redis中文网》 Redis集群方式共有三种:主从模式,哨兵模式,cluster(集群)模式 主从模式:是三种集群方式里最简单的。它主要是基于Redis的主从复制特性架构的。通常我们会设置一个主节点,N个从节点;默认情况下,主节点负责处理使用者的IO操作,而 ...
分类:
其他好文 时间:
2020-07-03 19:26:29
阅读次数:
58
当前服务器的redis cluster节点信息如下: [root@192-168-0-77 conf]# redis-cli -h 127.0.0.1 -p 2002 -c cluster slots | xargs -n8 | awk '{print $3":"$4"->"$6":"$7}' | ...
分类:
其他好文 时间:
2020-07-03 19:15:33
阅读次数:
66
Overview In previous post, we introduced the concept of VXLAN and analyzed the traffic flow in a VXLAN network. It may help understand VXLAN by lookin ...
分类:
其他好文 时间:
2020-07-03 17:26:26
阅读次数:
61
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the fo ...
分类:
其他好文 时间:
2020-07-03 15:34:00
阅读次数:
55
环境信息: namespace为 tkc-cluster, Tanzu Kubernetes Cluster为:tkc-guest-cluster 第一步:ContentLabrary 在vSphere Web Client中看到为Tanzu Kubernetes Cluster创建的Content ...
分类:
Web程序 时间:
2020-07-02 18:11:20
阅读次数:
82
单条件查询: db.getCollection('task').find({"id": "dc717654-dc45-4bf9-8e8a-1f1b146d6524"}) 单条件查询(属性为叶子节点) db.getCollection('archive_result').find({"results. ...
分类:
数据库 时间:
2020-07-01 16:06:36
阅读次数:
84