程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python full stack series 178 single host uses docker to build Mongo split cluster

編輯:Python

explain

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 .

Content

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

1 Set up subnet

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


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved