Preface |
|
xiii | |
Part I. Fundamentals and Architecture |
|
|
1 The Evolution of Storage |
|
|
3 | (10) |
|
Storage Needs for Today's Data |
|
|
3 | (2) |
|
The Growth of Data: Exabytes, Hellabytes, and Beyond |
|
|
4 | (1) |
|
Requirements for Storing Unstructured Data |
|
|
4 | (1) |
|
No One-Size-Fits-All Storage System |
|
|
5 | (1) |
|
Object Storage Compared with Other Storage Types |
|
|
6 | (1) |
|
A New Storage Architecture: Software-Defined Storage |
|
|
7 | (1) |
|
Software-Defined Storage Components |
|
|
8 | (2) |
|
Benefits of Software-Defined Storage |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
10 | (3) |
|
|
13 | (8) |
|
|
17 | (4) |
|
3 Swift's Data Model and Architecture |
|
|
21 | (20) |
|
|
21 | (3) |
|
|
24 | (3) |
|
|
27 | (2) |
|
|
29 | (1) |
|
|
30 | (7) |
|
Ring Basics: Hash Functions |
|
|
31 | (1) |
|
Ring Basics: Consistent Hashing Ring |
|
|
32 | (3) |
|
The Rings: Modified Consistent Hashing Ring |
|
|
35 | (2) |
|
|
37 | (1) |
|
Creating and Updating the Rings |
|
|
37 | (2) |
|
Creating or Updating Builder Files |
|
|
37 | (1) |
|
|
38 | (1) |
|
|
38 | (1) |
|
|
39 | (2) |
|
|
41 | (12) |
|
Talking to the Cluster: The Swift API |
|
|
41 | (1) |
|
|
42 | (2) |
|
|
42 | (1) |
|
|
43 | (1) |
|
|
43 | (1) |
|
Authorization and Taking Action |
|
|
44 | (1) |
|
|
44 | (1) |
|
|
45 | (4) |
|
|
46 | (2) |
|
Custom Client Applications |
|
|
48 | (1) |
|
|
49 | (1) |
|
|
50 | (3) |
Part II. Application Design with Swift |
|
|
5 Overview of the Swift API |
|
|
53 | (16) |
|
|
53 | (1) |
|
|
54 | (1) |
|
Swift's Sweet Spot: High Availability, Redundancy, and Throughput |
|
|
55 | (1) |
|
|
56 | (5) |
|
Review of the Hypertext Transfer Protocol (HTTP) |
|
|
57 | (2) |
|
Representational State Transfer (REST) |
|
|
59 | (1) |
|
|
60 | (1) |
|
|
61 | (6) |
|
|
61 | (1) |
|
|
62 | (1) |
|
|
63 | (2) |
|
|
65 | (1) |
|
|
66 | (1) |
|
|
67 | (1) |
|
|
67 | (2) |
|
|
69 | (10) |
|
|
69 | (1) |
|
The Authentication Exchange |
|
|
70 | (1) |
|
Storage Requests: Basic Usage |
|
|
71 | (3) |
|
Client Libraries in Other Languages |
|
|
74 | (1) |
|
|
74 | (1) |
|
|
74 | (1) |
|
|
75 | (1) |
|
Storage Requests: Advanced Usage |
|
|
75 | (1) |
|
Additional Considerations When Using Python |
|
|
76 | (1) |
|
|
77 | (2) |
|
|
79 | (22) |
|
|
79 | (2) |
|
|
81 | (1) |
|
|
81 | (1) |
|
Temporary URL Middleware (TempURL) |
|
|
82 | (1) |
|
|
82 | (1) |
|
|
83 | (1) |
|
PUTting and POSTing Metadata |
|
|
84 | (1) |
|
Cross-Origin Resource Sharing (CORS) |
|
|
84 | (1) |
|
|
85 | (1) |
|
|
86 | (1) |
|
|
86 | (1) |
|
|
87 | (1) |
|
|
88 | (1) |
|
Bulk Operations Middleware |
|
|
88 | (1) |
|
|
89 | (11) |
|
|
89 | (1) |
|
|
90 | (1) |
|
|
91 | (1) |
|
TempURL (Time-Limited URLs) |
|
|
92 | (1) |
|
|
93 | (1) |
|
Cross-Origin Resource Sharing |
|
|
94 | (1) |
|
|
95 | (1) |
|
|
95 | (1) |
|
|
96 | (1) |
|
|
97 | (1) |
|
|
98 | (1) |
|
|
99 | (1) |
|
|
99 | (1) |
|
|
99 | (1) |
|
|
100 | (1) |
|
8 Developing Swift Middleware |
|
|
101 | (20) |
|
|
101 | (2) |
|
|
103 | (2) |
|
Streaming and Making Modifications to Data |
|
|
105 | (1) |
|
Configuring Middleware Through Paste |
|
|
106 | (3) |
|
How to Write Swift Middleware |
|
|
109 | (1) |
|
|
110 | (1) |
|
|
111 | (1) |
|
|
112 | (5) |
|
A Look Back and a Look Forward |
|
|
117 | (1) |
|
|
118 | (3) |
Part III. Installing Swift |
|
|
9 Installing OpenStack Swift from Source |
|
|
121 | (26) |
|
Downloading OpenStack Swift |
|
|
121 | (2) |
|
|
122 | (1) |
|
Installing the Swift CLI (python-swiftclient) |
|
|
122 | (1) |
|
|
122 | (1) |
|
Copying in Swift Configuration Files |
|
|
123 | (1) |
|
|
123 | (14) |
|
|
123 | (4) |
|
|
127 | (2) |
|
Creating the Ring Builder Files |
|
|
129 | (5) |
|
Adding Devices to the Builder Files |
|
|
134 | (2) |
|
|
136 | (1) |
|
|
136 | (1) |
|
Configuring Swift Logging |
|
|
137 | (1) |
|
Creating the Log Configuration File |
|
|
137 | (1) |
|
Restarting Rsyslog to Begin Swift Logging |
|
|
138 | (1) |
|
Configuring a Proxy Server |
|
|
138 | (1) |
|
Setting the Hash Path Prefix and Suffix |
|
|
138 | (1) |
|
Starting the Proxy Server |
|
|
139 | (1) |
|
Setting up TempAuth Authentication and Authorization with Swift |
|
|
139 | (3) |
|
|
139 | (1) |
|
Adding Users to proxy-server.conf |
|
|
140 | (1) |
|
Starting the Servers and Restarting the Proxy |
|
|
141 | (1) |
|
|
141 | (1) |
|
|
142 | (1) |
|
|
143 | (1) |
|
|
144 | (1) |
|
Starting the Consistency Processes |
|
|
145 | (1) |
|
|
145 | (1) |
|
Starting the Remaining Consistency Processes |
|
|
146 | (1) |
|
|
146 | (1) |
|
|
147 | (16) |
|
SwiftStack Controller and Node Overview |
|
|
147 | (3) |
|
|
147 | (2) |
|
|
149 | (1) |
|
Creating a Swift Cluster Using SwiftStack |
|
|
150 | (9) |
|
Creating a SwiftStack Controller User |
|
|
151 | (1) |
|
Installing the SwiftStack Node Software |
|
|
151 | (1) |
|
|
152 | (1) |
|
|
152 | (1) |
|
|
153 | (1) |
|
Enabling a SwiftStack Node |
|
|
154 | (1) |
|
Provisioning a SwiftStack Node |
|
|
154 | (1) |
|
|
155 | (1) |
|
|
156 | (1) |
|
|
157 | (1) |
|
Creating a Container and Uploading an Object via Web Console |
|
|
158 | (1) |
|
|
159 | (4) |
Part IV. Planning a Swift Deployment |
|
|
|
163 | (12) |
|
Node Hardware Specifications |
|
|
164 | (6) |
|
|
164 | (3) |
|
|
167 | (2) |
|
|
169 | (1) |
|
|
170 | (3) |
|
|
171 | (1) |
|
|
172 | (1) |
|
|
172 | (1) |
|
|
173 | (1) |
|
|
173 | (1) |
|
Other Networking Connections |
|
|
173 | (1) |
|
|
173 | (2) |
|
12 Planning a Swift Deployment |
|
|
175 | (18) |
|
|
175 | (2) |
|
|
177 | (9) |
|
|
177 | (5) |
|
|
182 | (1) |
|
Defining Your Cluster Space |
|
|
182 | (2) |
|
|
184 | (1) |
|
Authentication and Authorization |
|
|
185 | (1) |
|
|
186 | (4) |
|
|
187 | (1) |
|
|
188 | (2) |
|
|
190 | (2) |
|
Small Cluster: Several Nodes |
|
|
191 | (1) |
|
Medium-Size Cluster: Multi-Rack |
|
|
191 | (1) |
|
Large Cluster: Multi-Region |
|
|
191 | (1) |
|
|
192 | (1) |
|
13 Authentication and Authorization |
|
|
193 | (26) |
|
|
193 | (10) |
|
|
194 | (2) |
|
|
196 | (3) |
|
|
199 | (2) |
|
|
201 | (2) |
|
Using the Auth Token in Storage Requests |
|
|
203 | (1) |
|
|
203 | (6) |
|
|
203 | (1) |
|
|
204 | (3) |
|
Storage Request Processing |
|
|
207 | (1) |
|
Token Verification and Authorization Information Lookup |
|
|
208 | (1) |
|
Authorization Callback and Response |
|
|
208 | (1) |
|
Authorization and Access Levels |
|
|
209 | (1) |
|
Account-Level Access Control |
|
|
210 | (2) |
|
|
211 | (1) |
|
|
211 | (1) |
|
|
211 | (1) |
|
JSON for Account Access Control |
|
|
211 | (1) |
|
Container-Level Access Control |
|
|
212 | (2) |
|
|
213 | (1) |
|
Swift Authentication Systems |
|
|
214 | (2) |
|
|
214 | (1) |
|
|
214 | (1) |
|
|
215 | (1) |
|
SwiftStack Authentication Systems |
|
|
216 | (1) |
|
|
216 | (1) |
|
|
216 | (1) |
|
SwiftStack Active Directory |
|
|
217 | (1) |
|
|
217 | (2) |
|
14 Cluster Tuning and Optimization |
|
|
219 | (16) |
|
|
219 | (8) |
|
|
220 | (1) |
|
|
221 | (2) |
|
Settings for Background Daemons |
|
|
223 | (4) |
|
Externally Managed Settings |
|
|
227 | (1) |
|
|
227 | (6) |
|
|
227 | (1) |
|
|
228 | (3) |
|
|
231 | (1) |
|
|
231 | (2) |
|
|
233 | (1) |
|
|
234 | (1) |
|
15 Operating a Swift Cluster |
|
|
235 | (30) |
|
Operational Considerations |
|
|
235 | (2) |
|
How Swift Distributes Data |
|
|
236 | (1) |
|
Keeping Track of the Rings and Builder Files |
|
|
236 | (1) |
|
|
237 | (10) |
|
|
238 | (1) |
|
|
238 | (1) |
|
Existing Cluster: Initial Ring on Node |
|
|
239 | (3) |
|
|
242 | (5) |
|
|
247 | (4) |
|
|
248 | (1) |
|
|
249 | (2) |
|
Managing Capacity Additions with SwiftStack |
|
|
251 | (5) |
|
|
252 | (1) |
|
|
252 | (1) |
|
|
253 | (1) |
|
|
254 | (1) |
|
|
254 | (1) |
|
|
254 | (2) |
|
|
256 | (4) |
|
Swift-Specific Metrics: What to Look For |
|
|
256 | (1) |
|
Monitoring and Logging Tools |
|
|
257 | (1) |
|
|
258 | (2) |
|
Operating with SwiftStack |
|
|
260 | (5) |
Part V. Debugging and Troubleshooting |
|
|
16 Hardware Failures and Recovery |
|
|
265 | (8) |
|
|
265 | (2) |
|
|
267 | (1) |
|
Handling Sector or Partial Drive Failure (a.k.a. Bit Rot) |
|
|
267 | (1) |
|
Handling Unreachable Nodes |
|
|
268 | (1) |
|
|
269 | (1) |
|
|
270 | (1) |
|
|
271 | (2) |
|
|
273 | (26) |
|
|
275 | (1) |
|
Performance Metrics, Benchmarking, and Testing |
|
|
275 | (6) |
|
Preparing Your Cluster for Benchmarking |
|
|
276 | (1) |
|
Pitfalls and Mistakes to Avoid |
|
|
277 | (1) |
|
Benchmarking Goals and Tools |
|
|
278 | (1) |
|
|
279 | (1) |
|
|
280 | (1) |
|
Benchmarking with ssbench |
|
|
281 | (9) |
|
|
281 | (1) |
|
|
282 | (1) |
|
|
283 | (1) |
|
|
284 | (1) |
|
Measuring Basic Performance |
|
|
284 | (1) |
|
|
285 | (1) |
|
Defining the Scenario File |
|
|
286 | (3) |
|
|
289 | (1) |
|
Ways to Start ssbench-worker |
|
|
289 | (1) |
|
Benchmarking with swift-bench |
|
|
290 | (8) |
|
|
291 | (1) |
|
|
291 | (1) |
|
|
292 | (1) |
|
Testing High Concurrency (-c, -b) |
|
|
292 | (1) |
|
|
293 | (1) |
|
|
293 | (1) |
|
|
294 | (1) |
|
|
294 | (1) |
|
|
294 | (1) |
|
Creating a Configuration File |
|
|
294 | (1) |
|
|
295 | (1) |
|
Running a Distributed swift-bench |
|
|
295 | (1) |
|
Sample swift-bench Configuration |
|
|
295 | (2) |
|
|
297 | (1) |
|
|
298 | (1) |
A Swift Afterword |
|
299 | (4) |
Index |
|
303 | |