-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·225 lines (215 loc) · 11.4 KB
/
index.html
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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Reviewing - Fallacies of Distributed Computing (1-4)</title>
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/black.css">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="lib/css/monokai.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h3>The Eight Fallacies</h3>
<h3>of Distributed Computing</h3>
<p>
<small>as told by Aaron Weiker</small>
</p>
</section>
<section>
<h3>The Eight Fallacies</h3>
<div>
<ol style="font-size: 0.6em; display: block">
<li>The network is reliable</li>
<li>Latency is zero</li>
<li>Bandwidth is infinite</li>
<li>The network is secure</li>
<li class="fragment fade-out" data-fragment-index="1">Topology doesn't change</li>
<li class="fragment fade-out" data-fragment-index="1">There is one administrator</li>
<li class="fragment fade-out" data-fragment-index="1">Transport cost is zero</li>
<li class="fragment fade-out" data-fragment-index="1">The network is homogeneous</li>
</ol>
<q style="font-size: 0.5em; display: block" cite="https://en.wikipedia.org/wiki/Fallacies_of_distributed_computing">
- L. Peter Deutsch and James Gosling circa 1994-1997
</q>
</div>
</section>
<section>
<section><h2>The network is reliable</h2></section>
<section>
<h2>The network is reliable</h2>
<ul>
<li>Acts of God: Hurricane, Tornado, Earthquake</li>
<li>Acts of Nature: Sharks</li>
<li>Acts of Man: Backhoe, Shovel</li>
<li>Acts of Developer: Badly behaving code</li>
</ul>
<aside class="notes">
</aside>
</section>
<section>
<h2>The network is reliable</h2>
<h3>HTTP</h3>
<p>
<blockquote cite="http://www.tbray.org/ongoing/When/200x/2009/05/25/HTTP-and-the-Fallacies-of-Distributed-Computing">
the clarity about GET, PUT, and DELETE being idempotent, while POST isn’t, helps hugely. Most obviously,
if a GET gets a network blowup, just do it again. And if the breakage hits a POST, well, it probably
only hits one
</blockquote>
<small>Tim Bray, Sun Microsystems</small>
</p>
<aside class="notes">
</aside>
</section>
<section>
<h2>The network is reliable</h2>
<h3>Mitigations</h3>
<ul>
<li>Retry Pattern</li>
<li>Circuit Breaker</li>
</ul>
</section>
<section>
<h2>The network is reliable</h2>
<h3>Hystrix Example</h3>
<img src="images/hystrix-command-flow-chart.png" />
</section>
</section>
<section>
<section><h2>Latency is zero</h2></section>
<section>
<h2>Latency is zero</h2>
<ul>
<li>Internet</li>
<li>WAN</li>
<li>LAN</li>
<li>Process</li>
</ul>
<aside class="notes">
When communicating from one process to another, assuming that this call will not
introduce any additional overhead.
With the popularity of microservices, this has also caused issues when dealing
with HTTP/S connections. While the overhead of establishing an HTTP connection
can seem to be quick, this is added latency to requests that can quickly add
up to noticeable amounts of time. Not to mention that there is a finite limit
to the number of connections that can be open at a time.
</aside>
</section>
<section>
<h2>Latency is zero</h2>
<h3>Bad Behaviours</h3>
<ul>
<li>N+1</li>
<li>Distributed Objects</li>
</ul>
<aside class="notes">
This fallacy often comes into play when using a framework that adds a layer of
abstraction. For example RPC and ORM are two common places where the developer
writes code in a way that makes it appear like one line of code is locally executed,
wherein it actually has to make a remote call. When this happens the liklihood of a
N+1 Select problem significantly increases as the boundary between remote and
local has been blurred.
</aside>
</section>
<section>
<h2>Latency is zero</h2>
<h3>Mitigations</h3>
<ul>
<li>Resource Pool</li>
<li>Request Cache</li>
<li>Request Collapsing(Batching)</li>
<li>HTTP/2</li>
</ul>
<aside class="notes">
<b>Resource Pool</b> In process cache of expensive resources, such as connections to a dataaase. Allowing a resource from cache to be used instead of creating a new one each time it is needed.
<b>Request Cache</b> In process cache of requests to prevent duplicate requests for the same data (in a single logical operation) from being sent multiple times.
<b>Request Collapsing(Batching)</b>: Where possible, instead of making N requests, combine those requests so that only 1 request is made.
<b>HTTP/2</b>: Allows more effecient use of connections by allowing the server to push data down and not rely on clients to establish new connections.
When writing code, be cautious when creating functions that wrap remote calls. If doing this, please naem functions in a way so that it is obvious that a remote call is/may take place.
</aside>
</section>
<section>
<h2>Latency is zero</h2>
<h3>Hystrix Example</h3>
<img src="images/hystrix-command-flow-chart.png" />
<aside class="notes">
Request Caching and and Request Collapsing are natively supported.
</aside>
</section>
</section>
<section>
<section>
<h2>Bandwidth is infinite</h2>
</section>
<section>
<h2>Bandwidth is infinite</h2>
<blockquote cite="https://memcached.org/about">
memcached allows you to take memory from parts of your system where you have more than
you need and make it accessible to areas where you have less than you need.
</blockquote>
<aside class="notes">
- Packetloss is real.
- Packet size affects throughput
</aside>
</section>
<section>
<h2>Bandwidth is infinite</h2>
<h3>Mitigations</h3>
<ul>
<li>Selective Requests</li>
<li>Use deliberate data structures</li>
<li>Measure behaviour</li>
</ul>
</section>
</section>
<section>
<section>
<h2>The network is secure</h2>
</section>
<section>
<h2>The network is secure</h2>
<h3>Mitigations</h3>
<ul>
<li>Write Secure Code</li>
<li><a href="https://www.owasp.org/" target="_new">OWASP</a></li>
<li><a href="https://digitalguardian.com/blog/what-data-classification-data-classification-definition" target="_new">Classify data</a></li>
<li>Encrypt in transit and at rest</li>
</ul>
</section>
<section>
<h3>Example: Istio</h3>
<figure style="width: 80%; height: 40%; padding-left: 10%">
<img src="images/istio-arch.svg" style="width: 540px; height: 540px; padding: 10px; background-color: white;" />
</figure>
</section>
</section>
</div>
</div>
<script src="js/reveal.js"></script>
<script>
// More info about config & dependencies:
// - https://github.com/hakimel/reveal.js#configuration
// - https://github.com/hakimel/reveal.js#dependencies
Reveal.initialize({
dependencies: [
{ src: 'plugin/markdown/marked.js' },
{ src: 'plugin/markdown/markdown.js' },
{ src: 'plugin/notes/notes.js', async: true },
{ src: 'plugin/highlight/highlight.js', async: true }
]
});
</script>
</body>
</html>