1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
|
\nonstopmode
\documentclass[aspectratio=169]{beamer}
\usepackage[utf8]{inputenc}
% \usepackage[frenchb]{babel}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{breqn}
\usepackage{multirow}
\usetheme{boxes}
\usepackage{graphicx}
\usepackage{import}
\usepackage{adjustbox}
%\useoutertheme[footline=authortitle,subsection=false]{miniframes}
%\useoutertheme[footline=authorinstitute,subsection=false]{miniframes}
\useoutertheme{infolines}
\setbeamertemplate{headline}{}
\beamertemplatenavigationsymbolsempty
\definecolor{TitleOrange}{RGB}{255,137,0}
\setbeamercolor{title}{fg=TitleOrange}
\setbeamercolor{frametitle}{fg=TitleOrange}
\definecolor{ListOrange}{RGB}{255,145,5}
\setbeamertemplate{itemize item}{\color{ListOrange}$\blacktriangleright$}
\definecolor{verygrey}{RGB}{70,70,70}
\setbeamercolor{normal text}{fg=verygrey}
\usepackage{tabu}
\usepackage{multicol}
\usepackage{vwcol}
\usepackage{stmaryrd}
\usepackage{graphicx}
\usepackage[normalem]{ulem}
\AtBeginSection[]{
\begin{frame}
\vfill
\centering
\begin{beamercolorbox}[sep=8pt,center,shadow=true,rounded=true]{title}
\usebeamerfont{title}\insertsectionhead\par%
\end{beamercolorbox}
\vfill
\end{frame}
}
\title{Garage}
\subtitle{a lightweight and robust geo-distributed data storage system}
\author{Alex Auvolat, Deuxfleurs}
\date{SEED webinar, 2024-01-12}
\begin{document}
% \begin{frame}
% \centering
% \includegraphics[width=.3\linewidth]{../../sticker/Garage.png}
% \vspace{1em}
%
% {\large\bf Alex Auvolat, Deuxfleurs Association}
% \vspace{1em}
%
% \url{https://garagehq.deuxfleurs.fr/}
%
% %Matrix channel: \texttt{\#garage:deuxfleurs.fr}
% \end{frame}
\begin{frame}
%\frametitle{Who I am}
\begin{columns}[t]
\begin{column}{.2\textwidth}
\centering
\adjincludegraphics[width=.4\linewidth, valign=t]{assets/alex.jpg}
\end{column}
\begin{column}{.6\textwidth}
\textbf{Alex Auvolat}\\
Member of Deuxfleurs, lead developer of Garage
\end{column}
\begin{column}{.2\textwidth}
~
\end{column}
\end{columns}
\vspace{.5em}
\begin{columns}[t]
\begin{column}{.2\textwidth}
\centering
\adjincludegraphics[width=.6\linewidth, valign=t]{../../logo/garage-notext.png}
\end{column}
\begin{column}{.6\textwidth}
\\\textbf{Garage}\\
A self-hosted alternative to S3 for object storage
\end{column}
\begin{column}{.2\textwidth}
~
\end{column}
\end{columns}
\vspace{2em}
\begin{columns}[t]
\begin{column}{.2\textwidth}
\centering
\adjincludegraphics[width=.5\linewidth, valign=t]{assets/deuxfleurs.pdf}
\end{column}
\begin{column}{.6\textwidth}
\textbf{Deuxfleurs}\\
A non-profit self-hosting collective,\\
member of the CHATONS network
\end{column}
\begin{column}{.2\textwidth}
\centering
\adjincludegraphics[width=.7\linewidth, valign=t]{assets/logo_chatons.png}
\end{column}
\end{columns}
\end{frame}
\begin{frame}
\frametitle{Stable vs Resilient}
\hspace{1em}
\begin{minipage}{7cm}
\textbf{Building a "stable" system:}
\vspace{1em}
Enterprise-grade systems typically employ:
\vspace{1em}
\begin{itemize}
\item RAID
\item Redundant power grid + UPS
\item Redundant Internet connections
\item Low-latency links
\item ...
\end{itemize}
\vspace{1em}
$\to$ costly, only worth at DC scale\\
$\to$ still risk of DC-level incident...
\end{minipage}
\hfill
\begin{minipage}{7cm}
\textbf{Building a \underline{resilient} system:}
\vspace{1em}
An alternative, cheaper way:
\vspace{1em}
\begin{itemize}
\item Commodity hardware \\(e.g. old desktop PCs)
\vspace{.5em}
\item Commodity Internet \\(e.g. FTTB, FTTH) and power grid
\vspace{.5em}
\item \textbf{Geographical redundancy} \\(multi-site replication)
\end{itemize}
\vspace{1.5em}
\end{minipage}
\hspace{1em}
\end{frame}
\begin{frame}
\frametitle{Example: our infrastructure at Deuxfleurs}
\only<1>{
\begin{center}
\includegraphics[width=.8\linewidth]{assets/neptune.jpg}
\end{center}
}
\only<2>{
\begin{center}
\includegraphics[width=.8\linewidth]{assets/atuin.jpg}
\end{center}
}
\only<3>{
\begin{center}
\includegraphics[width=.8\linewidth]{assets/inframap_jdll2023.pdf}
\end{center}
}
\end{frame}
\begin{frame}
\frametitle{Object storage: simpler than file systems}
\begin{minipage}{6cm}
Only two operations:
\vspace{1em}
\begin{itemize}
\item Put an object at a key
\vspace{1em}
\item Retrieve an object from its key
\end{itemize}
\vspace{1em}
{\footnotesize (and a few others)}
\vspace{1em}
Sufficient for many applications!
\end{minipage}
\hfill
\begin{minipage}{8cm}
\begin{center}
\vspace{2em}
\includegraphics[height=6em]{../2020-12-02_wide-team/img/Amazon-S3.jpg}
\hspace{2em}
\includegraphics[height=5em]{assets/minio.png}
\vspace{2em}
\includegraphics[height=6em]{../../logo/garage_hires_crop.png}
\end{center}
\vspace{1em}
\end{minipage}
\end{frame}
\begin{frame}
\frametitle{The data model of object storage}
Object storage is basically a key-value store:
\vspace{1em}
\begin{center}
\begin{tabular}{|l|p{8cm}|}
\hline
\textbf{Key: file path + name} & \textbf{Value: file data + metadata} \\
\hline
\hline
\texttt{index.html} &
\texttt{Content-Type: text/html; charset=utf-8} \newline
\texttt{Content-Length: 24929} \newline
\texttt{<binary blob>} \\
\hline
\texttt{img/logo.svg} &
\texttt{Content-Type: text/svg+xml} \newline
\texttt{Content-Length: 13429} \newline
\texttt{<binary blob>} \\
\hline
\texttt{download/index.html} &
\texttt{Content-Type: text/html; charset=utf-8} \newline
\texttt{Content-Length: 26563} \newline
\texttt{<binary blob>} \\
\hline
\end{tabular}
\end{center}
\end{frame}
\begin{frame}
\frametitle{Implementation: consensus vs weak consistency}
\hspace{1em}
\begin{minipage}{7cm}
\textbf{Consensus-based systems:}
\vspace{1em}
\begin{itemize}
\item \textbf{Leader-based:} a leader is elected to coordinate
all reads and writes
\vspace{1em}
\item Allows for \textbf{sequential reasoning}:
program as if running on a single machine
\vspace{1em}
\item Serializability is one of the \\
\textbf{strongest consistency guarantees}
\vspace{1em}
\item \textbf{Costly}, the leader is a bottleneck;
leader elections on failure take time
\end{itemize}
\end{minipage}
\hfill
\begin{minipage}{7cm} \visible<2->{
\textbf{Weakly consistent systems:}
\vspace{1em}
\begin{itemize}
\item \textbf{Nodes are equivalent}, any node
can originate a read or write operation
\vspace{1em}
\item \textbf{Operations must be independent},
conflicts are resolved after the fact
\vspace{1em}
\item Strongest achievable consistency:\\
\textbf{read-after-write consistency}\\(using quorums)
\vspace{1em}
\item \textbf{Fast}, no single bottleneck;\\
works transparently with offline nodes
\end{itemize}
} \end{minipage}
\hspace{1em}
\end{frame}
\begin{frame}
\frametitle{Why avoid consensus?}
Consensus can be implemented reasonably well in practice, so why avoid it?
\vspace{2em}
\begin{itemize}
\item \textbf{Software complexity:} RAFT and PAXOS are complex beasts;\\
harder to prove, harder to reason about
\vspace{1.5em}
\item \textbf{Performance issues:}
\vspace{1em}
\begin{itemize}
\item Taking a decision may take an \textbf{arbitrary number of steps} (in adverse scenarios)
\vspace{1em}
\item The leader is a \textbf{bottleneck} for all requests;\\
even in leaderless approaches, \textbf{all nodes must process all operations in order}
\vspace{1em}
\item Particularly \textbf{sensitive to higher latency} between nodes
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Objective: the right level of consistency for Garage}
\underline{Constraints:} slow network (geographical distance), node unavailability/crashes\\
\underline{Objective:} maximize availability, maintain an \emph{appropriate level of consistency}\\
\vspace{1em}
\begin{enumerate}
\item<2-> \textbf{Weak consistency for most things}\\
\vspace{1em}
\underline{Example:} \texttt{PutObject}\\
\vspace{.5em}
If two clients write the same
object at the same time, one of the two is implicitly overwritten.
No need to coordinate, use a \emph{last-writer-wins register}.
\vspace{1em}
\item<3-> \textbf{Stronger consistency only when necessary}\\
\vspace{1em}
\underline{Example:} \texttt{CreateBucket}\\
\vspace{.5em}
A bucket is a reserved name in a shared namespace,
two clients should be prevented from both creating the same bucket
(\emph{mutual exclusion}).
\end{enumerate}
\end{frame}
\begin{frame}
\frametitle{The possibility of \emph{leaderless consensus}}
Currently, Garage \emph{only has weak consistency}. Is fast, but \texttt{CreateBucket} is broken!
\visible<2->{
\vspace{1em}
Leaderless consensus (Antoniadis et al., 2023) alleviates issues with RAFT and PAXOS:
\vspace{1em}
\begin{itemize}
\item \textbf{No leader.} All nodes participate equally at each time step,
and different nodes can be unavailable at different times without issues.
\\ \vspace{.5em} $\to$ better tolerance to the high latency (remove bottleneck issue)
\\ $\to$ tolerates crash transparently
\vspace{1em}
\item \textbf{Simpler formalization.} The algorithm is very simple to express and to analyze in mathematical terms.
\end{itemize}
}
\visible<3->{
\vspace{1em}
One of the possible subjects for this PhD:
\\$\to$ \emph{integration of leaderless consensus in Garage} + testing + perf eval, etc.
}
\end{frame}
\begin{frame}
\begin{center}
\includegraphics[width=.25\linewidth]{../../logo/garage_hires.png}\\
\vspace{-1em}
\url{https://garagehq.deuxfleurs.fr/}\\
\url{mailto:garagehq@deuxfleurs.fr}\\
\texttt{\#garage:deuxfleurs.fr} on Matrix
\vspace{1.5em}
\includegraphics[width=.06\linewidth]{assets/rust_logo.png}
\includegraphics[width=.13\linewidth]{assets/AGPLv3_Logo.png}
\end{center}
\end{frame}
\end{document}
%% vim: set ts=4 sw=4 tw=0 noet spelllang=en :
|