论文:The Chubby Lock Service for Loosely-Coupled Distributed Systems
本篇整理 Google 的 Chubby 论文。每一页保留原始 PDF 页面图;页面图是原文排版、Figure、统计表、脚注和参考文献的原始副本,下面按原页顺序给出中文译文与必要术语说明。
论文:The Chubby Lock Service for Loosely-Coupled Distributed Systems
相关文章:论文:The Google File System(GFS) · 6.5840:Lecture 12 Spanner · 论文:Paxos Made Simple
TL;DR
- 定位:Chubby 是 Google 内部 loosely-coupled distributed system 使用的 coarse-grained lock service,同时提供可靠但低吞吐的 small-file storage、name service 和 configuration repository。
- 核心结构:一个 Chubby cell 通常有 5 个 replica;通过 Paxos 选出 master,master lease 保证同一时刻只有一个 master;write 经过多数 replica,read 由 master 直接服务。
- 客户端语义:client library 提供 file-system-like API、advisory reader/writer lock、event notification、consistent cache、session 和 KeepAlive。
- 安全防护:lock holder 可以取得 sequencer,并把它附加到外部 service RPC;接收方用
CheckSequencer防止 delayed packet 在 lock 已失效后仍生效。 - 工程经验:Chubby 真正最常见的用途不是 lock,而是 name service;大多数负载是 KeepAlive;consistent cache、negative caching、proxy 和 partitioning 比微优化 request path 更重要。
名词解释
| 名词 | 含义 | 本文对应物 |
|---|---|---|
| Cell | 一组 Chubby replica 组成的 service instance | 通常 5 个 replica |
| Master | 当前 cell 的 leader,处理 client request | 由 Paxos/lease 选出 |
| Master lease | replica 对 master 身份的时间承诺 | 保证 read 只由当前 master 服务 |
| Coarse-grained lock | 持有时间较长、获取不频繁的 lock | leader election、work partition |
| Sequencer | 描述 lock acquisition 状态的 opaque byte string | 防 delayed RPC |
| Ephemeral node | session/handle 结束后可自动删除的 node | client liveness indicator |
| Session | client 与 cell 的关系,由 KeepAlive 维护 | handles、locks、cache 的生命周期 |
| Grace period | client 进入 jeopardy 后等待 failover 的时间 | 默认 45 秒 |
| Consistent cache | server invalidation 后 client 才继续使用 cache | 文件、metadata、文件不存在状态 |
| Negative caching | cache“文件不存在”这一事实 | 防止 retry loop 压垮 server |
目录
| 章节 | 内容 |
|---|---|
| 版本与来源 | Google/USENIX 版本、PDF 和图片 |
| 原文页面与逐段翻译 | 16 个 PDF 页面按顺序保留并翻译 |
| 机制索引 | lease、cache、sequencer、failover 和 scaling |
| 本篇验收 | 页数、图片、统计和覆盖范围检查 |
版本与来源
- 论文标题:The Chubby Lock Service for Loosely-Coupled Distributed Systems。
- 作者与机构:Mike Burrows,Google Inc.
- 发表信息:7th USENIX Symposium on Operating Systems Design and Implementation(OSDI ’06),2006。
- 官方来源:Google Research archive;USENIX 页面也提供同一论文的开放版本。
- 本地固定文件:
source/chubby.pdf。 - PDF 固定信息:16 页,每页 612×792 points;SHA-256:
0747c84a49d32744a2744e2f2951b05fb7a0829ce44afb0b700833eb2bb3ecdd。 - 附件处理:每页渲染为 1224×1584 PNG,存放于
assets/38 Chubby/,正文以600宽度嵌入。Figure 1–2、production statistics、公式和 References 由原页图保留。 - 翻译边界:以标题、段落、列表、API、protocol step、统计表和图注为最小翻译单元;Chubby、cell、master、lease、KeepAlive、handle、sequencer、cache、failover 等术语保留 English 或中英并列。
原文页面与逐段翻译
第 1 页:Abstract 与 Introduction

Abstract
本文描述 Chubby lock service 的实践经验。Chubby 面向 loosely-coupled distributed system,提供 coarse-grained locking,以及可靠但低 volume 的 storage。它的 interface 类似 distributed file system:支持 advisory lock,以及 file modification 等事件的 notification;design 更重视 availability 和 reliability,而不是 high performance。
许多 Chubby instance 已运行超过一年,其中一些同时处理数万 client。论文描述最初 design 与预期用途,将其与实际使用情况比较,并说明哪些 design 必须因 experience 而修改。
1 Introduction
Chubby 是一个 lock service,面向由大量小型 machine 组成、machine 通过 high-speed network 连接的 loosely-coupled distributed system。例如,一个 Chubby instance(也称 Chubby cell)可能服务一万台配备四处理器、通过 1 Gbit/s Ethernet 连接的 machine。多数 cell 局限在单一 datacenter 或 machine room,但 Google 至少有一个 cell 的 replica 相距数千公里。
Lock service 的目的,是让 client 协调 activity,并对 environment 的基本信息达成一致。首要目标是 reliability、对中等规模 client 集合的 availability 和易于理解的 semantics;throughput 与 storage capacity 是次要目标。Chubby client interface 类似简单 file system:提供 whole-file read/write,加上 advisory lock 和 file modification 等 event notification。
作者预期 Chubby 用于 coarse-grained synchronization,尤其是从一组等价 server 中选出 leader。例如 GFS 使用 Chubby lock 任命 GFS master;Bigtable 使用 Chubby 选 master、让 master 发现其管理的 server、让 client 找到 master。GFS 与 Bigtable 还把 Chubby 当作 well-known、always-available 的 small metadata location,相当于 distributed data structure 的 root。一些 service 用 lock 在多个 server 之间 coarse-grained 地 partition work。
Chubby 部署前,Google distributed system 通常用 ad hoc method 选 primary(重复 work 没有危害时),或在 correctness 必须保证时依赖 operator intervention。前一种情况下,Chubby 节省少量 computation;后一种情况下,它消除了 failure 时的人工作业,显著提高 availability。
熟悉 distributed computing 的读者会认识到,peer 中选 primary 是 distributed consensus problem 的实例,并且需要 asynchronous communication:Ethernet、Internet 等真实 network 允许 packet 丢失、delay 和 reorder。Asynchronous consensus 可由 Paxos [12, 13] 解决;Oki 和 Liskov 的 viewstamped replication [19, §4] 也使用同一 protocol。Paxos 不依赖 timing assumption 保证 safety,但需要引入 clock 保证 liveness,从而绕过 Fischer 等人的 impossibility result [5, §1]。
构建 Chubby 是满足上述需求的 engineering effort,而不是 research;作者不声称提出新 algorithm 或 technique。本文的目的是解释做了什么、为什么这样做。后文介绍 Chubby 的 design、implementation、实际使用方式以及哪些 feature 最终证明是错误决定。
第 2 页:Design Rationale 与 System Structure(上)

2 Design
2.1 Rationale
有人可能认为应该构建一个实现 Paxos 的 library,而不是访问 centralized lock service 的 library。Client-side Paxos library 除 name service 外不依赖其他 server,并假设 service 能实现为 state machine,从而提供标准 framework。Google 确实也提供独立于 Chubby 的 client library。
但 lock service 有几个优点。第一,developer 通常不会按理想方式为 high availability 做规划。许多 system 从 low-load prototype 开始,availability guarantee 宽松,代码没有按 consensus protocol 特别组织。随着 service 成熟、client 增加,availability 变重要,于是才加入 replication 和 primary election。Lock server 更容易在保持已有 program structure 与 communication pattern 的同时加入这些功能。
例如,为了选出 master 并让它写现有 file server,只需增加两条 statement 和一个 RPC parameter:获得 lock 成为 master;把 lock acquisition count 附加到 write RPC;file server 若发现 acquisition count 低于当前值就 reject write,以防 delayed packet。相比让已有 server 参与 consensus,尤其在 transition period 需要 compatibility 时,这种方法更容易。
第二,许多需要选 primary 或 partition data 的 service 还要 advertise 结果。因此应允许 client 存取小量 data,即 read/write small file。虽然可以使用 name service,但 lock service 自身更合适:client 依赖的 server 数量更少,而且 protocol 的 consistency feature 可以共享。Chubby 作为 name server 的成功,很大程度来自 consistent client caching,而不是基于 time 的 cache。Developer 不必选择类似 DNS TTL 的 cache timeout;TTL 选错会造成 DNS load 或长 fail-over time。
第三,lock-based interface 对 programmer 更熟悉。Paxos 的 replicated state machine 与 exclusive lock 的 critical section 都能给 programmer sequential-programming 的 illusion。虽然 distributed system 中使用 lock 经常会出错,但 lock 的 familiar appearance 降低了推广可靠 distributed decision mechanism 的门槛。
第四,distributed-consensus algorithm 用 quorum 做 decision,需要多个 replica 才能 high availability。例如 Chubby cell 通常有 5 个 replica,其中 3 个运行即可 up。若 service 使用 lock service,即使只有一个 client active,也能安全 progress;lock service 像一个 generic electorate,使 client system 在自身成员少于 majority 时仍能正确 decision,从而减少 reliable client system 需要的 server 数量。
也可以构建只提供 Paxos acceptor 的 consensus service。但除非它只用来提供 lock(那就退化为 lock service),否则无法解决上述其他问题。因此设计作出两个关键决定:选择 lock service,而非 library 或 consensus service;提供 small-file service,让 elected primary advertise identity/parameter,而不另建第二个 service。
其他决定来自预期用途:一个 Chubby file 可能有数千 client,需要高效让大量 client observe;client 与 replicated service replica 需要知道 primary change,因此需要 event notification;文件被频繁 polling,需要 cache;developer 不喜欢反直觉 cache semantics,因此选择 consistent cache;为避免 financial loss 与 jail time,需要 security mechanism,包括 access control。
作者特别指出,Chubby 不面向 fine-grained lock,而是 coarse-grained use:例如一个 application 用 lock 选 primary,primary 随后处理数小时或数天的 data access。Coarse-grained lock acquisition 很少,lock-server temporary unavailability 对 client 影响小;但 lock transfer 可能需要昂贵 recovery,所以希望 lock server failure 不会丢 lock。
Fine-grained lock 的要求不同:短暂 server unavailability 就可能让大量 client stall;transaction rate 随 client transaction rate 增长,performance 与随时添加 server 很重要;可以在 lock-server failure 时丢掉短 lease,减少维护成本。Chubby 只提供 coarse-grained locking;client 可以用 Chubby coarse lock 把 lock group 分配给 application-specific lock server,由后者维护 fine-grained lock。
第 3 页:System Structure 与 Figure 1

2.2 System Structure
Chubby 有两个通过 RPC communication 的主要 component:server,以及 client application link 的 library;所有 client-server communication 都由 client library mediated。可选的第三 component 是 proxy server,在第 3.1 节讨论。
一个 Chubby cell 由少量 server(通常 5 个 replica)组成,replica 放置在不同 rack 等位置以降低 correlated failure。Replica 使用 distributed consensus protocol 选 master。Master 必须获得 majority vote,以及这些 replica 在几秒钟的 master lease 内不选其他 master 的 promise。只要 master 持续赢得 majority vote,replica 就周期性 renew lease。
Replica 保存 simple database 的 copy,但只有 master 发起 database read/write;其他 replica 通过 consensus protocol 接收 master update 并复制。Client 通过向 DNS 列出的 replica 发送 master-location request 找 master;non-master replica 返回 master identity。找到 master 后,client 一直向它发 request,直到 master 不再 response 或明确表示自己不再是 master。
Write request 通过 consensus protocol 传播到所有 replica,达到 cell majority 后才 acknowledge;read request 只由 master 直接满足。只要 master lease 未过期,这样是安全的,因为不可能同时存在另一个 master。Master failure 后,其他 replica 在 master lease 到期时运行 election;通常数秒内选出新 master。作者观察到两次 election 分别耗时 6 s 和 4 s,最高可达 30 s。
若 replica 数小时无法恢复,replacement system 从 free pool 选 fresh machine,启动 lock-server binary,更新 DNS 中 failed replica 的 IP。Current master 周期性 poll DNS,发现变化后把 cell member list 更新到 database;该 list 经正常 replication protocol 在所有 member 间保持一致。新 replica 从 file server backup 与 active replica update 的组合中获取 database copy;处理完 master 正等待 commit 的某个 request 后,才允许它参与 new-master election。
Figure 1:System structure
原图展示一个 Chubby cell 的 5 个 server replica 与多个 client application;每个 client 通过 chubby library 向 master 发 RPC。完整结构图由页面图保留。
第 4 页:Files、Directories、Handles 与 Locks 引入

2.3 Files, directories, and handles
Chubby export 一个类似但比 UNIX 简单的 file-system interface。Namespace 是严格 tree,file/directory name 用 slash 分隔,例如 /ls/foo/wombat/pouch。ls 是所有 Chubby name 的 common prefix,第二部分 foo 是 Chubby cell name,通过 DNS 解析为一个或多个 Chubby server;特殊 cell name local 表示使用 client 所在的 local cell。其余 /wombat/pouch 在指定 cell 内解释。
每个 directory 有 child file/directory list,每个 file 是 uninterpreted byte sequence。由于 namespace 像 file system,Chubby 可同时提供 specialized API 和其他 file system(如 GFS)使用的 interface,降低 browsing/name-space tool 开发成本。
为便于 distribution,Chubby 与 UNIX 有差异:不支持把 file 从 directory move 到另一个 directory;不维护 directory modified time;不采用 path-dependent permission,file access 由 file 自身 permission 控制;不暴露 last-access time,以便 cache file metadata。
Namespace 只有 file 和 directory,统称 node;每个 node 在 cell 中只有一个 name,不存在 symbolic/hard link。Node 可以 permanent 或 ephemeral;任何 node 都可显式 delete,ephemeral node 在没有 client open 时自动删除(directory 还必须为空)。Ephemeral file 可作为 temporary file 或 client liveness indicator。任何 node 都可作为 advisory reader/writer lock。
每个 node 有 metadata,包括三个 ACL name:控制 read、write、修改 ACL name。创建时默认继承 parent directory ACL。ACL 本身是 ACL directory 中的 file,内容是 principal name list;RPC system 负责 user authentication,因此 ACL file 也可被其他 service 复用。
每个 node 有四个 monotonically increasing 64-bit number:instance number(大于此前同名 node 的 instance number);content generation number(file content write 时增加);lock generation number(lock 从 free 变 held 时增加);ACL generation number(ACL name write 时增加)。此外还有 64-bit file-content checksum,client 可用它判断 file 是否不同。
Client open node 得到类似 UNIX file descriptor 的 handle。Handle 包含 check digit,防止 client 创建或猜测 handle,因此完整 access check 只需在创建时做;包含 sequence number,让 master 区分当前 master 还是 previous master 生成的 handle;包含 open 时的 mode information,让新 master 能在收到旧 handle 时重建 state。
2.4 Locks and Sequencers
每个 Chubby file/directory 都可以作为 reader-writer lock:一个 client handle 可持有 exclusive writer lock,或多个 handle 持有 shared reader lock。Lock 是 advisory 的:它只与针对同一 lock 的其他 acquire attempt 冲突;持有名为 F 的 lock 不要求访问 file F,也不阻止其他 client 访问它。
作者拒绝 mandatory lock:Chubby lock 常保护其他 service 实现的 resource,强制执行需要大量修改;debug/admin 访问不应被迫关闭 application;developer 已通过“lock X is held” assertion 做 error checking,buggy/malicious process 仍可在不持锁时损坏 data,因此 mandatory guard 的额外价值有限。
Acquire 任意模式的 lock 都需要 write permission,防止无权 reader 阻止 writer progress。
第 5 页:Sequencer、Lock Delay 与 Events

Distributed locking 很复杂:持锁 process 发送 request R 后 failure,另一个 process 获得 lock 并执行 action;R 延迟到达时可能在无 lock 保护下作用于 inconsistent data。把 sequence number 加入现有复杂 system 的所有 interaction 成本很高,因此 Chubby 提供 sequencer:lock holder 可取得描述 acquisition 后 lock state 的 opaque byte string,包括 lock name、exclusive/shared mode 和 lock generation number。
Client 把 sequencer 传给受 lock 保护的 server(例如 file server),接收方检查 sequencer 是否仍 valid、mode 是否合适;无效就 reject request。Server 可用自身 Chubby cache 检查,也可在不维护 Chubby session 时使用最近观察到的 sequencer。Sequencer 只需给 affected message 增加一个 string,容易向 developer 解释。
对尚不支持 sequencer 的 server,Chubby 提供不完美但更简单的 lock-delay。正常 Release 后 lock 立即可被其他 client acquire;若因为 holder failure 或 inaccessible 而 free,lock server 会阻止其他 client 在一段 lock-delay 内 claim。Client 可指定不超过上限(当前 1 分钟)的 delay,防止 faulty client 永久占用 resource。Lock-delay 虽不完美,却能保护未修改的 server/client,抵御日常 message delay 与 restart。
2.5 Events
Client 创建 handle 时可订阅 event,event 由 Chubby library asynchronous up-call 交给 application,包括:file content modified(监控 service advertisement);child node added/removed/modified(实现 mirroring,也能监视 ephemeral file 而不增加 reference count);Chubby master failover(提醒可能丢 event,需 rescan);handle/lock invalid(通常表示 communication problem);lock acquired(判断 primary elected);conflicting lock request(支持 lock cache)。
Event 在对应 action 已发生后发送。因此收到“file content changed”后,client 之后 read 一定能看到新 data 或更近的 data。
后两个 event 实际很少使用,事后看可以省略:primary election 后,client 通常需要和新 primary communication,而不是只知道 primary 存在,因此会等待 file-modification event(新 primary 把 address 写进 file);conflicting-lock event 理论上允许 client cache 其他 server 上的数据,但目前没有 application 采用这种方式。
第 6 页:API 与 Caching

2.6 API
Client 把 Chubby handle 看成 pointer to opaque structure。Handle 只由 Open() 创建、由 Close() 销毁。Open() 打开 named file/directory,类似 UNIX file descriptor;只有它接收 node name,其他 operation 作用于 handle。Name 相对于现有 directory handle 解释;library 提供始终 valid 的 / handle。Directory handle 避免 multi-threaded、multi-layer program 使用 process-wide current directory 的困难。
Client 在 Open() 指定:handle 用于 read、write/lock 或 change ACL;要接收的 event;lock-delay;是否创建(或必须创建)file/directory。创建 file 时可提供 initial content 和 ACL;return value 表示是否真的新建。
Close() 关闭 handle,此后不能再使用,且不会 failure。Poison() 让当前及之后 operation failure 但不 close handle,便于一个 thread 取消另一个 thread 发起的 Chubby call,而不释放对方仍访问的 memory。
主要 handle operation:GetContentsAndStat() atomic、完整地读 file content 与 metadata;GetStat() 只读 metadata;ReadDir() 返回 directory child name/metadata;SetContents() atomic、完整写 file,可带 content generation number,模拟 compare-and-swap;SetACL() 类似地更新 ACL;Delete() 删除无 child 的 node;Acquire()、TryAcquire()、Release() 管理 lock;GetSequencer() 返回 held lock 的 sequencer;SetSequencer() 绑定 sequencer,之后 sequencer invalid 时 operation failure;CheckSequencer() 检查 validity。
如果 node 在 handle 创建后被 delete,即使之后以相同 name recreate,旧 handle 的 call 仍 failure;handle 绑定的是 file instance 而不是 name。每个 call 还有 operation parameter,可携带 asynchronous callback、等待完成的控制信息,以及 extended error/diagnostic information。
用这个 API 做 primary election 很直接:所有 potential primary open lock file 并尝试 acquire;一个成功成为 primary,其余作为 replica。Primary 用 SetContents() 把自身 identity 写入 lock file;client/replica 用 GetContentsAndStat() 读取,或响应 file-modification event。理想情况下 primary 用 GetSequencer() 获得 sequencer,传给它 communication 的 server,由 server CheckSequencer() 确认 primary 仍有效;不支持 sequencer 的 service 可使用 lock-delay。
2.7 Caching
为减少 read traffic,Chubby client 在 memory 中 cache file data 与 node metadata,包括 file absence。Cache 是 consistent、write-through cache,由 lease 维护;master 记录每个 client 可能 cache 的 data,并通过 invalidation 保持一致。Protocol 保证 client 要么看到 consistent Chubby state,要么得到 error。
修改 file data/metadata 时,master 先向可能 cache 它的每个 client 发送 invalidation,修改被阻塞;invalidation 通过 KeepAlive RPC 传输。Client 收到后 flush invalidated state,并在下一次 KeepAlive 中 acknowledge。只有所有 client 都 acknowledge,或 cache lease 过期,server 才继续 modification。
只需一轮 invalidation,因为在 acknowledgment 到达前 master 把 node 标记为 uncachable。这样 read 始终可无 delay 处理;read 远多于 write。另一种方案是 invalidation 期间 block access,但会引入偶发 delay。
Protocol 只在 change 时 invalidate,不主动 update cache。Update-only protocol 可能 arbitrarily inefficient:访问过 file 的 client 可能不断收到不必要 update。作者拒绝 weaker consistency,因为 programmer 更难使用;也拒绝要求所有 message 带 sequence number 的 virtual synchrony,因为环境中已有 communication protocol 太多。
Chubby 还 cache open handle:client 再次 open 曾打开过的 file 时,只有第一次 Open() 必然需要 master RPC。限制包括:application close 后不能继续持有 ephemeral-file handle;允许 lock 的 handle 可以 reuse,但不能被多个 application handle concurrent 使用,因为 client 可能用 Close()/Poison() 的副作用取消 master 上 pending 的 Acquire()。
Protocol 还允许 client cache lock,即持有时间超过当前需要,以便稍后复用。若另一个 client 请求冲突 lock,event 会通知 holder,使它在 lock 真正被需要时 release。
第 7 页:Sessions、KeepAlive 与 Grace Period

2.8 Sessions and KeepAlives
Chubby session 是 cell 与 client 的 relationship,存在于一段时间,由周期性 handshake,即 KeepAlive 维护。只要 session valid,除非 client 另行通知,client 的 handle、lock 和 cached data 都保持 valid;某些情况下 client 必须 acknowledge cache invalidation 才能维持 session。
Client 第一次联系 cell master 时 request new session;client terminate 或 idle 一分钟(无 open handle 且无 call)时显式结束 session。每个 session 有 lease,即 master 保证不 unilateral terminate session 的 future interval;interval 终点叫 session lease timeout。Master 可以把 timeout 向未来延长,但不能往回移动。
Master 在 session creation、master failover 和响应 client KeepAlive 时推进 lease timeout。收到 KeepAlive 后,master 通常把 RPC block 到 client 上一 lease 快过期时才 return,并在 reply 中告知新的 timeout;默认延长 12 s,overloaded master 可使用更长 interval,减少 KeepAlive 数量。Client 收到 reply 后立即发下一次 KeepAlive,因此 master 几乎始终有一个 blocked KeepAlive。
KeepAlive reply 同时传输 event 与 cache invalidation。需要传递 event/invalidation 时 master 可提前 return KeepAlive。把 event piggyback 到 KeepAlive 让 client 无法不 acknowledge invalidation 就维持 session,并让所有 Chubby RPC 从 client 向 master 发起,简化 client,也适用于只能允许单方向连接的 firewall。
Client 维护 master lease timeout 的 conservative approximation。由于 KeepAlive reply 的 network flight time,以及 master clock 可能比 client clock 快,client 必须保守估计;为保持 consistency,要求 server clock 不以超过已知 constant factor 的速度快于 client clock。
若 client local lease timeout 到期,它无法确定 master 是否已 terminate session。Client 清空并禁用 cache,进入 jeopardy;随后等待默认 45 s 的 grace period。如果在 grace period 结束前 client 与 master 成功完成 KeepAlive,重新启用 cache;否则认为 session expired。这样 Chubby API 在 cell inaccessible 时不会无限 block,grace period 结束后 call 返回 error。
Library 可在 grace period 开始时发送 jeopardy event;session 确认 survived communication problem 后发送 safe event;session timeout 则发送 expired event。Application 可以在不确定 session 状态时 quiesce,并在问题 transient 时恢复,而不用 restart,这对 startup cost 很高的 service 很重要。
如果 client 持有 node handle H,且 H 的 operation 因 session expired failure,那么之后除 Close()、Poison() 外的 operation 都以同样方式 failure。这样 client 可保证 network/server outage 只丢失 operation sequence 的 suffix,而不是任意 subsequence,便于用最后一次 write 标记复杂 change 已 commit。
Figure 2:The role of the grace period in master fail-over
原图展示 old master death、new master election、client lease C1/C2/C3、master lease M1/M2/M3、KeepAlive、jeopardy、grace period 和 safe 状态之间的时间关系。时间从左到右但不按比例;原图保留完整箭头与标注。
第 8 页:Master Failover

2.9 Fail-overs
Master failure 或失去 mastership 时,master 丢弃关于 session、handle、lock 的 in-memory state。Session lease 的 authoritative timer 在 master 上,因此 election 期间 timer 停止;这等价于延长 client lease,是合法的。若 master election 很快,client 可在 local approximate lease 到期前联系新 master;若 election 很慢,client flush cache,在寻找新 master 时等待 grace period。因此 grace period 能让 session 跨越超过 normal lease timeout 的 failover。
Figure 2 的长 failover 流程如下:old master 为 client 承诺 M1,client 保守地看到 C1;master 在 KeepAlive reply 2 前 commit M2,client 将 local view 延长为 C2;master 在下一次 KeepAlive reply 前死亡,过一段时间新 master elected;C2 到期,client flush cache 并开始 grace period。期间 client 不 tear down session,但 block 所有 application API call,避免 application 观察到 inconsistent data,并发送 jeopardy event。
新 master election 成功后,先使用 predecessor 可能授予 client 的 session lease 的 conservative approximation M3。Client 第一次 KeepAlive 因 master epoch number 错误而 reject;重试 request 成功,通常不会把 master lease 进一步延长,但 reply 使 client 得到 C3。只要 grace period 覆盖 C2 结束到 C3 开始的 interval,application 看到的只是 delay;若 grace period 太短,client 会放弃 session 并报告 failure。
Client 联系新 master 后,library 与 master 合作向 application 制造“没有 failure”的 illusion。新 master 必须重构 predecessor 的 in-memory state:从 stable disk data(经 consensus replication)、client state 和 conservative assumption 中恢复 session、lock、ephemeral file 与 handle。
第 9 页:Failover Steps、Database、Backup 与 Mirroring

New master 的步骤:
- 选择新的 client epoch number,要求每个 call 携带它;旧 epoch request 被 reject,并返回新 epoch,防止旧 master 的 delayed packet 影响 new master。
- 可以回复 master-location request,但暂不处理 session-related operation。
- 从 database 中记录的 session/lock 建立 in-memory structure,并把 session lease 延长到 predecessor 可能使用的最大值。
- 只允许 client 执行 KeepAlive,暂不允许其他 session operation。
- 对每个 session 发 failover event;client flush cache(可能漏掉 invalidation),并警告 application 可能丢失其他 event。
- 等每个 session acknowledge failover event 或 expire。
- 允许所有 operation 继续。
- 若 client 使用 failover 前创建的 handle(由 handle sequence number 判断),master recreate handle state 并执行 call;handle close 后,把它记录为当前 master epoch 已 closed,避免 delayed/duplicate packet 重新创建。Faulty client 在 future epoch recreate closed handle 无害。
- 一段时间(例如 1 分钟)后删除没有 open handle 的 ephemeral file;failover 后 client 应在此期间 refresh handle。副作用是:若某 ephemeral file 最后一个 client 在 failover 中丢 session,file 可能不会立即消失。
Failover code 运行频率远低于其他 code,因此成为 interesting bug 的丰富来源。
2.10 Database implementation
Chubby 第一版使用 replicated Berkeley DB。Berkeley DB 提供把 byte-string key 映射到 byte-string value 的 B-tree;定制 key-comparison function,先按 path component 数量排序,使 node 以 path name 为 key、sibling node 保持相邻。由于 Chubby 不使用 path-based permission,每次 file access 只需一次 database lookup。
Berkeley DB 通过 distributed consensus protocol 在 server 集合中复制 database log;加入 master lease 后,设计与 Chubby 匹配,implementation 简单。但 Berkeley DB replication code 当时较新,维护者更优先处理更常用 feature;作者认为依赖该 code 风险较高,于是重写了一个使用 write-ahead logging 与 snapshotting 的 simple database,类似 Birrell 等人 [2]。Chubby 只需要 atomic operation,不需要 general transaction,重写显著简化系统。
2.11 Backup
每隔数小时,每个 Chubby cell master 把 database snapshot 写到另一 building 的 GFS file server。独立 building 使 backup 能在 building damage 后存活,也避免 backup 引入 cyclic dependency:同一 building 的 GFS cell 可能依赖 Chubby 选 master。Backup 既用于 disaster recovery,也用于初始化 replacement replica,避免给 serving replica 增加负载。
2.12 Mirroring
Chubby 允许把一组 file 从一个 cell mirror 到另一个 cell。因为 file 小,event mechanism 会立即通知 add/delete/modify,所以 mirroring 很快;无 network problem 时,数十个 worldwide mirror 通常不到 1 s 即更新。Mirror unreachable 时保持旧状态,连接恢复后通过 checksum 比较找到 updated file。
最常见用途是把 configuration file 复制到全球多个 computing cluster。特殊的 global cell 拥有 /ls/global/master subtree,并 mirror 到其他 cell 的 /ls/cell/slave。Global cell 的 5 个 replica 分布在全球不同位置,因此对大多数 organization 几乎 always accessible。它提供 Chubby ACL、cell/system advertisement、Bigtable cell location pointer 和各种 configuration file。
第 10 页:Scaling、Proxy 与 Partitioning

3 Mechanisms for scaling
Chubby client 是 individual process,因此 client 数量可能远超过 machine 数。作者观察到一个 master 可直接服务 90,000 client。一个 cell 只有一个 master,且 master machine 与 client machine 同等级,client 很容易压垮 master。因此最有效的 scaling technique 是显著减少与 master 的 communication,而不是微调 request processing。
使用的手段包括:建立任意多个 cell,client 通过 DNS 使用 nearby cell;高负载时把 lease 从默认 12 s 增加到约 60 s,减少 KeepAlive RPC;client cache file data、metadata、file absence 和 open handle;使用 protocol-conversion server 把 Chubby protocol 转成 DNS 等简单 protocol。
3.1 Proxies
Trusted proxy 可以用同一 Chubby protocol 转发其他 client request。Proxy 可处理 KeepAlive 与 read request,降低 master load;write 必须穿过 proxy cache,但 write 在 normal workload 中小于 1%,所以 proxy 能显著增加 client 数。若 proxy 服务 N_proxy 个 client,KeepAlive traffic 可减少 N_proxy 倍,可能达到一万倍;proxy cache 对 read traffic 的减少最多约为平均 read-sharing factor 10。由于 read 目前不到 Chubby load 的 10%,KeepAlive 节省最重要。
Proxy 会给 write 和 first-time read 增加一个 RPC;每个 proxied client 依赖 proxy 与 master 两台 machine,因此 cell temporary unavailable 的概率可能增加。原有 failover strategy 对 proxy 并不理想,第 4.4 节讨论。
3.2 Partitioning
Chubby interface 的选择允许按 directory partition namespace。若启用,一个 cell 包含 N 个 partition,每个 partition 有自己的 replica set 和 master。Directory D 中的 node D/C 放在 P(D/C) = hash(D) mod N;但 D 的 metadata 可能在 parent D' 对应的 P(D) = hash(D') mod N。
Partitioning 目标是构建大 Chubby cell,且 partition 间 communication 少。由于 Chubby 没有 hard link、directory modified time 和 cross-directory rename,少数 operation 仍需跨 partition:ACL 是 file,一个 partition 可能要向另一个做 permission check,但 ACL 易 cache,只有 Open/Delete 必需;删除 directory 时可能要跨 partition 确认它为空。因为多数 call 可在单 partition 独立处理,作者预期这类 communication 对 performance/availability 影响有限。
第 11 页:Production Use、统计与行为

Partition 数量不大时,每个 client 可能联系多数 partition;partitioning 把任一 partition 的 read/write traffic 降低约 N 倍,却不一定降低 KeepAlive traffic。因此若需要更多 scale,策略是 proxy + partitioning 组合。
4 Use, surprises and design errors
4.1 Use and behaviour
论文给出一个 Chubby cell 的典型快照,RPC rate 统计窗口为 10 分钟:距上次 failover 18 天;failover duration 14 s;direct active client 22k;additional proxied client 32k;open file 12k;naming-related file 60%;client-caching-file entry 230k;distinct cached file 24k;negative-cached name 32k;exclusive lock 1k;shared lock 0;stored directory 8k;ephemeral 0.1%;stored file 22k。
File size 中,0–1k bytes 占 90%,1k–10k 占 10%,大于 10k 占 0.2%。用途包括 naming 46%、mirrored ACL/config 27%、GFS/Bigtable metadata 11%、ephemeral 3%。RPC rate 为 1–2k/s,其中 KeepAlive 93%、GetStat 2%、Open 1%、CreateSession 1%、GetContentsAndStat 0.4%、SetContents 680 ppm、Acquire 31 ppm。
这些数字说明:大量 file 用于 naming;configuration、ACL、metadata file 常见;negative caching 很重要;230k / 24k ≈ 10,平均每个 cached file 被十个 client 使用;很少 client 持 lock,shared lock 更少,符合 lock 主要用于 primary election 与 replica data partition;RPC traffic 主要是 session KeepAlive,read(cache miss)较少,write 和 lock acquisition 极少。
在若干 cell 的几周、共 700 cell-day 样本中(排除主动关闭 datacenter 的 maintenance),记录 61 次 outage。多数 outage 为 15 s 或更短,52 次低于 30 s;多数 application 不会显著受 30 s 以下 outage 影响。其余 9 次来自 network maintenance 4 次、疑似 network connectivity 2 次、software error 2 次、overload 1 次。
数十 cell-year 中发生 6 次 data loss,原因是 database software error 4 次、operator error 2 次,没有 hardware error;两次发现 non-master replica software corruption。Chubby data 能放入 RAM,因此大多数 operation 很便宜;production server mean request latency 通常是 millisecond 的小 fraction,接近 overload 才急剧增加并丢 session。通常 active session 超过 90,000 会 overload,异常情况还包括数百万并发 read 或 client cache 被禁用造成每秒数万 request。
Local-cell client 端 read latency 小于 1 ms,跨 antipode 可达 250 ms;包含 lock 的 write 还需 database log update 多 5–10 ms,若 recently failed client cache 了 file,可能延迟数十秒。但 write 极少,所以对 server mean latency 影响小。作者发现 Chubby scaling 的关键不是 server performance,而是减少 communication;client local cache 的性能 bug 则很容易被发现。
第 12 页:Java Client、Name Service 与 Failover Problem

4.2 Java clients
Google infrastructure 主要使用 C++,但越来越多 system 用 Java 编写。这给 Chubby 带来意外问题:Chubby client protocol complex,client-side library 也 non-trivial。
Java 以 application portability 换取 incremental adoption 的不便;通过 JNI 访问 non-native library 通常被认为 slow/cumbersome。Java programmer 不喜欢 JNI,为避免它宁愿把 large library 翻译成 Java 并自行维护。
Chubby C++ client library 约 7,000 行,与 server 相当,client protocol 也 delicate。维护 Java 版需要成本,若没有 cache 又会加重 Chubby server。因此 Java user 运行 protocol-conversion server:它 export 与 Chubby client API 接近的 simple RPC protocol。即使事后看来,作者也无法明确知道如何避免编写、运行、维护这个 additional server 的成本。
4.3 Use as a name service
Chubby 虽设计为 lock service,最流行用途却是 name server。普通 DNS 使用基于 time 的 cache:entry 有 TTL,超过 TTL 未 refresh 就丢弃。若希望 failed service prompt replacement,TTL 必须很小,可能压垮 DNS server。
Google developer 常运行数千 process 的 job,每个 process 与其他 process communication,形成 quadratic DNS lookup。假设 TTL 为 60 s,一个 3,000-client job 的 DNS cache 维护就需要每秒约 150,000 lookup,而 2-CPU 2.6 GHz Xeon DNS server 约只能处理每秒 50,000 request;更大 job 或并发 job 会更糟。Chubby 出现前,DNS load variability 是 Google 的 serious problem。
Chubby 使用 explicit invalidation:只要 session KeepAlive 保持稳定,client 可以无限期保留任意数量 cache entry;没有 change 就不会产生额外 lookup。2-CPU 2.6 GHz Xeon 的 Chubby master 曾直接处理 90,000 client(无 proxy),包括上述 communication pattern 的 large job。快速 name update 且不需要逐一 polling,使 Chubby 成为 Google 多数 system 的 name service。
但 load spike 仍可能有问题。最初部署 Chubby name service 时,启动 3,000-process job 会产生 900 万 request,几乎压垮 master。作者把 name entry 分组,每次 lookup 返回并 cache 一个 job 中通常 100 个相关 process 的 mapping。
Chubby cache semantics 比 name service 所需更强;name resolution 只需要 timely notification,不需要 full consistency。因此可以另建专门的 protocol-conversion server。若预见 Chubby 会成为 name service,作者可能更早实现 full proxy,以免增加这个额外 server。另有 Chubby DNS server,把 Chubby name data 提供给 DNS client,用于 DNS→Chubby 过渡及难以修改的 browser 等 application。
4.4 Problems with fail-over
原 master failover design 要求新 session 创建时写入 database。Berkeley DB 版中,大量 process 同时启动会让 session-create overhead 成为问题。因此改成 session 第一次 modification、lock acquisition 或 open ephemeral file 时才写入 database;active session 还以一定 probability 在每次 KeepAlive 记录。
这样虽然把 read-only session write 分散开,却有危险:年轻的 read-only session 可能没有记录,failover 时被丢弃。它们不持 lock,但若所有 recorded session 都在新 master 上 check in,而 discarded session lease 尚未到期,discarded session 可能短暂 read stale data。实践中这种情况很少,因为大型 system 中几乎总有 session 不 check in,迫使新 master 等 maximum lease time。
后来 design 不再把 session record 写入 database,而像 master recreate handle 一样 recreate session。新 master 在允许 operation 前要等待完整 worst-case lease timeout,因为不知道所有 session 是否 check in;实践影响仍小。Session 可无盘 recreate 后,proxy 可以管理 master 尚不知道的 session;proxy 可专用 operation 修改 lock 关联的 session,从而一个 proxy failure 后由另一个 proxy take over client。Master 还要保证在新 proxy claim 前不释放该 proxy session 的 lock/ephemeral-file handle。
第 13 页:Abusive Clients

4.5 Abusive clients
Google project team 可以自建 Chubby cell,但会增加 maintenance burden 和 hardware consumption,所以许多 service 使用 shared cell,必须隔离 client misbehavior。Chubby 在单一公司内部运行,malicious denial-of-service 少见;但 mistake、misunderstanding 和 developer expectation 不同,会造成类似 attack 的效果。
Google 会 review project team 的 Chubby use plan,直到 review 满意才开放 shared namespace。问题在于 developer 常无法预测未来 use 与 growth;这也讽刺地暴露了作者无法预测 Chubby 自己用途的问题。
Review 最重要的内容,是判断 RPC rate、disk space、file number 是否随 user number 或 processed-data amount 线性(或更快)增长;任何 linear growth 都必须用可调 parameter 限制到合理 load。早期 review 不够彻底,此外 software documentation 缺少 performance advice,一个 team 写的 module 可能一年后被另一个 team 复用并产生灾难性效果。
典型问题包括:
Lack of aggressive caching:最初没有意识到 cache“file absence”和 reuse open handle 的重要性。Developer 常在 file 不存在时无限 retry,或通过反复 open/close polling。最初用 exponential delay 抑制短时间内重复 Open(),但最终发现让 repeated Open() 变 cheap 比持续教育更容易。
Lack of quotas:Chubby 从未 intended 作为 large-data storage,因此没有 storage quota,事后看很 naïve。某 project 把 upload metadata 放 Chubby,原本 user 少、upload 少;后来两个 service 复用该 module,user population 增长,单个 1.5 MB file 每次 user action 都被完整重写,整个 service 占用空间超过所有其他 Chubby client 总和。作者加入 256 KB file-size limit,并推动迁移到合适 storage,但生产数据迁移耗时约一年。
Publish/subscribe:有人尝试把 Chubby event mechanism 当作 Zephyr 风格的 publish/subscribe。由于 Chubby guarantee heavyweight,且 cache consistency 使用 invalidation 而非 update,它对除最简单例子外的 pub/sub 都慢且低效;这些用途在 redesign 成本过大前被发现。
第 14 页:Lessons Learned 与 Related Work

4.6 Lessons learned
Developers rarely consider availability:developer 很少考虑 failure probability,倾向假设 Chubby always available。曾有 system 使用数百台 machine,在 Chubby 选新 master 时启动耗时数十分钟的 recovery procedure,把一次 failure 的影响放大数百倍。作者希望 developer 规划短暂 Chubby outage,使 application 基本不受影响,这也是 coarse-grained locking 的理由。
Service “up” 不等于对 application “available”。Global Chubby cell 因地理分散,通常很少两个 datacenter 同时 down,因此几乎 always up;但 client 观察到的 availability 可能低于 local cell:local cell 更不容易与 client partition,而 local-cell maintenance 也会同时影响 client machine,导致 outage 不被 client 额外感知。
API choice 也影响 developer 处理 outage 的方式。Chubby 提供 master failover event,让 client 检查可能丢失的其他 event;但很多 developer 收到该 event 后直接 crash application,显著降低 availability。也许发送冗余 file-change event,或保证 failover 不丢 event,会更好。
目前通过三种方式避免 developer 过度乐观:review project 的 Chubby use 并提醒不要过度绑定 availability;提供 high-level library,自动隔离 Chubby outage;对每次 outage 做 post-mortem,既修复 Chubby/operation bug,也降低 application 对 Chubby availability 的敏感度。
Fine-grained locking could be ignored:第 2.1 节曾设计 client 自建 fine-grained lock server,但至今没有需要它;developer 为优化 application,常常移除不必要 communication,而这往往意味着使用 coarse-grained lock。
Poor API choices have unexpected effects:取消 long-running call 的方式是 Close()/Poison(),同时会丢 server handle state,阻止多个 thread 共享可 acquire lock 的 handle。未来可能增加独立 Cancel() RPC。
RPC use affects transport protocols:KeepAlive 同时 refresh session lease、传递 event/cache invalidation,因此 client 不能在不 acknowledge invalidation 的情况下 refresh lease。但 TCP backoff 不关注 Chubby lease 的 high-level timeout,拥塞时 TCP KeepAlive 会造成大量 session loss;作者被迫用没有 congestion avoidance 的 UDP 发送 KeepAlive。未来可能增加 TCP GetEvent(),正常情况下传 event/invalidation,而 KeepAlive reply 仍带 unacknowledged event list,保证最终 acknowledge。
5 Comparison with related work
Chubby 建立在 distributed file system 的 cache、Echo session/cache token、V system lease、VMS lock manager 与 file-system namespace 等 well-established idea 上。它与 Echo/AFS 等 distributed file system 的目标不同:client 不读写 large data,不追求 high throughput 或 cache miss 下的 low latency;相反,它追求 consistency、availability、reliability。因为 database 小,Chubby 可以在线保存许多副本(通常 5 个 replica 和几个 backup),每天多次 full backup,每隔数小时用 checksum 比较 replica。
放宽 file-system performance/storage requirement 后,一个 master 可以服务数万 client;central point 让 client 共享 information、协调 activity,解决一类 developer problem。
论文还比较 Boxwood lock server。Chubby 将 lock、reliable small-file storage、session/lease 合并成一个 service;Boxwood 分为 lock service、Paxos service 和 failure-detection service。Chubby 面向从 expert 到 administration-script novice 的 diverse audience,提供 familiar API;Boxwood 更像供少量 sophisticated developer 组合的 toolkit。
Chubby 比 Boxwood 提供更高层 interface:把 lock/file namespace 合并,client 默认 cache file;Boxwood failure detector 由 client 每 200 ms contact、timeout 1 s,Chubby 默认 lease 12 s、KeepAlive 每 7 s;Boxwood 2–3 replica,Chubby 通常 5 replica。Chubby 的 grace period 也与 Boxwood 不同:它允许 client ride out long master outage,而 lost Chubby lock 对 client 成本很高。Chubby lock 更 heavyweight,需要 sequencer 安全保护 external resource;Boxwood lock 更 lightweight,主要供 Boxwood 内部使用。
第 15 页:Summary 与 References(上)

6 Summary
Chubby 是 Google distributed system 中用于 coarse-grained synchronization 的 distributed lock service,也被广泛用作 name service 和 configuration repository。它把几种 well-known idea 组合得很好:少量 replica 之间的 distributed consensus 提供 fault tolerance;consistent client-side caching 在保持简单 semantics 的同时降低 server load;及时 notification 传播 update;familiar file-system interface 降低使用门槛。
Chubby 使用 cache、protocol-conversion server 和简单 load adaptation,让每个 instance 服务数万 client process;未来可通过 proxy 与 partitioning 继续 scale。Chubby 已成为 Google 的 primary internal name service,是 MapReduce 等 system 的 common rendezvous mechanism;GFS、Bigtable 用它从 redundant replica 中选 primary;需要 high availability 的 ACL 等 file 也以它作为 standard repository。
References(1–12)
- Birman、Joseph,《Exploiting Virtual Synchrony in Distributed Systems》;virtual synchrony。
- Birrell、Jones、Wobber,《A Simple and Efficient Implementation for Small Databases》;small database implementation。
- Chang et al.,《Bigtable: A Distributed Structured Data Storage System》;Bigtable。
- Dean、Ghemawat,《MapReduce: Simplified Data Processing on Large Clusters》;MapReduce。
- Fischer、Lynch、Paterson,《Impossibility of Distributed Consensus with One Faulty Process》;FLP impossibility。
- French、Kohl,《The Zephyr Programmer’s Manual》;Zephyr pub/sub reference。
- Ghemawat、Gobioff、Leung,《The Google File System》;GFS。
- Gosling、Joy、Steele、Bracha,《Java Language Spec.(2nd Ed.)》;Java specification。
- Gray、Cheriton,《Leases: An Efficient Fault-Tolerant Mechanism for Distributed File Cache Consistency》;distributed cache lease。
- Howard et al.,《Scale and Performance in a Distributed File System》;distributed file system performance。
- Jefferson,《Virtual Time》;virtual time。
- Lamport,《The Part-Time Parliament》;Paxos。
第 16 页:References(下)

References(13–24)
- Lamport,《Paxos Made Simple》;Paxos 的简化说明。
- Lampson,《How to Build a Highly Available System Using Consensus》;consensus-based availability。
- Liang,《Java Native Interface: Programmer’s Guide and Reference》;JNI。
- MacCormick et al.,《Boxwood: Abstractions as the Foundation for Storage Infrastructure》;Boxwood storage infrastructure。
- Mann et al.,《A Coherent Distributed File Cache with Directory Write-behind》;distributed file cache。
- McJones、Swart,《Evolving the UNIX System Interface to Support Multithreaded Programs》;UNIX interface evolution。
- Oki、Liskov,《Viewstamped Replication: A General Primary Copy Method to Support Highly-Available Distributed Systems》;viewstamped replication。
- Olson、Bostic、Seltzer,《Berkeley DB》;Berkeley DB。
- Pike et al.,《Plan 9 from Bell Labs》;Plan 9 namespace/group reference。
- Ritchie、Thompson,《The UNIX Time-sharing System》;UNIX。
- Snaman、Thiel,《The VAX/VMS Distributed Lock Manager》;VMS lock manager。
- Yin et al.,《Separating Agreement from Execution for Byzantine Fault Tolerant Services》;BFT agreement/execution separation。
机制索引
| 机制 | 论文位置 | 与本专栏其他笔记的连接 |
|---|---|---|
| Paxos + master lease | Sections 1–2.2 | 用 consensus 选 master,用 lease 保证 read safety;连接 论文:Paxos Made Simple |
| Cell / replica set | Section 2.2 | 通常 5 replica、3 个可服务,连接 GFS/Bigtable |
| File-system namespace | Section 2.3 | small file、ACL、ephemeral node 和 name service |
| Advisory lock | Sections 2.3–2.4 | 不强制阻止 file access,只协调同一 lock 的 acquire |
| Sequencer | Section 2.4 | 把 lock generation 传到 external service,防 delayed RPC |
| Event notification | Section 2.5 | file change、child change、failover、lock event |
| Consistent cache/invalidation | Section 2.7 | strict semantics、negative caching、read scaling |
| Session/KeepAlive | Section 2.8 | lease、jeopardy、safe、expired、grace period |
| Failover reconstruction | Section 2.9 | epoch、handle recreate、ephemeral file、cache flush |
| Backup/mirroring | Sections 2.11–2.12 | GFS backup、global cell、configuration propagation |
| Proxy/partitioning | Section 3 | 降低 KeepAlive/read traffic,继续扩展 client scale |
| Name-service workload | Section 4.3 | Chubby 最终的主流用途,DNS 的补充/替代 |
本篇验收
- [x] 官方 Google archive PDF 已固定:16 页,每页 612×792 points。
- [x] SHA-256 已记录:
0747c84a49d32744a2744e2f2951b05fb7a0829ce44afb0b700833eb2bb3ecdd。 - [x] 16 个原始页面均渲染为 1224×1584 PNG,并按
600宽度嵌入。 - [x] Abstract、Sections 1–6、Figure 1–2、cell/master/lease、file/ACL/handle、advisory lock、sequencer、events、API、consistent cache、session、grace period、failover、database、backup、mirroring、proxy、partitioning、production statistics、Java/name-service experience、abusive clients、lessons、related work、summary 和 24 条 References 均按原页顺序完成译注或由原页图保留。
- [x] 术语如 master lease、KeepAlive、sequencer、lock-delay、ephemeral node、negative caching、jeopardy、grace period、failover、proxy 和 partitioning 保留 English 或中英并列。
- [x] Figure、统计表、协议步骤、API 列表、脚注和 References 的原始排版由原页图片保留;翻译层按 16 页原始顺序对应。
评论 (0)