Skip to content

Commit 846e1c9

Browse files
author
wangyazhou
committed
docs(calico): 添加 Calico架构文档
- 新增 Calico 架构文档,介绍 Calico 的主要组件和工作原理- 文档包括路由配置组件 Felix、路由广播组件 BGP Speaker 和安全策略组件 Network Policy 的详细说明 - 配置了图片路径和显示设置,确保文档中的插图能够正确显示
1 parent f47a992 commit 846e1c9

File tree

9 files changed

+91
-16
lines changed

9 files changed

+91
-16
lines changed

db/etcd/etcd.adoc

Lines changed: 0 additions & 16 deletions
This file was deleted.

middleware/etcd.adoc

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
:toc:
2+
3+
// 保证所有的目录层级都可以正常显示图片
4+
:path: linux/
5+
:imagesdir: ../image/
6+
7+
// 只有book调用的时候才会走到这里
8+
ifdef::rootpath[]
9+
:imagesdir: {rootpath}{path}{imagesdir}
10+
endif::rootpath[]
11+
12+
== etcd
13+
14+
15+
=== CAP理论
16+
17+
在数据库理论中, CAP 定理 (也以计算机科学家 Eric Brewer 的名字命名为 Brewer 定理) 指出,任何分布式数据存储只能提供以下三个保证中的两个
18+
19+
- Consistency 一致性
20+
21+
每次读取要么获得最近写入的数据,要么获得一个错误。
22+
23+
- Availability 可用性
24+
25+
每次请求都能获得一个(非错误)响应,但不保证返回的是最新写入的数据。
26+
27+
- Partition tolerance 分区容错
28+
29+
尽管任意数量的消息被节点间的网络丢失(或延迟),系统仍继续运行。
30+
31+
当发生网络分区故障时,必须决定是否执行以下操作之一:
32+
33+
取消操作,从而降低可用性,但确保一致性(etcd)
34+
继续操作,从而提供可用性,但存在不一致的风险。请注意,这并不一定意味着系统对用户来说是高可用的 。
35+
36+
因此,如果存在网络分区,则必须在一致性和可用性之间做出选择。
37+
38+
也就是说,CAP 定理表明,在存在网络分区的情况下,一致性和可用性必须二选一。而在没有发生网络故障时,即分布式系统正常运行时,一致性和可用性是可以同时被满足的。这里需要注意的是,CAP 定理中的一致性与 ACID 数据库事务中的一致性截然不同。
39+
40+
https://en.wikipedia.org/wiki/CAP_theorem[CAP_theorem wiki]
41+
42+
43+
44+
45+
46+
47+
48+
49+
50+
51+
52+
53+
54+
55+
56+
57+
58+
数据库和应用程序服务器在应对互联网上数以亿计的访问量的时候,需
59+
要能进行横向扩展,这样才能提供足够高的性能。为了做到这一点,要学习分布式技术架
60+
构,包括负载均衡、DNS 解析、多子域名、无状态应用层、缓存层、数据库分片、容错
61+
和恢复机制、Paxos、Map/Reduce 操作、分布式 SQL 数据库一致性(以 Google
62+
Cloud Spanner 为代表)等知识点
63+
64+
65+
66+
67+
在关于集群的可用性( availability) 这一点上, etcd 认为一致性比可用性更加重要。这意味着 etcd 在出现脑裂的情况时,会停止为集群提供更新能力,来保证存储数据的一致性。
File renamed without changes.

middleware/kafka.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
:toc:
2+
3+
// 保证所有的目录层级都可以正常显示图片
4+
:path: linux/
5+
:imagesdir: ../image/
6+
7+
// 只有book调用的时候才会走到这里
8+
ifdef::rootpath[]
9+
:imagesdir: {rootpath}{path}{imagesdir}
10+
endif::rootpath[]
11+
12+
== kafka

middleware/redis.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
:toc:
2+
3+
// 保证所有的目录层级都可以正常显示图片
4+
:path: linux/
5+
:imagesdir: ../image/
6+
7+
// 只有book调用的时候才会走到这里
8+
ifdef::rootpath[]
9+
:imagesdir: {rootpath}{path}{imagesdir}
10+
endif::rootpath[]
11+
12+
== redis
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)