Algorithms and architectures are concomitant
I was studying 「 Complexity management of logic 」 when , In fact, many architectural ideas have emerged : Only through a certain structure , Only in this way can complex logic be carried stably . No matter how hard I tried in the past , It's all about doing your best , But with the right structure , Then it is a controllable effort .
Recently, I started to study database clustering , The discovery and implementation of complex structures also depend on several core algorithms . for example RAFT Election algorithm , Automatic segmentation and aggregation of blocks . I think it is a good idea to build a cluster based on a stand-alone database , However, at this stage, we should first consider using mature products to quickly apply .
This time, it is used on a single machine docker Create an experimental cluster .
This experiment is mainly based on This article , The overall writing is very good , However, the environment used in this article is slightly different from mine . There are two things you might want to pay attention to , One is to use 10.0.0.1 The address of ,0.1 It is usually reserved for the gateway , I think it's better not to use it ; And the second one shard The cluster initialization configuration seems to be written incorrectly , It may be the reason for copying .
I will start the practice step by step
10 and 192, as well as 172.16 Are common private network segments , Namely IPv4 By default, the address plan retains , A special address that is not used as a public address IP Address