Skip to content

Commit

Permalink
deploy: 73f8aee
Browse files Browse the repository at this point in the history
  • Loading branch information
cjc7373 committed Oct 11, 2023
1 parent d06c7ad commit 42e1d66
Show file tree
Hide file tree
Showing 30 changed files with 505 additions and 343 deletions.
4 changes: 3 additions & 1 deletion categories/distributed-system/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
<i class=material-icons>menu</i></button>
<a id=navTitle class=navbar-brand href=https://blog.coherence.codes/>Coherence's Blog</a>
<button type=button class=nav-darkmode-toggle id=darkModeToggleButton2>
<i class=material-icons id=darkModeToggleIcon2>dark_mode</i></button></div></nav><div class=single-column-header-container id=pageHead v-bind:style="{ transform: 'translateZ(0px) translateY('+.3*scrollY+'px)', opacity: 1-navOpacity }"><a href=https://blog.coherence.codes/><div class=single-column-header-title>Coherence's Blog</div></a></div><div id=content><div id=streamContainer class=stream-container><div class="post-list-container post-list-container-shadow"><div class="post-item-wrapper post-item-wrapper-no-hover"><div class="post-item post-item-no-gaps"><div class=post-item-info-wrapper><div class="post-item-title post-item-title-small"><a href=/categories/>Categories</a> / Distributed System</div></div></div></div><a href=/posts/2023/mit_6.824_1_gfs/ class=a-block><div class=post-item-wrapper><div class="post-item post-item-no-gaps"><div class=post-item-info-wrapper><div class=post-item-title>MIT 6.824 学习笔记(一) GFS</div><div class=post-item-meta>2023-09-05
<i class=material-icons id=darkModeToggleIcon2>dark_mode</i></button></div></nav><div class=single-column-header-container id=pageHead v-bind:style="{ transform: 'translateZ(0px) translateY('+.3*scrollY+'px)', opacity: 1-navOpacity }"><a href=https://blog.coherence.codes/><div class=single-column-header-title>Coherence's Blog</div></a></div><div id=content><div id=streamContainer class=stream-container><div class="post-list-container post-list-container-shadow"><div class="post-item-wrapper post-item-wrapper-no-hover"><div class="post-item post-item-no-gaps"><div class=post-item-info-wrapper><div class="post-item-title post-item-title-small"><a href=/categories/>Categories</a> / Distributed System</div></div></div></div><a href=/posts/2023/mit_6.824_2_raft/ class=a-block><div class=post-item-wrapper><div class="post-item post-item-no-gaps"><div class=post-item-info-wrapper><div class=post-item-title>MIT 6.824 学习笔记(二) Raft</div><div class=post-item-meta>2023-10-01
&emsp;
&emsp;</div></div></div></div></a><a href=/posts/2023/mit_6.824_1_gfs/ class=a-block><div class=post-item-wrapper><div class="post-item post-item-no-gaps"><div class=post-item-info-wrapper><div class=post-item-title>MIT 6.824 学习笔记(一) GFS</div><div class=post-item-meta>2023-09-05
&emsp;
&emsp;</div></div></div></div></a></div></div></div><div id=sideContainer class=side-container><a class="a-block nav-head false" href=https://blog.coherence.codes/><div class=nav-title>Coherence's Blog</div></a><div class=nav-link-list><a class="a-block nav-link-item false" href=/posts>存档</a>
<a class="a-block nav-link-item false" href=/tags>标签</a>
Expand Down
7 changes: 6 additions & 1 deletion categories/distributed-system/index.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Distributed System on Coherence's Blog</title><link>https://blog.coherence.codes/categories/distributed-system/</link><description>Recent content in Distributed System on Coherence's Blog</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><copyright>Coherence. 本站遵循 CC BY-NC-SA 4.0 协议</copyright><lastBuildDate>Tue, 05 Sep 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.coherence.codes/categories/distributed-system/index.xml" rel="self" type="application/rss+xml"/><item><title>MIT 6.824 学习笔记(一) GFS</title><link>https://blog.coherence.codes/posts/2023/mit_6.824_1_gfs/</link><pubDate>Tue, 05 Sep 2023 00:00:00 +0000</pubDate><guid>https://blog.coherence.codes/posts/2023/mit_6.824_1_gfs/</guid><description>存储系统通常是一个分布式系统的基石,通常应用可以是无状态的,而所有状态便由存储系统来管理。
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Distributed System on Coherence's Blog</title><link>https://blog.coherence.codes/categories/distributed-system/</link><description>Recent content in Distributed System on Coherence's Blog</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><copyright>Coherence. 本站遵循 CC BY-NC-SA 4.0 协议</copyright><lastBuildDate>Sun, 01 Oct 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.coherence.codes/categories/distributed-system/index.xml" rel="self" type="application/rss+xml"/><item><title>MIT 6.824 学习笔记(二) Raft</title><link>https://blog.coherence.codes/posts/2023/mit_6.824_2_raft/</link><pubDate>Sun, 01 Oct 2023 00:00:00 +0000</pubDate><guid>https://blog.coherence.codes/posts/2023/mit_6.824_2_raft/</guid><description>Note: 为了保持准确性,我会尽量使用英文术语。
为了解决单点故障问题,Raft 采用了 Majority Vote,基本上任何操作都需要得到多数确认才能够执行。为了避免 tie,Raft 的节点数量必须为奇数。因此在一个 2f+1 个节点的系统中,最多允许 f 个节点故障,f+1 即为法定人数(quorum)。
如果 server 不出错,网络也很稳定,共识算法是很简单的,比如在 Raft 中,leader 被选举出来,client 的请求由 leader 处理并转发给 followers,所有 server 都和 leader 保持一致,这个过程是很简单并且直观的。这些算法真正处理的、细节繁杂的地方是 server 出错、RPC 受网络影响(包括包的延迟,重复,顺序改变,丢失,网络分区)的时候。
Introduction 在过去十年, Leslie Lamport 的 Paxos 几乎成了共识的同义词.. Paxos 首先定义了一种协议来对单个决定达成共识, 比如一条单个的 log entry, 这被称为 single-decree Paxos. 其支持多个决定的版本 (比如 log) 被称为 muti-Paxos。然而,Paxos 的缺点是难以理解,并且没有提供一个良好的基础来构建可行的实现。
相较于 Paxos,Raft 的目标是易于理解且符合直觉。为了使 Raft 易于理解,作者采取了解耦 (Raft 将共识问题分解成几个子问题 leader election, log replication, safety, and membership changes) 和缩减状态空间的方式。
Raft 和已有的共识算法类似(尤其是 Viewstamped Replication),但它有一些新特性。Raft 采取了强 leader 的设计,例如 log entry 只会从 leader 向其他节点分发。这可能是为了性能考虑(比无 leader 要更快,RPC 也更少)Raft 采用基于随机计时器的 leader 选举, 从而用一种简单的方法来解决冲突。另外还有处理成员变更方面的改进。</description></item><item><title>MIT 6.824 学习笔记(一) GFS</title><link>https://blog.coherence.codes/posts/2023/mit_6.824_1_gfs/</link><pubDate>Tue, 05 Sep 2023 00:00:00 +0000</pubDate><guid>https://blog.coherence.codes/posts/2023/mit_6.824_1_gfs/</guid><description>存储系统通常是一个分布式系统的基石,通常应用可以是无状态的,而所有状态便由存储系统来管理。
Google 文件系统(The Google File System, GFS)在 2003 年于一篇同名论文中被提出,发表在系统领域顶会 SOSP 上,是 Google 大数据三驾马车之一1。GFS 是一个成功的系统,在 00 年代早期,人们对于分布式文件系统已经有很好的理解了,但是尚未有一个可以扩展到上千个节点的系统被实现出来。很多 GFS 的设计被 HDFS 等后来的分布式文件系统上。
GFS 基于以下几个方面的观察:
节点故障是常见的,因为其运行在大量普通机器(commodity components)上 存储的文件以大文件(数百 MB 到数 GB)为主,小文件应当被支持,但不应对其优化 对文件的大多数写入操作是追加 (append)而不是覆盖/随机写,大多数读取操作是顺序读 (1 MB 或更多) 所以系统必须有良好的并发追加操作的语义 工作负载通常是批处理任务,所以高吞吐量比低延时重要 同时设计应用和文件系统 API 有利于整个系统的灵活性 架构 GFS 采用 Master/Slave 架构,集群中存在一个 master 和多个 chunkservers,并且被多个 clients 访问。(由于单 master 的存在,GFS 存在单点故障的可能性,虽然 master 同样有备份,但恢复可能需要人工干预)一个文件将被分割成多个 chunk。chunk 的特性如下:
Expand Down
2 changes: 1 addition & 1 deletion categories/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<a id=navTitle class=navbar-brand href=https://blog.coherence.codes/>Coherence's Blog</a>
<button type=button class=nav-darkmode-toggle id=darkModeToggleButton2>
<i class=material-icons id=darkModeToggleIcon2>dark_mode</i></button></div></nav><div class=single-column-header-container id=pageHead v-bind:style="{ transform: 'translateZ(0px) translateY('+.3*scrollY+'px)', opacity: 1-navOpacity }"><a href=https://blog.coherence.codes/><div class=single-column-header-title>Coherence's Blog</div></a></div><div id=content><div id=streamContainer class=stream-container><div class="post-list-container post-list-container-shadow"><a class=a-block><div class="post-item-wrapper post-item-wrapper-no-hover"><div class="post-item post-item-no-gaps"><div class=post-item-info-wrapper><div class="post-item-title post-item-title-small">Categories</div></div></div></div></a><div class=tags><div class=tag><a href=/categories/distributed-system/ class="btn btn-outline-secondary position-relative rounded-pill">Distributed System
<span class=badge>(1)</span></a></div><div class=tag><a href=/categories/windows/ class="btn btn-outline-secondary position-relative rounded-pill">Windows
<span class=badge>(2)</span></a></div><div class=tag><a href=/categories/windows/ class="btn btn-outline-secondary position-relative rounded-pill">Windows
<span class=badge>(1)</span></a></div></div></div></div></div><div id=sideContainer class=side-container><a class="a-block nav-head false" href=https://blog.coherence.codes/><div class=nav-title>Coherence's Blog</div></a><div class=nav-link-list><a class="a-block nav-link-item false" href=/posts>存档</a>
<a class="a-block nav-link-item false" href=/tags>标签</a>
<a class="a-block nav-link-item active" href=/categories>分类</a>
Expand Down
2 changes: 1 addition & 1 deletion categories/index.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Categories on Coherence's Blog</title><link>https://blog.coherence.codes/categories/</link><description>Recent content in Categories on Coherence's Blog</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><copyright>Coherence. 本站遵循 CC BY-NC-SA 4.0 协议</copyright><lastBuildDate>Tue, 05 Sep 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.coherence.codes/categories/index.xml" rel="self" type="application/rss+xml"/><item><title>Distributed System</title><link>https://blog.coherence.codes/categories/distributed-system/</link><pubDate>Tue, 05 Sep 2023 00:00:00 +0000</pubDate><guid>https://blog.coherence.codes/categories/distributed-system/</guid><description/></item><item><title>Windows</title><link>https://blog.coherence.codes/categories/windows/</link><pubDate>Fri, 02 Nov 2018 18:23:47 +0000</pubDate><guid>https://blog.coherence.codes/categories/windows/</guid><description/></item></channel></rss>
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Categories on Coherence's Blog</title><link>https://blog.coherence.codes/categories/</link><description>Recent content in Categories on Coherence's Blog</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><copyright>Coherence. 本站遵循 CC BY-NC-SA 4.0 协议</copyright><lastBuildDate>Sun, 01 Oct 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.coherence.codes/categories/index.xml" rel="self" type="application/rss+xml"/><item><title>Distributed System</title><link>https://blog.coherence.codes/categories/distributed-system/</link><pubDate>Sun, 01 Oct 2023 00:00:00 +0000</pubDate><guid>https://blog.coherence.codes/categories/distributed-system/</guid><description/></item><item><title>Windows</title><link>https://blog.coherence.codes/categories/windows/</link><pubDate>Fri, 02 Nov 2018 18:23:47 +0000</pubDate><guid>https://blog.coherence.codes/categories/windows/</guid><description/></item></channel></rss>
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html><html><head><meta name=generator content="Hugo 0.118.2"><title>Coherence's Blog</title><meta charset=utf-8><meta name=X-UA-Compatible content="IE=edge"><meta name=google-site-verification content="3MbbliKSwhNvv713tGB2RL8xvrJC404x1BFONabsw7g"><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0" name=viewport><meta content="telephone=no" name=format-detection><meta name=description content><meta name=renderer content="webkit"><meta name=theme-color content="#ffffff"><link type=text/css rel=stylesheet href=/vendor/css/bootstrap.min.css><link rel=stylesheet href=/scss/journal.min.7c01e9f6fb2f6083d79d2f3a32ec6b7901e262e94a52a64a542aef98bc5bda64.css integrity="sha256-fAHp9vsvYIPXnS86MuxreQHiYulKUqZKVCrvmLxb2mQ=" media=screen><link rel=stylesheet href=/scss/dark-mode.min.cb53f1bee2b8900cb4f082afbf00175d6618f281cf9a2fe8619e3b52d20b5721.css integrity="sha256-y1PxvuK4kAy08IKvvwAXXWYY8oHPmi/oYZ47UtILVyE=" media=screen><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Material+Icons"><script async defer data-domain=blog.coherence.codes src=https://analytics.coherence.space/js/plausible.js></script><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css integrity=sha384-RZU/ijkSsFbcmivfdRBQDtwuwVqK7GMOw6IMvKyeWL2K5UAlyp6WonmB8m7Jd0Hn crossorigin=anonymous><script defer src=https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js integrity=sha384-pK1WpvzWVBQiP0/GjnvRxV4mOb0oxFuyRxJlk6vVw146n3egcN5C925NCP7a7BY8 crossorigin=anonymous></script>
<!doctype html><html><head><meta name=generator content="Hugo 0.119.0"><title>Coherence's Blog</title><meta charset=utf-8><meta name=X-UA-Compatible content="IE=edge"><meta name=google-site-verification content="3MbbliKSwhNvv713tGB2RL8xvrJC404x1BFONabsw7g"><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0" name=viewport><meta content="telephone=no" name=format-detection><meta name=description content><meta name=renderer content="webkit"><meta name=theme-color content="#ffffff"><link type=text/css rel=stylesheet href=/vendor/css/bootstrap.min.css><link rel=stylesheet href=/scss/journal.min.7c01e9f6fb2f6083d79d2f3a32ec6b7901e262e94a52a64a542aef98bc5bda64.css integrity="sha256-fAHp9vsvYIPXnS86MuxreQHiYulKUqZKVCrvmLxb2mQ=" media=screen><link rel=stylesheet href=/scss/dark-mode.min.cb53f1bee2b8900cb4f082afbf00175d6618f281cf9a2fe8619e3b52d20b5721.css integrity="sha256-y1PxvuK4kAy08IKvvwAXXWYY8oHPmi/oYZ47UtILVyE=" media=screen><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Material+Icons"><script async defer data-domain=blog.coherence.codes src=https://analytics.coherence.space/js/plausible.js></script><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css integrity=sha384-RZU/ijkSsFbcmivfdRBQDtwuwVqK7GMOw6IMvKyeWL2K5UAlyp6WonmB8m7Jd0Hn crossorigin=anonymous><script defer src=https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js integrity=sha384-pK1WpvzWVBQiP0/GjnvRxV4mOb0oxFuyRxJlk6vVw146n3egcN5C925NCP7a7BY8 crossorigin=anonymous></script>
<script defer src=https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js integrity=sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl crossorigin=anonymous></script>
<script>document.addEventListener("DOMContentLoaded",function(){renderMathInElement(document.body,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\[",right:"\\]",display:!0}],throwOnError:!1})})</script></head><body><div id=app><div class=single-column-drawer-container id=drawer v-bind:class="{ 'single-column-drawer-container-active': isDrawerOpen }"><div class=drawer-content><div class=drawer-menu><a class="a-block drawer-menu-item false" href=/posts>存档</a>
<a class="a-block drawer-menu-item false" href=/tags>标签</a>
Expand All @@ -8,7 +8,9 @@
<i class=material-icons>menu</i></button>
<a id=navTitle class=navbar-brand href=https://blog.coherence.codes/>Coherence's Blog</a>
<button type=button class=nav-darkmode-toggle id=darkModeToggleButton2>
<i class=material-icons id=darkModeToggleIcon2>dark_mode</i></button></div></nav><div class=single-column-header-container id=pageHead v-bind:style="{ transform: 'translateZ(0px) translateY('+.3*scrollY+'px)', opacity: 1-navOpacity }"><a href=https://blog.coherence.codes/><div class=single-column-header-title>Coherence's Blog</div></a></div><div id=content><div id=streamContainer class=stream-container><div class="post-list-container post-list-container-no-background"><a href=/posts/2023/git_%E5%85%A5%E9%97%A8/ class=a-block><div class=post-item-wrapper><div class="post-item post-item-no-divider"><div class=post-item-info-wrapper><div class=post-item-title>git 入门</div><div class=post-item-summary></div><div class=post-item-meta>2023-09-18
<i class=material-icons id=darkModeToggleIcon2>dark_mode</i></button></div></nav><div class=single-column-header-container id=pageHead v-bind:style="{ transform: 'translateZ(0px) translateY('+.3*scrollY+'px)', opacity: 1-navOpacity }"><a href=https://blog.coherence.codes/><div class=single-column-header-title>Coherence's Blog</div></a></div><div id=content><div id=streamContainer class=stream-container><div class="post-list-container post-list-container-no-background"><a href=/posts/2023/mit_6.824_2_raft/ class=a-block><div class=post-item-wrapper><div class="post-item post-item-no-divider"><div class=post-item-info-wrapper><div class=post-item-title>MIT 6.824 学习笔记(二) Raft</div><div class=post-item-summary></div><div class=post-item-meta>2023-10-01
&emsp;
&emsp;</div></div></div></div><a href=/posts/2023/git_%E5%85%A5%E9%97%A8/ class=a-block><div class=post-item-wrapper><div class="post-item post-item-no-divider"><div class=post-item-info-wrapper><div class=post-item-title>git 入门</div><div class=post-item-summary></div><div class=post-item-meta>2023-09-18
&emsp;
&emsp;</div></div></div></div><a href=/posts/2023/mit_6.824_1_gfs/ class=a-block><div class=post-item-wrapper><div class="post-item post-item-no-divider"><div class=post-item-info-wrapper><div class=post-item-title>MIT 6.824 学习笔记(一) GFS</div><div class=post-item-summary></div><div class=post-item-meta>2023-09-05
&emsp;
Expand All @@ -26,8 +28,6 @@
&emsp;
&emsp;</div></div></div></div><a href=/posts/2022/the-2022-python-language-summit/ class=a-block><div class=post-item-wrapper><div class="post-item post-item-no-divider"><div class=post-item-info-wrapper><div class=post-item-title>The 2022 Python Language Summit</div><div class=post-item-summary></div><div class=post-item-meta>2022-05-23
&emsp;
&emsp;</div></div></div></div><a href=/posts/2022/%E6%B0%91%E6%97%8F%E4%B8%BB%E4%B9%89%E8%87%AA%E5%AA%92%E4%BD%93%E6%98%AF%E5%A6%82%E4%BD%95%E6%B6%88%E8%B4%B9%E6%88%91%E4%BB%AC%E7%9A%84/ class=a-block><div class=post-item-wrapper><div class="post-item post-item-no-divider"><div class=post-item-info-wrapper><div class=post-item-title>民族主义自媒体是如何消费我们的</div><div class=post-item-summary></div><div class=post-item-meta>2022-04-29
&emsp;
&emsp;</div></div></div></div></a></div></div></div><div id=sideContainer class=side-container><a class="a-block nav-head active" href=https://blog.coherence.codes/><div class=nav-title>Coherence's Blog</div></a><div class=nav-link-list><a class="a-block nav-link-item false" href=/posts>存档</a>
<a class="a-block nav-link-item false" href=/tags>标签</a>
<a class="a-block nav-link-item false" href=/categories>分类</a>
Expand Down
Loading

0 comments on commit 42e1d66

Please sign in to comment.