注:其中,最后17个小节标题尚未译完,其余译完的标题尚未定稿,会与正式版有出入。仅供参考。
Acknowledgments 第2版赞誉
Preface 前言
Who Should Read This Book 读者对象
How This Book Is Organized 内容结构
About the Case Studies 案例研究
Online Resources 在线资源
- Living in Production 生产环境的生存法则
1.1 Aiming for the Right Target 瞄准正确的目标
1.2 The Scope of the Challenge 应对不断扩大的挑战范围
1.3 A Million Dollars Here, a Million Dollars There 多花5万美元来节省100万美元
1.4 Use the Force 让“原力”与决策同在
1.5 Pragmatic Architecture 设计务实的架构
1.6 Wrapping Up 总结
Part I. Create Stability 创造稳定性
- Case Study: The Exception That Grounded an Airline 案例研究:让航空公司停飞的代码异常
2.1 The Change Window 进行变更
2.2 The Outage 遭遇停机
2.3 Consequences 严重后果
2.4 Postmortem 验尸报告
2.5 Hunting for Clues 寻找线索
- Getting Thread Dumps 获取线程转储
2.6 The Smoking Gun 证据确凿
2.7 An Ounce of Prevention? 来点预防?
- Stabilize Your System 让系统稳定运行
3.1 Defining Stability 定义稳定性
3.2 Extending Your Life Span 延长系统寿命
3.3 Failure Modes 系统失效方式
3.4 Stopping Crack Propagation 阻止裂纹蔓延
3.5 Chain of Failure 系统失效链
3.6 Wrapping Up 总结
- Stability Antipatterns 稳定性的反模式
4.1 Integration Points 集成点
- You Have How Many Feeds? 有多少传入数据?
4.1.1 Socket-Based Protocols 基于socket的协议
4.1.2 The 5 A.M. Problem 凌晨5点的催命电话
- Packet Capture 数据包捕获
4.1.3 HTTP Protocols HTTP协议
4.1.4 Vendor API Libraries 供应商的API程序库
4.1.5 Countering Integration Point Problems 应对集成点的问题
Remember This 要点回顾
4.2 Chain Reactions 链式反应
- Searching... 搜索...
Remember This 要点回顾
4.3 Cascading Failures 层叠失效
Remember This 要点回顾
4.4 Users 用户
4.4.1 Traffic 网络流量
4.4.1.1 Heap Memory 堆内存
4.4.1.2 Off-Heap Memory, Off-Host Memory 堆外内存和主机外内存
4.4.1.3 Sockets
4.4.1.4 Closed Sockets 已关闭的sockets
4.4.2 Expensive to Serve 难伺候的用户
4.4.3 Unwanted Users 不受欢迎的用户
- Session Tracking 会话跟踪
4.4.4 Malicious Users 恶意用户
Remember This 要点回顾
4.5 Blocked Threads 阻塞的线程
4.5.1 Spot the Blocking 发现阻塞
- Use Caching, Carefully 使用缓存要谨慎
4.5.2 Libraries 程序库
Remember This 要点回顾
4.6 Self-Denial Attacks 自黑式攻击
4.6.1 Avoiding Self-Denial 避免自黑式攻击
Remember This 要点回顾
4.7 Scaling Effects 放大效应
4.7.1 Point-to-Point Communications 点对点通信
4.7.2 Shared Resources 共享资源
Remember This 要点回顾
4.8 Unbalanced Capacities 失衡的系统容量
4.8.1 Drive Out Through Testing 通过测试来发现
Remember This 要点回顾
4.9 Dogpile 叠罗汉
- Colo Workaround 公用托管机房的变通方法
Remember This 要点回顾
4.10 Force Multiplier 力量倍增器
4.10.1 Outage Amplification 被放大了的停机事故
4.10.2 Controls and Safeguards 控制和防护措施
Remember This 要点回顾
4.11 Slow Responses 缓慢的响应
Remember This 要点回顾
4.12 Unbounded Result Sets 无限长结果集
4.12.1 Black Monday 黑色星期一
Remember This 要点回顾
4.13 Wrapping Up 总结
- Stability Patterns 稳定性的模式
5.1 Timeouts 超时
- Is All This Clutter Really Necessary? 这一切杂乱真的是必需的吗?
Remember This 要点回顾
5.2 Circuit Breaker 断路器
Remember This 要点回顾
5.3 Bulkheads 舱壁
Remember This 要点回顾
5.4 Steady State 稳态
5.4.1 Data Purging 数据清除
5.4.2 Log Files 日志文件
- What About Compliance? Don’t We Have to Keep All Our Log Files Forever? 为了达到合规性,难道不应该永远保留所有的日志文件吗?
5.4.3 In-Memory Caching 内存中缓存
Remember This 要点回顾
5.5 Fail Fast 快速失败
- “We Got the Fax—It’s All Black” “我们收到了传真,怎么全是黑的?”
Remember This 要点回顾
5.6 Let It Crash 任其崩溃
5.6.1 Limited Granularity 有限的粒度
5.6.2 Fast Replacement 快速更换
5.6.3 Supervision 监督
5.6.4 Reintegration 重新归队
Remember This 要点回顾
5.7 Handshaking 握手
5.7.1 Remember This 要点回顾
5.8 Test Harnesses 考验机
- Why Not Mock Objects? 为什么不用mock对象?
Remember This 要点回顾
5.9 Decoupling Middleware 将中间件解耦
Remember This 要点回顾
5.10 Shed Load 卸下负载
Remember This 要点回顾
5.11 Create Back Pressure 构建背压机制
Remember This 要点回顾
5.12 Governor 节速器
Remember This 要点回顾
5.13 Wrapping Up 总结
Part II. Design for Production 为生产环境而设计
- Case Study: Phenomenal Cosmic Powers, Itty-Bitty Living SpaceCase Study: Phenomenal Cosmic Powers, Itty-Bitty Living Space 案例研究:屋漏偏逢连夜雨
6.1 Baby’s First Christmas 宝宝的第一个圣诞节
6.2 Taking the Pulse 把脉
6.3 Thanksgiving Day 感恩节
6.4 Black Friday 黑色星期五
6.5 Vital Signs 生命体征
6.6 Diagnostic Tests 诊断测试
6.7 Call In a Specialist 求助专家
6.8 Compare Treatment Options 挑选应对办法
6.9 Does the Condition Respond to Treatment? 应对办法奏效吗?
- Recovery-Oriented Computing 面向恢复的计算
6.10 Winding Down 尾声
- Foundations 基础层
7.1 Networking in the Data Center and the Cloud 数据中心和云端的联网
7.1.1 NICs and Names 网卡和名字
7.1.2 Programming for Multiple Networks 多网络编程
- Outbound Connections 出站连接
7.2 Physical Hosts, Virtual Machines, and Containers 物理主机、虚拟机和容器
7.2.1 Physical Hosts 物理主机
7.2.2 Virtual Machines in the Data Center 数据中心的虚拟机
7.2.3 Containers in the Data Center 数据中心的容器
- Virtual LANs for Virtual Machines 虚拟机的虚拟局域网
- The 12-Factor App 12要素应用程序
7.2.4 Virtual Machines in the Cloud 云上的虚拟机
7.2.5 Containers in the Cloud 云上的容器
7.3 Wrapping Up 总结
- Processes on Machines 机器上的进程
8.1 Code 代码
8.1.1 Building the Code 构建代码
8.1.2 Immutable and Disposable Infrastructure 不可变和一次性基础设施
8.2 Configuration 配置
8.2.1 Configuration Files 配置文件
8.2.2 Configuration with Disposable Infrastructure 一次性基础设施中的配置
- Naming Configuration Properties 配置里的属性的命名
8.3 Transparency 明晰性
8.3.1 Designing for Transparency 为明晰性而设计
8.3.2 Enabling Technologies 提升明晰性的实现技术
8.3.3 Logging 记录日志
8.3.3.1 Log Locations 日志的存放位置
8.3.3.2 Logging Levels 日志级别
- Debug Logs in Production 在生产环境中打开“调试”级别日志
8.3.3.3 Human Factors 日志读者的因素
8.3.3.4 Voodoo Operations 巫毒运维
8.3.3.5 Final Notes on Logging 记录日志的最后说明
8.3.4 Instance Metrics 实例的健康度量指标
8.3.5 Health Checks 健康状况检查
8.4 Wrapping Up 总结
- Interconnect 互连层
9.1 Solutions at Different Scales 不同规模的解决方案
9.2 DNS
9.2.1 Service Discovery with DNS 使用DNS进行服务发现
9.2.2 Load Balancing with DNS 使用DNS进行负载均衡
9.2.3 Global Server Load Balancing with DNS 使用DNS进行全球服务器负载均衡
9.2.4 Availability of DNS DNS的可用性
Remember This 要点回顾
9.3 Load Balancing 负载均衡
9.3.1 Software Load Balancing 软件负载均衡
9.3.2 Hardware Load Balancing 硬件负载均衡
9.3.3 Health Checks 健康状况检查
9.3.4 Stickiness 会话粘性
9.3.5 Partitioning Request Types 区分请求类型
Remember This 要点回顾
9.4 Demand Control 控制需求数量
9.4.1 How Systems Fail 系统如何失效
9.4.2 Preventing Disaster 预防灾难
- TIME_WAIT and the Bogons TIME_WAIT和乱包
Remember This 要点回顾
9.5 Network Routing 网络路由
- Unreliable Enumeration “一模一样”的机器其实并不一样
9.6 Discovering Services 发现服务
9.7 Migratory Virtual IP Addresses 迁移虚拟IP地址
9.8 Wrapping Up 总结
- Control Plane 控制层
10.1 How Much Is Right for You? 哪个适合你?
10.2 Mechanical Advantage 机械效益
10.2.1 System Failure, Not Human Error 属于系统失效,而非人为错误
10.2.2 Automation Goes Really Fast 自动化工具运行得太快了
10.3 Platform and Ecosystem 平台和生态系统
10.4 Development Is Production 开发环境就是生产环境
10.5 System-Wide Transparency 整个系统的明晰性
10.5.1 Real-User Monitoring 真实用户监控
10.5.2 Economic Value 经济价值
10.5.3 The Risk of Fragmentation 碎片化的风险
10.5.4 Logs and Stats 日志和统计信息
10.5.5 What to Expose 要监控什么
10.6 Configuration Services 配置服务
10.7 Provisioning and Deployment Services 环境整备和部署服务
- Build Server as Attack Vector 将构建服务器用作攻击媒介
10.8 Command and Control 命令与控制
10.8.1 Controls to Offer 要控制什么
10.8.2 Sending Commands 发送命令
10.8.3 Scriptable Interfaces 可编写脚本的界面
Remember This 要点回顾
10.9 The Platform Players 平台厂商
10.10 The Shopping List 购物清单
10.11 Wrapping Up 总结
- Security 安全性
11.1 The OWASP Top 10 OWASP十大安全漏洞
11.1.1 Injection 注入
11.1.2 Broken Authentication and Session Management 失效的身份验证和会话管理
11.1.3 Cross-Site Scripting 跨站脚本
11.1.4 Broken Access Control 失效的访问控制
11.1.4.1 Deter URL Probing 让URL探测令人望而却步
11.1.4.2 Authorize Access to Objects 授予对象访问权限
11.1.5 Security Misconfiguration 安全配置失误
11.1.6 Sensitive Data Exposure 敏感数据泄漏
11.1.7 Insufficient Attack Protection 攻击防范不足
11.1.8 Cross-Site Request Forgery 伪造跨站请求
11.1.9 Using Components with Known Vulnerabilities 使用含有已知漏洞的组件
11.1.10 Underprotected APIs API保护不足
11.2 The Principle of Least Privilege 最小特权原则
11.2.1 Containers and Least Privilege 容器和最小特权
11.3 Configured Passwords 配置的密码
11.4 Security as an Ongoing Process 安全即持续的过程
11.5 Wrapping Up 总结
Part III. Deliver Your System 将系统交付
- Case Study: Waiting for Godot 案例研究:等待戈多
- Design for Deployment 为部署而设计
13.1 So Many Machines 如此多的机器
13.2 The Fallacy of Planned Downtime 计划停机时间的谬误
13.3 Automated Deployments 自动化部署
13.4 Continuous Deployment 持续部署
13.5 Phases of Deployment 部署中的各阶段
13.5.1 Relational Database Schemata 关系数据库schema
13.5.2 Schemaless Databases 无schema数据库
13.5.3 Web Assets Web资源
13.5.4 Rollout 推出新代码
13.5.5 Cleanup 清理
13.6 Deploy Like the Pros 像内行一样部署
13.7 Wrapping Up 总结
- Handling Versions 处理版本问题
14.1 Help Others Handle Your Versions 帮助他人处理版本问题
14.1.1 Nonbreaking API Changes 不会破坏API的变更
14.1.2 Breaking API Changes 破坏API的变更
14.2 Handle Others’ Versions 处理其他系统的版本问题
14.3 Wrapping Up 总结
Part IV. Solve Systemic Problems 解决系统性的问题
- Case Study: Trampled by Your Own Customers 案例分析:被你自己的客户所折磨
15.1 Countdown and Launch 倒计时与新推出系统
15.2 Aiming for Quality Assurance 以QA测试为目标
- Conway’s Law 康威定律
15.3 Load Testing 负载测试
15.4 Murder by the Masses 被众多因素所害
15.5 The Testing Gap 测试还是有差距
15.6 Aftermath 善后
- Adaptation 适应性
16.1 Convex Returns 努力与回报的关系
16.2 Process and Organization 过程和组织
- The Danger of Thrashing 颠簸的危险
16.2.1 Platform Team 平台团队
- The Fallacy of the “DevOps Team” “DevOps团队”的谬误
16.2.2 Painless Releases 无痛的发布
16.2.3 Service Extinction 服务灭绝
16.2.4 Team-Scale Autonomy 团队规模的自治
- No Coordinated Deployments 无须协调的部署
16.2.5 Beware Efficiency 谨防高效率
16.2.6 Summary 小结
16.3 System Architecture 系统架构
16.3.1 Evolutionary Architecture 进化式架构
- Bad Layering 分层之祸
- A Note on Microservices 关于微服务的提示
16.3.2 Loose Clustering 松散地集群
16.3.3 Explicit Context 显式上下文
16.3.4 Create Options 创造更多选项
16.3.4.1 Splitting 拆分
16.3.4.2 Substituting 替代
16.3.4.3 Augmenting and Excluding 增添和排除
16.3.4.4 Inversion 反转
16.3.4.5 Porting 移植
16.3.5 Summary 小结
16.4 Information Architecture 信息架构
16.4.1 Messages, Events, and Commands 消息、事件和命令
16.4.2 Services Control Their Identifiers 让服务自己控制其资源的ID
16.4.3 URL Dualism URL的两重性
16.4.4 Embrace Plurality
16.4.5 Avoid Concept Leakage
16.4.6 Summary
16.5 Wrapping Up 总结
- Chaos Engineering 混沌工程
17.1 Breaking Things to Make Them Better
17.2 Antecedents of Chaos Engineering
17.3 The Simian Army
17.3.1 Opt In or Opt Out?
17.4 Adopting Your Own Monkey
17.4.1 Prerequisites
17.4.2 Designing the Experiment
17.4.3 Injecting Chaos
- Introducing Chaos to Your Neighbors
17.4.4 Targeting Chaos
- Cunning Malevolent Intelligence
17.4.5 Automate and Repeat
17.5 Disaster Simulations
17.6 Wrapping Up 总结
Bibliography