SlideShare una empresa de Scribd logo
1 de 192
Descargar para leer sin conexión
© 2016 Mesosphere, Inc. All Rights Reserved.
CONTAINER
ORCHESTRATION AND
SOFTWARE DEFINED
NETWORK: A FIELD REPORT
@SARGUN
1
Sargun Dhillon, 2016
© 2016 Mesosphere, Inc. All Rights Reserved.
WHO AM I?
2
© 2016 Mesosphere, Inc. All Rights Reserved. 3
© 2016 Mesosphere, Inc. All Rights Reserved. 4
© 2016 Mesosphere, Inc. All Rights Reserved. 5
© 2016 Mesosphere, Inc. All Rights Reserved. 6
My Mission
© 2016 Mesosphere, Inc. All Rights Reserved.
AGENDA
7
• A brief history of how we got here
• How we’re trying to make it better
• Some systems we’ve built to enable us to better ship
• How Erlang helped us get there
© 2016 Mesosphere, Inc. All Rights Reserved.
A BRIEF
HISTORY OF
NETWORKS
IN THE DC
8
© 2016 Mesosphere, Inc. All Rights Reserved.
ORGANIZATIONS CIRCA 2007
9
•Before DevOps was first heard
•Clear differentiation of ownership
•The datacenter was owned by a the NOC
•Deployment of services was done by sysadmins in the operations group
•Developers operated without access to production
•Production deployments gated by QA, Operations
© 2016 Mesosphere, Inc. All Rights Reserved.
SOFTWARE CIRCA 2007
10
•Different services glued together via CORBA, XML-RPC, SOAP
•No one was really consciously doing microservices
•Networks were static, giant layer 2 domains
•Load Balancing provided by hardware
•Firewall provided by hardware
•Everyone ran their own datacenter
•EC2 in its infancy, only a year prior has the term “Cloud” began to become
popular
•Systems statically partitioned
© 2016 Mesosphere, Inc. All Rights Reserved. 11
SaaS continued to grow at
an incredible rate
© 2016 Mesosphere, Inc. All Rights Reserved. 12
There became a race to ship faster
© 2016 Mesosphere, Inc. All Rights Reserved. 13
We kept the software alive
By feeding it
With Sysadmins
© 2016 Mesosphere, Inc. All Rights Reserved. 14
We kept the machines alive
By feeding them
With Blood
© 2016 Mesosphere, Inc. All Rights Reserved. 15
This wasn’t working
© 2016 Mesosphere, Inc. All Rights Reserved.
ORGANIZATIONS 2008+
16
•We began seeing a gradual shift in the industry where lines between QA, Dev, and
Ops were blurring
•Devops term coined in 2008, first DevOpsDay in 2009
•Gradual adoption of the cloud, fewer organizations owning their own datacenters
•Either networking was outsourced to the cloud, or typically remained in a small
internal organization
•Needed to reduce ratio of operators to servers
© 2016 Mesosphere, Inc. All Rights Reserved.
SOFTWARE CIRCA 2008+
17
•Popularization of Open Source tooling to automate much of traditional operations, and QA
•Jenkins / Hudson
•Puppet / Chef
•Capistrano
•Popularization of stacks requiring with more complex operational requirements
•Nutch / Hadoop
•NoSQLs
•Still statically partitioned machines
•Networks still sacred territory
© 2016 Mesosphere, Inc. All Rights Reserved.
CIRCA 2011
18
•Much of what’s been happening for the past half-decade hits networking
•Much of this falls under the term “SDN” (Software Defined Networking) or “NFV” (Network
Function Virtualization)
•Hastened by the adoption of VMs in the enterprise in the hype cycle
•Openflow promises to fix everything
•Major adoptions of the cloud by startups as well as enterprise
•Virtualization begins to become mainstream as a mechanism of consolidating workloads
•The invention of the “private cloud”
•DotCloud / Docker funded by Y-combinator a year earlier
•Term “Microservice” coined
© 2016 Mesosphere, Inc. All Rights Reserved.
CIRCA 2013
19
• Docker becomes instant hit and brings containers to the forefront
• Dynamic partitioning begins to make in-roads
• Google releases Omega paper
• Apache Aurora open sourced
• Microservice counts explode, demanding collocation of workloads for efficiency
• Mesosphere Founded
• Site Reliability Engineering begins to popularize and further blur the lines between
Dev, Ops, and QA
© 2016 Mesosphere, Inc. All Rights Reserved. 20
Everything was changing
© 2016 Mesosphere, Inc. All Rights Reserved. 21
Why?
© 2016 Mesosphere, Inc. All Rights Reserved. 22
Business Value
© 2016 Mesosphere, Inc. All Rights Reserved. 23
© 2016 Mesosphere, Inc. All Rights Reserved.
BENEFITS
24
•Reduction in cost of goods sold
•Smaller engineer to server ratio
•Linear, or super linear growth rate of engineering team to servers is unsustainable
•Smaller engineer to capability ratio, where capability includes:
•Features
•Throughput
•Better User Experience
•Better availability
•Quicker release to features
© 2016 Mesosphere, Inc. All Rights Reserved. 25
But at what cost?
© 2016 Mesosphere, Inc. All Rights Reserved. 26
Complexity
© 2016 Mesosphere, Inc. All Rights Reserved.
OLD WORLD
27
© 2016 Mesosphere, Inc. All Rights Reserved.
NEW WORLD
28
© 2016 Mesosphere, Inc. All Rights Reserved.
DIVING DEEPER
29
© 2016 Mesosphere, Inc. All Rights Reserved. 30
Paxos?
Raft?
Ω Failure Detector?
Pods?
Wat?
Sidecars?
Etcd?
Zookeeper?
VxLan?
© 2016 Mesosphere, Inc. All Rights Reserved. 31
It was time for something completely
new
© 2016 Mesosphere, Inc. All Rights Reserved.
ENTER
DC/OS
32
© 2016 Mesosphere, Inc. All Rights Reserved.
CONTAINERS
WITH
BATTERIES
INCLUDED
33
• Includes everything you need to move away from
2007
• Networking
• Security
• Application deployment, and orchestration
• Stateful services
• Scheduling
© 2016 Mesosphere, Inc. All Rights Reserved. 34
In Your Datacenter
© 2016 Mesosphere, Inc. All Rights Reserved. 35
As a Black Box
© 2016 Mesosphere, Inc. All Rights Reserved. 36
But, our story starts:
~November 2015
(~8 months ago)
© 2016 Mesosphere, Inc. All Rights Reserved. 37
Networking Features
© 2016 Mesosphere, Inc. All Rights Reserved. 38
“Service Discovery”
© 2016 Mesosphere, Inc. All Rights Reserved. 39
Where are my apps running?
© 2016 Mesosphere, Inc. All Rights Reserved. 40
© 2016 Mesosphere, Inc. All Rights Reserved. 41
The Old World
© 2016 Mesosphere, Inc. All Rights Reserved. 42
Let Mesos* Choose Ports
*The Scheduler
© 2016 Mesosphere, Inc. All Rights Reserved. 43
How do you find the tasks?
© 2016 Mesosphere, Inc. All Rights Reserved. 44
A Directory?
© 2016 Mesosphere, Inc. All Rights Reserved. 45
Mesos-DNS
© 2016 Mesosphere, Inc. All Rights Reserved. 46
© 2016 Mesosphere, Inc. All Rights Reserved. 47
…Ish
© 2016 Mesosphere, Inc. All Rights Reserved. 48
DNS SRV Based Service Discovery
© 2016 Mesosphere, Inc. All Rights Reserved. 49
Everyone has DNS right?
© 2016 Mesosphere, Inc. All Rights Reserved. 50
And GLibc even has a bug open for it!
© 2016 Mesosphere, Inc. All Rights Reserved. 51
…Opened in 2005
© 2016 Mesosphere, Inc. All Rights Reserved. 52
We needed a solution that actually
worked
© 2016 Mesosphere, Inc. All Rights Reserved. 53
So, we performed an OODA loop
1.Observe
2. Orient
3. Decide
4. Act
© 2016 Mesosphere, Inc. All Rights Reserved.
OBSERVE: SERVICE DISCOVERY
54
• Existing Dynamic Service Discovery Solutions:
• Etcd
• Finagle + Zookeeper
• Consul
• Existing Static Service Discovery Solutions:
• Amazon ELB
• Hardware Load Balancers
• Service Discovery is an afterthought
Gathering our data about the field
© 2016 Mesosphere, Inc. All Rights Reserved.
OBSERVE: NETWORKING
55
• Everybody assumes IP per application instance
• Everybody assumes reliable DNS
• Some people want to be fast
• Some people want security
• Nobody wants to edit application code
• Nobody wants to talk to their network engineer
Gathering our data about the field
© 2016 Mesosphere, Inc. All Rights Reserved.
ORIENT:
DC/OS
NETWORKING
CORE TENETS
56
•DC/OS must be agnostic to the underlying environment
•AWS / Azure / GCE / Softlayer as the lowest common
denominators
•DC/OS should require no to minimal changes to the code in
order to work
•DC/OS should provide similar services to existing
environments
•Fixed load balancers
•Security
•IP/Container
•We do not want to require a change in organization
procedures
•We want to be secure
© 2016 Mesosphere, Inc. All Rights Reserved.
DECIDE
57
What do we want to build?
• Load Balancing
• Seamless Service Discovery
• Reliable DNS
• External cluster Access
• Metrics and Discoverability
• IP Per Container
© 2016 Mesosphere, Inc. All Rights Reserved.
DC/OS ARCHITECTURE (~NOV ’15): POLYGLOT MICROSERVICES
58
© 2016 Mesosphere, Inc. All Rights Reserved. 59
What Did We Build?
© 2016 Mesosphere, Inc. All Rights Reserved.
ACT:
DEVELOPED
NEW ERLANG
SERVICES
60
• Service Discovery
• Navstar
• Spartan
• Load Balancing
• Minuteman
• Networking API
• Fishladder
• Control Plane
• Lashup
© 2016 Mesosphere, Inc. All Rights Reserved.
DC/OS ARCHITECTURE (TODAY): POLYGLOT MICROSERVICES
61
© 2016 Mesosphere, Inc. All Rights Reserved. 62
Network Control Plane:
Navstar
© 2016 Mesosphere, Inc. All Rights Reserved. 63
© 2016 Mesosphere, Inc. All Rights Reserved.
NAVSTAR:
BENEFITS
64
•Fully decentralized control plane
•Scalable
•Extensible system to act as a building block
•Began as network control plane
© 2016 Mesosphere, Inc. All Rights Reserved. 65
DNS:
Spartan
© 2016 Mesosphere, Inc. All Rights Reserved. 66
HA DNS
© 2016 Mesosphere, Inc. All Rights Reserved. 67
/etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
Normal DNS
© 2016 Mesosphere, Inc. All Rights Reserved. 68
Ideal DNS Request
© 2016 Mesosphere, Inc. All Rights Reserved. 69
Ideal DNS Request
© 2016 Mesosphere, Inc. All Rights Reserved. 70
But, sometimes things go wrong
© 2016 Mesosphere, Inc. All Rights Reserved. 71
Not so Ideal DNS Request
© 2016 Mesosphere, Inc. All Rights Reserved. 72
Wait at least 1 second
© 2016 Mesosphere, Inc. All Rights Reserved. 73
Not so Ideal DNS Request
© 2016 Mesosphere, Inc. All Rights Reserved. 74
Wait at least 1 second
© 2016 Mesosphere, Inc. All Rights Reserved. 75
Not so Ideal DNS Request
© 2016 Mesosphere, Inc. All Rights Reserved. 76
Wat?
© 2016 Mesosphere, Inc. All Rights Reserved. 77
Spartan DNS
© 2016 Mesosphere, Inc. All Rights Reserved. 78
Spartan DNS
© 2016 Mesosphere, Inc. All Rights Reserved. 79
Spartan DNS
© 2016 Mesosphere, Inc. All Rights Reserved. 80
Spartan Controls Timeouts
© 2016 Mesosphere, Inc. All Rights Reserved. 81
Edge DNS
© 2016 Mesosphere, Inc. All Rights Reserved. 82
© 2016 Mesosphere, Inc. All Rights Reserved.
SPARTAN:
BENEFITS
83
•Makes DNS highly available in light of failure
•Lowers Average Latency
•Can control timeouts to sub-second
•Edge DNS
•Many DNS queries don’t need to go off-node
© 2016 Mesosphere, Inc. All Rights Reserved. 84
Load Balancing:
Minuteman
© 2016 Mesosphere, Inc. All Rights Reserved. 85
© 2016 Mesosphere, Inc. All Rights Reserved. 86
© 2016 Mesosphere, Inc. All Rights Reserved. 87
© 2016 Mesosphere, Inc. All Rights Reserved. 88
© 2016 Mesosphere, Inc. All Rights Reserved. 89
How does it work?
© 2016 Mesosphere, Inc. All Rights Reserved. 90
Setting it up
© 2016 Mesosphere, Inc. All Rights Reserved. 91
Intercepting the
connection
© 2016 Mesosphere, Inc. All Rights Reserved. 92
Remap
© 2016 Mesosphere, Inc. All Rights Reserved. 93
Success
© 2016 Mesosphere, Inc. All Rights Reserved.
MINUTEMAN:
BENEFITS
94
•Appearance of a fixed-load balancer
•Fully distributed
•Other than first packet, the entire lifetime is handled
in kernel space
•Erlang allows us to maintain latency guarantees
© 2016 Mesosphere, Inc. All Rights Reserved. 95
How do we tie it all together?
© 2016 Mesosphere, Inc. All Rights Reserved.
GLOBAL STATE
96
• Load Balancer Task Mapping
• DNS Zones
• Virtual Network Routing Tables
• Reachability
• Security ACLs
© 2016 Mesosphere, Inc. All Rights Reserved. 97
Computers
© 2016 Mesosphere, Inc. All Rights Reserved. 98
Constant Churn
© 2016 Mesosphere, Inc. All Rights Reserved. 99
Sometimes
They Break
© 2016 Mesosphere, Inc. All Rights Reserved. 100
Sometimes
Many Break
© 2016 Mesosphere, Inc. All Rights Reserved. 101
Sometimes
You don’t know
© 2016 Mesosphere, Inc. All Rights Reserved.
HOW DO YOU
DO
SIGNALING?
102
© 2016 Mesosphere, Inc. All Rights Reserved. 103
Nobody ever got fired for using
Zookeeper
© 2016 Mesosphere, Inc. All Rights Reserved. 104
We know about Zookeeper
© 2016 Mesosphere, Inc. All Rights Reserved. 105
It works…usually
© 2016 Mesosphere, Inc. All Rights Reserved. 106
How else can we do this?
© 2016 Mesosphere, Inc. All Rights Reserved. 107
Naively
(See: Distributed Erlang)
© 2016 Mesosphere, Inc. All Rights Reserved. 108
Massive Amount of Information
© 2016 Mesosphere, Inc. All Rights Reserved. 109
Who else has solved this?
© 2016 Mesosphere, Inc. All Rights Reserved. 110
Academia
© 2016 Mesosphere, Inc. All Rights Reserved. 111
Control Plane:
Lashup
© 2016 Mesosphere, Inc. All Rights Reserved. 112
How do we scale the naive approach?
© 2016 Mesosphere, Inc. All Rights Reserved. 113
All we need is a sparse, connected graph
© 2016 Mesosphere, Inc. All Rights Reserved. 114
But how?
© 2016 Mesosphere, Inc. All Rights Reserved. 115
Enter: HyParView*
Builds a connected graph (overlay), where the degree is <=K
*Inspired Protocol
© 2016 Mesosphere, Inc. All Rights Reserved. 116
Boot Time
© 2016 Mesosphere, Inc. All Rights Reserved. 117
© 2016 Mesosphere, Inc. All Rights Reserved. 118
© 2016 Mesosphere, Inc. All Rights Reserved. 119
© 2016 Mesosphere, Inc. All Rights Reserved. 120
© 2016 Mesosphere, Inc. All Rights Reserved. 121
© 2016 Mesosphere, Inc. All Rights Reserved. 122
© 2016 Mesosphere, Inc. All Rights Reserved. 123
© 2016 Mesosphere, Inc. All Rights Reserved. 124
© 2016 Mesosphere, Inc. All Rights Reserved. 125
© 2016 Mesosphere, Inc. All Rights Reserved. 126
© 2016 Mesosphere, Inc. All Rights Reserved. 127
© 2016 Mesosphere, Inc. All Rights Reserved. 128
© 2016 Mesosphere, Inc. All Rights Reserved. 129
© 2016 Mesosphere, Inc. All Rights Reserved. 130
Connected Graph
Hyparview
© 2016 Mesosphere, Inc. All Rights Reserved. 131
Constant Adaptive
Health Checks*
*Borrowed from SWIM, Gossip Style Failure Detector
© 2016 Mesosphere, Inc. All Rights Reserved. 132
Dealing with Failure
Hyparview
© 2016 Mesosphere, Inc. All Rights Reserved. 133
Dealing with Failure
Hyparview
© 2016 Mesosphere, Inc. All Rights Reserved. 134
Dealing with Failure
Hyparview
© 2016 Mesosphere, Inc. All Rights Reserved. 135
Dealing with Failure
Hyparview
© 2016 Mesosphere, Inc. All Rights Reserved. 136
Routing*
*Borrowed from Dijkstra, OSPF, IS-IS
© 2016 Mesosphere, Inc. All Rights Reserved. 137
© 2016 Mesosphere, Inc. All Rights Reserved. 138
© 2016 Mesosphere, Inc. All Rights Reserved. 139
Adjacent Node 1 Adjacent Node 2 Adjacent Node 3
A T B C
B T A C
C B A D
D C E F
E D F H
F D E G
G F H I
H E G I
I G H J
J I L K
K M L J
L M K J
M L K N
N P O M
O R P N
P Q O N
Q S R O
R O Q S
S T R Q
T B A S
© 2016 Mesosphere, Inc. All Rights Reserved. 140
View Changes Gossiped on Change
© 2016 Mesosphere, Inc. All Rights Reserved. 141
Adjacent Node 1 Adjacent Node 2 Adjacent Node 3 Version (epoch)
A T B C 1
B T A C 5
C B A D 2
D C E F 7
E D F H 94
F D E G 1
G F H I 415
H E G I 15
I G H J 1
J I L K 3
K M L J 5
L M K J 7
M L K N 88
N P O M 1
O R P N 3
P Q O N 4
Q S R O 6
R O Q S 8
S T R Q 1
T B A S 3
© 2016 Mesosphere, Inc. All Rights Reserved. 142
© 2016 Mesosphere, Inc. All Rights Reserved. 143
Just Run Dijkstra*
*BFS / DFS
© 2016 Mesosphere, Inc. All Rights Reserved. 144
Minimum Spanning Tree, From Sender A
© 2016 Mesosphere, Inc. All Rights Reserved. 145
A Wild Pokemon Appears!*
*CRDT papers
Database
© 2016 Mesosphere, Inc. All Rights Reserved. 146
CRDTS: Semilattices
“Time”
© 2016 Mesosphere, Inc. All Rights Reserved. 147
CRDT KV Store
© 2016 Mesosphere, Inc. All Rights Reserved. 148
“Demo”
© 2016 Mesosphere, Inc. All Rights Reserved. 149
“Demo”
(foo@3c075477e55e)10> nodes().
[baz@3c075477e55e,bar@3c075477e55e]
(bar@3c075477e55e)8> nodes().
[foo@3c075477e55e,baz@3c075477e55e]
(baz@3c075477e55e)7> nodes().
[foo@3c075477e55e,bar@3c075477e55e]
© 2016 Mesosphere, Inc. All Rights Reserved. 150
“Demo”
(foo@3c075477e55e)9> lashup_kv:value([erlang_users]).
[]
(bar@3c075477e55e)9> lashup_kv:value([erlang_users]).
[]
(baz@3c075477e55e)9> lashup_kv:value([erlang_users]).
[]
© 2016 Mesosphere, Inc. All Rights Reserved. 151
“Demo”
(baz@3c075477e55e)10>
net_kernel:allow([foo@3c075477e55e]).
ok
(baz@3c075477e55e)10>
net_kernel:disconnect('bar@3c075477e55e').
ok.
© 2016 Mesosphere, Inc. All Rights Reserved. 152
“Demo”
© 2016 Mesosphere, Inc. All Rights Reserved. 153
“Demo”
(bar@3c075477e55e)11>
lashup_kv:request_op([erlang_users], {update, [{update,
{number, riak_dt_pncounter}, {increment, 5}}]}).
{ok,[{{number,riak_dt_pncounter},5}]}
© 2016 Mesosphere, Inc. All Rights Reserved. 154
“Demo”
(foo@3c075477e55e)12> lashup_kv:value([erlang_users]).
[{{number,riak_dt_pncounter},5}]
(bar@3c075477e55e)13> lashup_kv:value([erlang_users]).
[{{number,riak_dt_pncounter},5}]
(baz@3c075477e55e)15> lashup_kv:value([erlang_users]).
[{{number,riak_dt_pncounter},5}]
© 2016 Mesosphere, Inc. All Rights Reserved. 155
“Demo”
(foo@3c075477e55e)23> erlang:set_cookie(baz@3c075477e55e,
fake).
true
(foo@3c075477e55e)24> erlang:set_cookie(bar@3c075477e55e,
fake).
true
© 2016 Mesosphere, Inc. All Rights Reserved. 156
“Demo”
© 2016 Mesosphere, Inc. All Rights Reserved. 157
“Demo”
(foo@3c075477e55e)29> lashup_kv:request_op([erlang_users],
{update, [{update, {number, riak_dt_pncounter},
{increment, 3}}]}).
{ok,[{{number,riak_dt_pncounter},8}]}
(bar@3c075477e55e)17> lashup_kv:request_op([erlang_users],
{update, [{update, {number, riak_dt_pncounter},
{increment, 7}}]}).
{ok,[{{number,riak_dt_pncounter},12}]}
(baz@3c075477e55e)19> lashup_kv:request_op([erlang_users],
{update, [{update, {number, riak_dt_pncounter},
{increment, 11}}]}).
{ok,[{{number,riak_dt_pncounter},16}]}
© 2016 Mesosphere, Inc. All Rights Reserved. 158
“Demo”
© 2016 Mesosphere, Inc. All Rights Reserved. 159
“Demo”
(foo@3c075477e55e)1> lashup_kv:value([erlang_users]).
[{{number,riak_dt_pncounter},26}]
(bar@3c075477e55e)25> lashup_kv:value([erlang_users]).
[{{number,riak_dt_pncounter},26}]
(baz@3c075477e55e)23> lashup_kv:value([erlang_users]).
[{{number,riak_dt_pncounter},26}]
© 2016 Mesosphere, Inc. All Rights Reserved.
LASHUP KV
160
•Datatypes:
•Maps
•Composable
•Sets
•Flags
•Counters
•Registers
•Last-write-wins
© 2016 Mesosphere, Inc. All Rights Reserved. 161
Does Lashup provide Business Value?
© 2016 Mesosphere, Inc. All Rights Reserved. 162
Prior to Lashup
© 2016 Mesosphere, Inc. All Rights Reserved. 163
After Lashup
© 2016 Mesosphere, Inc. All Rights Reserved.
PROJECT
LASHUP
164
•A novel distributed systems SDK that provides:
•Membership
•Multicast Delivery
•Strongly-eventually consistent data storage
•Powers:
•Minuteman VIP dissemination
•Minuteman node liveness checks
•Overlay routing
•DNS Synchronization
•Open source: github.com/dcos/lashup
© 2016 Mesosphere, Inc. All Rights Reserved. 165
So,
Why Erlang/OTP?
© 2016 Mesosphere, Inc. All Rights Reserved. 166
Why Not?
(Go)
© 2016 Mesosphere, Inc. All Rights Reserved. 167
The First Version
of Minuteman
Was In
Golang
© 2016 Mesosphere, Inc. All Rights Reserved. 168
Stand on the Shoulders of Giants
© 2016 Mesosphere, Inc. All Rights Reserved. 169
What’s a good language with a healthy
set of distributed systems, and
networking libraries?
© 2016 Mesosphere, Inc. All Rights Reserved. 170
What’s a good language with a healthy
set of distributed systems, and
networking libraries?
With an ecosystem
© 2016 Mesosphere, Inc. All Rights Reserved. 171
What’s a good language with a healthy set of
distributed systems, and networking
libraries?
With an ecosystem
That’s battle tested
© 2016 Mesosphere, Inc. All Rights Reserved. 172
It’s a 3AM, who do you want picking up the
phone?
© 2016 Mesosphere, Inc. All Rights Reserved. 173
Answer:
You make it so that your software so it doesn’t
page you at 3 AM.
© 2016 Mesosphere, Inc. All Rights Reserved. 174
Upgrading Software on Mars is Easier
vs.
On-Prem
© 2016 Mesosphere, Inc. All Rights Reserved. 175
Erlang
© 2016 Mesosphere, Inc. All Rights Reserved.
LASHUP KV
NEEDED A
DURABLE STORE
ANSWER:
MNESIA
176
•ACID, Transactional
•20+ years old
•Battle Tested
•Comes built-in
•Software Transaction Memory
© 2016 Mesosphere, Inc. All Rights Reserved.
LASHUP KV
NEEDED A
CRDT LIBRARY
ANSWER:
RIAK_DT
177
•Riak’s CRDT Library
•Used in production by others
•Battle Tested
•Property tested
© 2016 Mesosphere, Inc. All Rights Reserved.
LASHUP NEEDED
SECURE
DISTRIBUTION
ANSWER:
DISTERL
178
•SSL with mutual authentication is a matter of
configuration
•Used in production by others
•Battle Tested
•Comes Built-in
© 2016 Mesosphere, Inc. All Rights Reserved.
SPARTAN
NEEDED
A DNS SERVER
ANSWER:
ERL-DNS
179
•Runs DNSimple
•Used in production
•Battle Tested
•Some Statistics from DNSimple
•Serves 20K+ domains
•Does 20k queries/sec+
© 2016 Mesosphere, Inc. All Rights Reserved.
MINUTEMAN
NEEDED
A KERNEL API
LIBRARY
ANSWER:
GEN_NETLINK
180
•Liberal license
•Deployed by TravelPing
•Used in production
•Battle Tested
© 2016 Mesosphere, Inc. All Rights Reserved.
LASHUP
NEEDED A
GRAPH LIBRARY
ANSWER:
DIGRAPH
181
•Built-in Library to Erlang/OTP
•Correctness verified
•Simple API
•Downsides:
•Slow
•Heavy
© 2016 Mesosphere, Inc. All Rights Reserved. 182
So, we built our own.
© 2016 Mesosphere, Inc. All Rights Reserved. 183
On Testing…
© 2016 Mesosphere, Inc. All Rights Reserved. 184
We verified lashup_gm_route against
digraph
© 2016 Mesosphere, Inc. All Rights Reserved. 185
Property-Based Testing:
PropEr
© 2016 Mesosphere, Inc. All Rights Reserved. 186
Automatically Generate Command Set
CSet ={add_node(e), add_node(b),
add_edge(e,b), …}
© 2016 Mesosphere, Inc. All Rights Reserved. 187
Verify Equality
Digraph lashup_gm
add_node(e) add_node(e)
Check Equivalency
add_node(b) add_node(b)
Check Equivalency
add_edge(e, b) add_edge(e, b)
Check Equivalency
© 2016 Mesosphere, Inc. All Rights Reserved. 188
…Tens of Thousands of Times
© 2016 Mesosphere, Inc. All Rights Reserved. 189
Common Test Makes Integration Testing
A Breeze
© 2016 Mesosphere, Inc. All Rights Reserved.
COMMON TEST:
ON EACH
CHECK-IN
(LASHUP)
190
•Spins up 25 virtual nodes
•Torture tests:
•Partitions nodes randomly for 5 minutes to see if it
can generate a permanent split
•Kills nodes randomly to verify global health check
convergence
•Verifies multicast works even in poor network
conditions
•Writes divergent keys to all nodes, and reconnects
them
•~500 lines of tests, 80%+ code coverage
© 2016 Mesosphere, Inc. All Rights Reserved.
TAKE-AWAYS
191
•The container ecosystem is in is early stages
•Erlang is suitable for building modern, reliable
distributed systems
•These systems are tricky, so testing is key
•We have a healthy ecosystem
•There need to be alternatives to consensus
© 2016 Mesosphere, Inc. All Rights Reserved.
ERLANG &
CONTAINER
NETWORKING
@SARGUN
192

Más contenido relacionado

La actualidad más candente

How DreamHost builds a Public Cloud with OpenStack
How DreamHost builds a Public Cloud with OpenStackHow DreamHost builds a Public Cloud with OpenStack
How DreamHost builds a Public Cloud with OpenStackCarl Perry
 
An Evaluation of OpenStack Deployment Frameworks
An Evaluation of OpenStack Deployment FrameworksAn Evaluation of OpenStack Deployment Frameworks
An Evaluation of OpenStack Deployment Frameworksshane_gibson
 
MySQL Options in OpenStack
MySQL Options in OpenStackMySQL Options in OpenStack
MySQL Options in OpenStackTesora
 
Unlock Your Cloud Potential with Mirantis OpenStack & Cumulus Linux
Unlock Your Cloud Potential with Mirantis OpenStack & Cumulus LinuxUnlock Your Cloud Potential with Mirantis OpenStack & Cumulus Linux
Unlock Your Cloud Potential with Mirantis OpenStack & Cumulus LinuxCumulus Networks
 
PuppetConf 2016: Changing the Engine While in Flight – Neil Armitage, VMware
PuppetConf 2016: Changing the Engine While in Flight – Neil Armitage, VMwarePuppetConf 2016: Changing the Engine While in Flight – Neil Armitage, VMware
PuppetConf 2016: Changing the Engine While in Flight – Neil Armitage, VMwarePuppet
 
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...Daniel Krook
 
[OpenStack Day in Korea 2015] Track 2-3 - 오픈스택 클라우드에 최적화된 네트워크 가상화 '누아지(Nuage)'
[OpenStack Day in Korea 2015] Track 2-3 - 오픈스택 클라우드에 최적화된 네트워크 가상화 '누아지(Nuage)'[OpenStack Day in Korea 2015] Track 2-3 - 오픈스택 클라우드에 최적화된 네트워크 가상화 '누아지(Nuage)'
[OpenStack Day in Korea 2015] Track 2-3 - 오픈스택 클라우드에 최적화된 네트워크 가상화 '누아지(Nuage)'OpenStack Korea Community
 
OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...
OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...
OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...Cloud Native Day Tel Aviv
 
Networking in the cloud: An SDN primer
Networking in the cloud: An SDN primerNetworking in the cloud: An SDN primer
Networking in the cloud: An SDN primerMidokura
 
Simplifying OpenStack Networks with Routing on the Host: Gerard Chami + Scott...
Simplifying OpenStack Networks with Routing on the Host: Gerard Chami + Scott...Simplifying OpenStack Networks with Routing on the Host: Gerard Chami + Scott...
Simplifying OpenStack Networks with Routing on the Host: Gerard Chami + Scott...OpenStack
 
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
[2015-11월 정기 세미나] Cloud Native Platform - PivotalOpenStack Korea Community
 
Is OpenStack Neutron production ready for large scale deployments?
Is OpenStack Neutron production ready for large scale deployments?Is OpenStack Neutron production ready for large scale deployments?
Is OpenStack Neutron production ready for large scale deployments?Елена Ежова
 
Codership's galera cluster installation and quickstart webinar march 2016
Codership's galera cluster installation and quickstart webinar march 2016Codership's galera cluster installation and quickstart webinar march 2016
Codership's galera cluster installation and quickstart webinar march 2016Sakari Keskitalo
 
OpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStackOpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStackMatt Lord
 
Enabling Limitless Connectivity, Opportunity and Growth with Interconnection ...
Enabling Limitless Connectivity, Opportunity and Growth with Interconnection ...Enabling Limitless Connectivity, Opportunity and Growth with Interconnection ...
Enabling Limitless Connectivity, Opportunity and Growth with Interconnection ...Sagi Brody
 
Integrating OpenStack to Existing infrastructure
Integrating OpenStack to Existing infrastructureIntegrating OpenStack to Existing infrastructure
Integrating OpenStack to Existing infrastructurelaurabeckcahoon
 
OpenStack Deployment in the Enterprise
OpenStack Deployment in the Enterprise OpenStack Deployment in the Enterprise
OpenStack Deployment in the Enterprise Cisco Canada
 
Building a Large Scale SolarWinds Installation
Building a Large Scale SolarWinds InstallationBuilding a Large Scale SolarWinds Installation
Building a Large Scale SolarWinds InstallationSolarWinds
 

La actualidad más candente (20)

How DreamHost builds a Public Cloud with OpenStack
How DreamHost builds a Public Cloud with OpenStackHow DreamHost builds a Public Cloud with OpenStack
How DreamHost builds a Public Cloud with OpenStack
 
An Evaluation of OpenStack Deployment Frameworks
An Evaluation of OpenStack Deployment FrameworksAn Evaluation of OpenStack Deployment Frameworks
An Evaluation of OpenStack Deployment Frameworks
 
MySQL Options in OpenStack
MySQL Options in OpenStackMySQL Options in OpenStack
MySQL Options in OpenStack
 
Unlock Your Cloud Potential with Mirantis OpenStack & Cumulus Linux
Unlock Your Cloud Potential with Mirantis OpenStack & Cumulus LinuxUnlock Your Cloud Potential with Mirantis OpenStack & Cumulus Linux
Unlock Your Cloud Potential with Mirantis OpenStack & Cumulus Linux
 
PuppetConf 2016: Changing the Engine While in Flight – Neil Armitage, VMware
PuppetConf 2016: Changing the Engine While in Flight – Neil Armitage, VMwarePuppetConf 2016: Changing the Engine While in Flight – Neil Armitage, VMware
PuppetConf 2016: Changing the Engine While in Flight – Neil Armitage, VMware
 
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...
 
Neutron scaling
Neutron scalingNeutron scaling
Neutron scaling
 
Neutron scale
Neutron scaleNeutron scale
Neutron scale
 
[OpenStack Day in Korea 2015] Track 2-3 - 오픈스택 클라우드에 최적화된 네트워크 가상화 '누아지(Nuage)'
[OpenStack Day in Korea 2015] Track 2-3 - 오픈스택 클라우드에 최적화된 네트워크 가상화 '누아지(Nuage)'[OpenStack Day in Korea 2015] Track 2-3 - 오픈스택 클라우드에 최적화된 네트워크 가상화 '누아지(Nuage)'
[OpenStack Day in Korea 2015] Track 2-3 - 오픈스택 클라우드에 최적화된 네트워크 가상화 '누아지(Nuage)'
 
OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...
OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...
OpenStack & OVS: From Love-Hate Relationship to Match Made in Heaven - Erez C...
 
Networking in the cloud: An SDN primer
Networking in the cloud: An SDN primerNetworking in the cloud: An SDN primer
Networking in the cloud: An SDN primer
 
Simplifying OpenStack Networks with Routing on the Host: Gerard Chami + Scott...
Simplifying OpenStack Networks with Routing on the Host: Gerard Chami + Scott...Simplifying OpenStack Networks with Routing on the Host: Gerard Chami + Scott...
Simplifying OpenStack Networks with Routing on the Host: Gerard Chami + Scott...
 
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
 
Is OpenStack Neutron production ready for large scale deployments?
Is OpenStack Neutron production ready for large scale deployments?Is OpenStack Neutron production ready for large scale deployments?
Is OpenStack Neutron production ready for large scale deployments?
 
Codership's galera cluster installation and quickstart webinar march 2016
Codership's galera cluster installation and quickstart webinar march 2016Codership's galera cluster installation and quickstart webinar march 2016
Codership's galera cluster installation and quickstart webinar march 2016
 
OpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStackOpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStack
 
Enabling Limitless Connectivity, Opportunity and Growth with Interconnection ...
Enabling Limitless Connectivity, Opportunity and Growth with Interconnection ...Enabling Limitless Connectivity, Opportunity and Growth with Interconnection ...
Enabling Limitless Connectivity, Opportunity and Growth with Interconnection ...
 
Integrating OpenStack to Existing infrastructure
Integrating OpenStack to Existing infrastructureIntegrating OpenStack to Existing infrastructure
Integrating OpenStack to Existing infrastructure
 
OpenStack Deployment in the Enterprise
OpenStack Deployment in the Enterprise OpenStack Deployment in the Enterprise
OpenStack Deployment in the Enterprise
 
Building a Large Scale SolarWinds Installation
Building a Large Scale SolarWinds InstallationBuilding a Large Scale SolarWinds Installation
Building a Large Scale SolarWinds Installation
 

Similar a Erlang User Conference 2016: Container Networking: A Field Report

Open source applied: Real-world uses
Open source applied: Real-world usesOpen source applied: Real-world uses
Open source applied: Real-world usesRogue Wave Software
 
Mesosphere & Magnetic: Take the pain out of running complex and critical serv...
Mesosphere & Magnetic: Take the pain out of running complex and critical serv...Mesosphere & Magnetic: Take the pain out of running complex and critical serv...
Mesosphere & Magnetic: Take the pain out of running complex and critical serv...Mesosphere Inc.
 
Microservices Manchester: Keynote. Microservices are so 2015, What's Next? By...
Microservices Manchester: Keynote. Microservices are so 2015, What's Next? By...Microservices Manchester: Keynote. Microservices are so 2015, What's Next? By...
Microservices Manchester: Keynote. Microservices are so 2015, What's Next? By...OpenCredo
 
Elastic data services on Apache Mesos via Mesosphere’s DCOS
Elastic data services on Apache Mesos via Mesosphere’s DCOSElastic data services on Apache Mesos via Mesosphere’s DCOS
Elastic data services on Apache Mesos via Mesosphere’s DCOSharrythewiz
 
Cloud Native Applications - DevOps, EMC and Cloud Foundry
Cloud Native Applications - DevOps, EMC and Cloud FoundryCloud Native Applications - DevOps, EMC and Cloud Foundry
Cloud Native Applications - DevOps, EMC and Cloud FoundryBob Sokol
 
Michael Hausenblas- Scalable time series and stream processing for IoT applic...
Michael Hausenblas- Scalable time series and stream processing for IoT applic...Michael Hausenblas- Scalable time series and stream processing for IoT applic...
Michael Hausenblas- Scalable time series and stream processing for IoT applic...WithTheBest
 
Storage for containers and cloud-native deployments - Rancher Online Meetup -...
Storage for containers and cloud-native deployments - Rancher Online Meetup -...Storage for containers and cloud-native deployments - Rancher Online Meetup -...
Storage for containers and cloud-native deployments - Rancher Online Meetup -...Shannon Williams
 
Monitor OpenStack Environments from the bottom up and front to back
Monitor OpenStack Environments from the bottom up and front to backMonitor OpenStack Environments from the bottom up and front to back
Monitor OpenStack Environments from the bottom up and front to backIcinga
 
Step One in Digital Transformation - Node Summit 2016 - Dan Shaw
Step One in Digital Transformation - Node Summit 2016 - Dan ShawStep One in Digital Transformation - Node Summit 2016 - Dan Shaw
Step One in Digital Transformation - Node Summit 2016 - Dan ShawNodeSource
 
Downtime is not an option - day 2 operations - Jörg Schad
Downtime is not an option - day 2 operations -  Jörg SchadDowntime is not an option - day 2 operations -  Jörg Schad
Downtime is not an option - day 2 operations - Jörg SchadCodemotion
 
Agile DevOps Transformation At HUD (AgileDC 2017)
Agile DevOps Transformation At HUD (AgileDC 2017)Agile DevOps Transformation At HUD (AgileDC 2017)
Agile DevOps Transformation At HUD (AgileDC 2017)Marco Corona
 
Deploying Containers in Production and at Scale
Deploying Containers in Production and at ScaleDeploying Containers in Production and at Scale
Deploying Containers in Production and at ScaleMesosphere Inc.
 
Mesos, DC/OS and the Architecture of the New Datacenter
Mesos, DC/OS and the Architecture of the New DatacenterMesos, DC/OS and the Architecture of the New Datacenter
Mesos, DC/OS and the Architecture of the New DatacenterQAware GmbH
 
Container Orchestration Wars
Container Orchestration WarsContainer Orchestration Wars
Container Orchestration WarsKarl Isenberg
 
Experiences Bringing CD to a DoD Project
Experiences Bringing CD to a DoD ProjectExperiences Bringing CD to a DoD Project
Experiences Bringing CD to a DoD ProjectGene Gotimer
 
EMC World 2016 - cnaITL.05 Unstructured and Structured PaaS Demystified
EMC World 2016 - cnaITL.05 Unstructured and Structured PaaS DemystifiedEMC World 2016 - cnaITL.05 Unstructured and Structured PaaS Demystified
EMC World 2016 - cnaITL.05 Unstructured and Structured PaaS Demystified{code}
 
Journey to the Modern App with Containers, Microservices and Big Data
Journey to the Modern App with Containers, Microservices and Big DataJourney to the Modern App with Containers, Microservices and Big Data
Journey to the Modern App with Containers, Microservices and Big DataLightbend
 
CI/CD with Docker, DC/OS, and Jenkins
CI/CD with Docker, DC/OS, and JenkinsCI/CD with Docker, DC/OS, and Jenkins
CI/CD with Docker, DC/OS, and JenkinsKarl Isenberg
 
Open source applied - Real world use cases (Presented at Open Source 101)
Open source applied - Real world use cases (Presented at Open Source 101)Open source applied - Real world use cases (Presented at Open Source 101)
Open source applied - Real world use cases (Presented at Open Source 101)Rogue Wave Software
 
Open Source Applied - Real World Use Cases
Open Source Applied - Real World Use CasesOpen Source Applied - Real World Use Cases
Open Source Applied - Real World Use CasesAll Things Open
 

Similar a Erlang User Conference 2016: Container Networking: A Field Report (20)

Open source applied: Real-world uses
Open source applied: Real-world usesOpen source applied: Real-world uses
Open source applied: Real-world uses
 
Mesosphere & Magnetic: Take the pain out of running complex and critical serv...
Mesosphere & Magnetic: Take the pain out of running complex and critical serv...Mesosphere & Magnetic: Take the pain out of running complex and critical serv...
Mesosphere & Magnetic: Take the pain out of running complex and critical serv...
 
Microservices Manchester: Keynote. Microservices are so 2015, What's Next? By...
Microservices Manchester: Keynote. Microservices are so 2015, What's Next? By...Microservices Manchester: Keynote. Microservices are so 2015, What's Next? By...
Microservices Manchester: Keynote. Microservices are so 2015, What's Next? By...
 
Elastic data services on Apache Mesos via Mesosphere’s DCOS
Elastic data services on Apache Mesos via Mesosphere’s DCOSElastic data services on Apache Mesos via Mesosphere’s DCOS
Elastic data services on Apache Mesos via Mesosphere’s DCOS
 
Cloud Native Applications - DevOps, EMC and Cloud Foundry
Cloud Native Applications - DevOps, EMC and Cloud FoundryCloud Native Applications - DevOps, EMC and Cloud Foundry
Cloud Native Applications - DevOps, EMC and Cloud Foundry
 
Michael Hausenblas- Scalable time series and stream processing for IoT applic...
Michael Hausenblas- Scalable time series and stream processing for IoT applic...Michael Hausenblas- Scalable time series and stream processing for IoT applic...
Michael Hausenblas- Scalable time series and stream processing for IoT applic...
 
Storage for containers and cloud-native deployments - Rancher Online Meetup -...
Storage for containers and cloud-native deployments - Rancher Online Meetup -...Storage for containers and cloud-native deployments - Rancher Online Meetup -...
Storage for containers and cloud-native deployments - Rancher Online Meetup -...
 
Monitor OpenStack Environments from the bottom up and front to back
Monitor OpenStack Environments from the bottom up and front to backMonitor OpenStack Environments from the bottom up and front to back
Monitor OpenStack Environments from the bottom up and front to back
 
Step One in Digital Transformation - Node Summit 2016 - Dan Shaw
Step One in Digital Transformation - Node Summit 2016 - Dan ShawStep One in Digital Transformation - Node Summit 2016 - Dan Shaw
Step One in Digital Transformation - Node Summit 2016 - Dan Shaw
 
Downtime is not an option - day 2 operations - Jörg Schad
Downtime is not an option - day 2 operations -  Jörg SchadDowntime is not an option - day 2 operations -  Jörg Schad
Downtime is not an option - day 2 operations - Jörg Schad
 
Agile DevOps Transformation At HUD (AgileDC 2017)
Agile DevOps Transformation At HUD (AgileDC 2017)Agile DevOps Transformation At HUD (AgileDC 2017)
Agile DevOps Transformation At HUD (AgileDC 2017)
 
Deploying Containers in Production and at Scale
Deploying Containers in Production and at ScaleDeploying Containers in Production and at Scale
Deploying Containers in Production and at Scale
 
Mesos, DC/OS and the Architecture of the New Datacenter
Mesos, DC/OS and the Architecture of the New DatacenterMesos, DC/OS and the Architecture of the New Datacenter
Mesos, DC/OS and the Architecture of the New Datacenter
 
Container Orchestration Wars
Container Orchestration WarsContainer Orchestration Wars
Container Orchestration Wars
 
Experiences Bringing CD to a DoD Project
Experiences Bringing CD to a DoD ProjectExperiences Bringing CD to a DoD Project
Experiences Bringing CD to a DoD Project
 
EMC World 2016 - cnaITL.05 Unstructured and Structured PaaS Demystified
EMC World 2016 - cnaITL.05 Unstructured and Structured PaaS DemystifiedEMC World 2016 - cnaITL.05 Unstructured and Structured PaaS Demystified
EMC World 2016 - cnaITL.05 Unstructured and Structured PaaS Demystified
 
Journey to the Modern App with Containers, Microservices and Big Data
Journey to the Modern App with Containers, Microservices and Big DataJourney to the Modern App with Containers, Microservices and Big Data
Journey to the Modern App with Containers, Microservices and Big Data
 
CI/CD with Docker, DC/OS, and Jenkins
CI/CD with Docker, DC/OS, and JenkinsCI/CD with Docker, DC/OS, and Jenkins
CI/CD with Docker, DC/OS, and Jenkins
 
Open source applied - Real world use cases (Presented at Open Source 101)
Open source applied - Real world use cases (Presented at Open Source 101)Open source applied - Real world use cases (Presented at Open Source 101)
Open source applied - Real world use cases (Presented at Open Source 101)
 
Open Source Applied - Real World Use Cases
Open Source Applied - Real World Use CasesOpen Source Applied - Real World Use Cases
Open Source Applied - Real World Use Cases
 

Último

Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...amber724300
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessWSO2
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialJoão Esperancinha
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...itnewsafrica
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 

Último (20)

Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorial
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 

Erlang User Conference 2016: Container Networking: A Field Report

  • 1. © 2016 Mesosphere, Inc. All Rights Reserved. CONTAINER ORCHESTRATION AND SOFTWARE DEFINED NETWORK: A FIELD REPORT @SARGUN 1 Sargun Dhillon, 2016
  • 2. © 2016 Mesosphere, Inc. All Rights Reserved. WHO AM I? 2
  • 3. © 2016 Mesosphere, Inc. All Rights Reserved. 3
  • 4. © 2016 Mesosphere, Inc. All Rights Reserved. 4
  • 5. © 2016 Mesosphere, Inc. All Rights Reserved. 5
  • 6. © 2016 Mesosphere, Inc. All Rights Reserved. 6 My Mission
  • 7. © 2016 Mesosphere, Inc. All Rights Reserved. AGENDA 7 • A brief history of how we got here • How we’re trying to make it better • Some systems we’ve built to enable us to better ship • How Erlang helped us get there
  • 8. © 2016 Mesosphere, Inc. All Rights Reserved. A BRIEF HISTORY OF NETWORKS IN THE DC 8
  • 9. © 2016 Mesosphere, Inc. All Rights Reserved. ORGANIZATIONS CIRCA 2007 9 •Before DevOps was first heard •Clear differentiation of ownership •The datacenter was owned by a the NOC •Deployment of services was done by sysadmins in the operations group •Developers operated without access to production •Production deployments gated by QA, Operations
  • 10. © 2016 Mesosphere, Inc. All Rights Reserved. SOFTWARE CIRCA 2007 10 •Different services glued together via CORBA, XML-RPC, SOAP •No one was really consciously doing microservices •Networks were static, giant layer 2 domains •Load Balancing provided by hardware •Firewall provided by hardware •Everyone ran their own datacenter •EC2 in its infancy, only a year prior has the term “Cloud” began to become popular •Systems statically partitioned
  • 11. © 2016 Mesosphere, Inc. All Rights Reserved. 11 SaaS continued to grow at an incredible rate
  • 12. © 2016 Mesosphere, Inc. All Rights Reserved. 12 There became a race to ship faster
  • 13. © 2016 Mesosphere, Inc. All Rights Reserved. 13 We kept the software alive By feeding it With Sysadmins
  • 14. © 2016 Mesosphere, Inc. All Rights Reserved. 14 We kept the machines alive By feeding them With Blood
  • 15. © 2016 Mesosphere, Inc. All Rights Reserved. 15 This wasn’t working
  • 16. © 2016 Mesosphere, Inc. All Rights Reserved. ORGANIZATIONS 2008+ 16 •We began seeing a gradual shift in the industry where lines between QA, Dev, and Ops were blurring •Devops term coined in 2008, first DevOpsDay in 2009 •Gradual adoption of the cloud, fewer organizations owning their own datacenters •Either networking was outsourced to the cloud, or typically remained in a small internal organization •Needed to reduce ratio of operators to servers
  • 17. © 2016 Mesosphere, Inc. All Rights Reserved. SOFTWARE CIRCA 2008+ 17 •Popularization of Open Source tooling to automate much of traditional operations, and QA •Jenkins / Hudson •Puppet / Chef •Capistrano •Popularization of stacks requiring with more complex operational requirements •Nutch / Hadoop •NoSQLs •Still statically partitioned machines •Networks still sacred territory
  • 18. © 2016 Mesosphere, Inc. All Rights Reserved. CIRCA 2011 18 •Much of what’s been happening for the past half-decade hits networking •Much of this falls under the term “SDN” (Software Defined Networking) or “NFV” (Network Function Virtualization) •Hastened by the adoption of VMs in the enterprise in the hype cycle •Openflow promises to fix everything •Major adoptions of the cloud by startups as well as enterprise •Virtualization begins to become mainstream as a mechanism of consolidating workloads •The invention of the “private cloud” •DotCloud / Docker funded by Y-combinator a year earlier •Term “Microservice” coined
  • 19. © 2016 Mesosphere, Inc. All Rights Reserved. CIRCA 2013 19 • Docker becomes instant hit and brings containers to the forefront • Dynamic partitioning begins to make in-roads • Google releases Omega paper • Apache Aurora open sourced • Microservice counts explode, demanding collocation of workloads for efficiency • Mesosphere Founded • Site Reliability Engineering begins to popularize and further blur the lines between Dev, Ops, and QA
  • 20. © 2016 Mesosphere, Inc. All Rights Reserved. 20 Everything was changing
  • 21. © 2016 Mesosphere, Inc. All Rights Reserved. 21 Why?
  • 22. © 2016 Mesosphere, Inc. All Rights Reserved. 22 Business Value
  • 23. © 2016 Mesosphere, Inc. All Rights Reserved. 23
  • 24. © 2016 Mesosphere, Inc. All Rights Reserved. BENEFITS 24 •Reduction in cost of goods sold •Smaller engineer to server ratio •Linear, or super linear growth rate of engineering team to servers is unsustainable •Smaller engineer to capability ratio, where capability includes: •Features •Throughput •Better User Experience •Better availability •Quicker release to features
  • 25. © 2016 Mesosphere, Inc. All Rights Reserved. 25 But at what cost?
  • 26. © 2016 Mesosphere, Inc. All Rights Reserved. 26 Complexity
  • 27. © 2016 Mesosphere, Inc. All Rights Reserved. OLD WORLD 27
  • 28. © 2016 Mesosphere, Inc. All Rights Reserved. NEW WORLD 28
  • 29. © 2016 Mesosphere, Inc. All Rights Reserved. DIVING DEEPER 29
  • 30. © 2016 Mesosphere, Inc. All Rights Reserved. 30 Paxos? Raft? Ω Failure Detector? Pods? Wat? Sidecars? Etcd? Zookeeper? VxLan?
  • 31. © 2016 Mesosphere, Inc. All Rights Reserved. 31 It was time for something completely new
  • 32. © 2016 Mesosphere, Inc. All Rights Reserved. ENTER DC/OS 32
  • 33. © 2016 Mesosphere, Inc. All Rights Reserved. CONTAINERS WITH BATTERIES INCLUDED 33 • Includes everything you need to move away from 2007 • Networking • Security • Application deployment, and orchestration • Stateful services • Scheduling
  • 34. © 2016 Mesosphere, Inc. All Rights Reserved. 34 In Your Datacenter
  • 35. © 2016 Mesosphere, Inc. All Rights Reserved. 35 As a Black Box
  • 36. © 2016 Mesosphere, Inc. All Rights Reserved. 36 But, our story starts: ~November 2015 (~8 months ago)
  • 37. © 2016 Mesosphere, Inc. All Rights Reserved. 37 Networking Features
  • 38. © 2016 Mesosphere, Inc. All Rights Reserved. 38 “Service Discovery”
  • 39. © 2016 Mesosphere, Inc. All Rights Reserved. 39 Where are my apps running?
  • 40. © 2016 Mesosphere, Inc. All Rights Reserved. 40
  • 41. © 2016 Mesosphere, Inc. All Rights Reserved. 41 The Old World
  • 42. © 2016 Mesosphere, Inc. All Rights Reserved. 42 Let Mesos* Choose Ports *The Scheduler
  • 43. © 2016 Mesosphere, Inc. All Rights Reserved. 43 How do you find the tasks?
  • 44. © 2016 Mesosphere, Inc. All Rights Reserved. 44 A Directory?
  • 45. © 2016 Mesosphere, Inc. All Rights Reserved. 45 Mesos-DNS
  • 46. © 2016 Mesosphere, Inc. All Rights Reserved. 46
  • 47. © 2016 Mesosphere, Inc. All Rights Reserved. 47 …Ish
  • 48. © 2016 Mesosphere, Inc. All Rights Reserved. 48 DNS SRV Based Service Discovery
  • 49. © 2016 Mesosphere, Inc. All Rights Reserved. 49 Everyone has DNS right?
  • 50. © 2016 Mesosphere, Inc. All Rights Reserved. 50 And GLibc even has a bug open for it!
  • 51. © 2016 Mesosphere, Inc. All Rights Reserved. 51 …Opened in 2005
  • 52. © 2016 Mesosphere, Inc. All Rights Reserved. 52 We needed a solution that actually worked
  • 53. © 2016 Mesosphere, Inc. All Rights Reserved. 53 So, we performed an OODA loop 1.Observe 2. Orient 3. Decide 4. Act
  • 54. © 2016 Mesosphere, Inc. All Rights Reserved. OBSERVE: SERVICE DISCOVERY 54 • Existing Dynamic Service Discovery Solutions: • Etcd • Finagle + Zookeeper • Consul • Existing Static Service Discovery Solutions: • Amazon ELB • Hardware Load Balancers • Service Discovery is an afterthought Gathering our data about the field
  • 55. © 2016 Mesosphere, Inc. All Rights Reserved. OBSERVE: NETWORKING 55 • Everybody assumes IP per application instance • Everybody assumes reliable DNS • Some people want to be fast • Some people want security • Nobody wants to edit application code • Nobody wants to talk to their network engineer Gathering our data about the field
  • 56. © 2016 Mesosphere, Inc. All Rights Reserved. ORIENT: DC/OS NETWORKING CORE TENETS 56 •DC/OS must be agnostic to the underlying environment •AWS / Azure / GCE / Softlayer as the lowest common denominators •DC/OS should require no to minimal changes to the code in order to work •DC/OS should provide similar services to existing environments •Fixed load balancers •Security •IP/Container •We do not want to require a change in organization procedures •We want to be secure
  • 57. © 2016 Mesosphere, Inc. All Rights Reserved. DECIDE 57 What do we want to build? • Load Balancing • Seamless Service Discovery • Reliable DNS • External cluster Access • Metrics and Discoverability • IP Per Container
  • 58. © 2016 Mesosphere, Inc. All Rights Reserved. DC/OS ARCHITECTURE (~NOV ’15): POLYGLOT MICROSERVICES 58
  • 59. © 2016 Mesosphere, Inc. All Rights Reserved. 59 What Did We Build?
  • 60. © 2016 Mesosphere, Inc. All Rights Reserved. ACT: DEVELOPED NEW ERLANG SERVICES 60 • Service Discovery • Navstar • Spartan • Load Balancing • Minuteman • Networking API • Fishladder • Control Plane • Lashup
  • 61. © 2016 Mesosphere, Inc. All Rights Reserved. DC/OS ARCHITECTURE (TODAY): POLYGLOT MICROSERVICES 61
  • 62. © 2016 Mesosphere, Inc. All Rights Reserved. 62 Network Control Plane: Navstar
  • 63. © 2016 Mesosphere, Inc. All Rights Reserved. 63
  • 64. © 2016 Mesosphere, Inc. All Rights Reserved. NAVSTAR: BENEFITS 64 •Fully decentralized control plane •Scalable •Extensible system to act as a building block •Began as network control plane
  • 65. © 2016 Mesosphere, Inc. All Rights Reserved. 65 DNS: Spartan
  • 66. © 2016 Mesosphere, Inc. All Rights Reserved. 66 HA DNS
  • 67. © 2016 Mesosphere, Inc. All Rights Reserved. 67 /etc/resolv.conf nameserver 8.8.8.8 nameserver 8.8.4.4 Normal DNS
  • 68. © 2016 Mesosphere, Inc. All Rights Reserved. 68 Ideal DNS Request
  • 69. © 2016 Mesosphere, Inc. All Rights Reserved. 69 Ideal DNS Request
  • 70. © 2016 Mesosphere, Inc. All Rights Reserved. 70 But, sometimes things go wrong
  • 71. © 2016 Mesosphere, Inc. All Rights Reserved. 71 Not so Ideal DNS Request
  • 72. © 2016 Mesosphere, Inc. All Rights Reserved. 72 Wait at least 1 second
  • 73. © 2016 Mesosphere, Inc. All Rights Reserved. 73 Not so Ideal DNS Request
  • 74. © 2016 Mesosphere, Inc. All Rights Reserved. 74 Wait at least 1 second
  • 75. © 2016 Mesosphere, Inc. All Rights Reserved. 75 Not so Ideal DNS Request
  • 76. © 2016 Mesosphere, Inc. All Rights Reserved. 76 Wat?
  • 77. © 2016 Mesosphere, Inc. All Rights Reserved. 77 Spartan DNS
  • 78. © 2016 Mesosphere, Inc. All Rights Reserved. 78 Spartan DNS
  • 79. © 2016 Mesosphere, Inc. All Rights Reserved. 79 Spartan DNS
  • 80. © 2016 Mesosphere, Inc. All Rights Reserved. 80 Spartan Controls Timeouts
  • 81. © 2016 Mesosphere, Inc. All Rights Reserved. 81 Edge DNS
  • 82. © 2016 Mesosphere, Inc. All Rights Reserved. 82
  • 83. © 2016 Mesosphere, Inc. All Rights Reserved. SPARTAN: BENEFITS 83 •Makes DNS highly available in light of failure •Lowers Average Latency •Can control timeouts to sub-second •Edge DNS •Many DNS queries don’t need to go off-node
  • 84. © 2016 Mesosphere, Inc. All Rights Reserved. 84 Load Balancing: Minuteman
  • 85. © 2016 Mesosphere, Inc. All Rights Reserved. 85
  • 86. © 2016 Mesosphere, Inc. All Rights Reserved. 86
  • 87. © 2016 Mesosphere, Inc. All Rights Reserved. 87
  • 88. © 2016 Mesosphere, Inc. All Rights Reserved. 88
  • 89. © 2016 Mesosphere, Inc. All Rights Reserved. 89 How does it work?
  • 90. © 2016 Mesosphere, Inc. All Rights Reserved. 90 Setting it up
  • 91. © 2016 Mesosphere, Inc. All Rights Reserved. 91 Intercepting the connection
  • 92. © 2016 Mesosphere, Inc. All Rights Reserved. 92 Remap
  • 93. © 2016 Mesosphere, Inc. All Rights Reserved. 93 Success
  • 94. © 2016 Mesosphere, Inc. All Rights Reserved. MINUTEMAN: BENEFITS 94 •Appearance of a fixed-load balancer •Fully distributed •Other than first packet, the entire lifetime is handled in kernel space •Erlang allows us to maintain latency guarantees
  • 95. © 2016 Mesosphere, Inc. All Rights Reserved. 95 How do we tie it all together?
  • 96. © 2016 Mesosphere, Inc. All Rights Reserved. GLOBAL STATE 96 • Load Balancer Task Mapping • DNS Zones • Virtual Network Routing Tables • Reachability • Security ACLs
  • 97. © 2016 Mesosphere, Inc. All Rights Reserved. 97 Computers
  • 98. © 2016 Mesosphere, Inc. All Rights Reserved. 98 Constant Churn
  • 99. © 2016 Mesosphere, Inc. All Rights Reserved. 99 Sometimes They Break
  • 100. © 2016 Mesosphere, Inc. All Rights Reserved. 100 Sometimes Many Break
  • 101. © 2016 Mesosphere, Inc. All Rights Reserved. 101 Sometimes You don’t know
  • 102. © 2016 Mesosphere, Inc. All Rights Reserved. HOW DO YOU DO SIGNALING? 102
  • 103. © 2016 Mesosphere, Inc. All Rights Reserved. 103 Nobody ever got fired for using Zookeeper
  • 104. © 2016 Mesosphere, Inc. All Rights Reserved. 104 We know about Zookeeper
  • 105. © 2016 Mesosphere, Inc. All Rights Reserved. 105 It works…usually
  • 106. © 2016 Mesosphere, Inc. All Rights Reserved. 106 How else can we do this?
  • 107. © 2016 Mesosphere, Inc. All Rights Reserved. 107 Naively (See: Distributed Erlang)
  • 108. © 2016 Mesosphere, Inc. All Rights Reserved. 108 Massive Amount of Information
  • 109. © 2016 Mesosphere, Inc. All Rights Reserved. 109 Who else has solved this?
  • 110. © 2016 Mesosphere, Inc. All Rights Reserved. 110 Academia
  • 111. © 2016 Mesosphere, Inc. All Rights Reserved. 111 Control Plane: Lashup
  • 112. © 2016 Mesosphere, Inc. All Rights Reserved. 112 How do we scale the naive approach?
  • 113. © 2016 Mesosphere, Inc. All Rights Reserved. 113 All we need is a sparse, connected graph
  • 114. © 2016 Mesosphere, Inc. All Rights Reserved. 114 But how?
  • 115. © 2016 Mesosphere, Inc. All Rights Reserved. 115 Enter: HyParView* Builds a connected graph (overlay), where the degree is <=K *Inspired Protocol
  • 116. © 2016 Mesosphere, Inc. All Rights Reserved. 116 Boot Time
  • 117. © 2016 Mesosphere, Inc. All Rights Reserved. 117
  • 118. © 2016 Mesosphere, Inc. All Rights Reserved. 118
  • 119. © 2016 Mesosphere, Inc. All Rights Reserved. 119
  • 120. © 2016 Mesosphere, Inc. All Rights Reserved. 120
  • 121. © 2016 Mesosphere, Inc. All Rights Reserved. 121
  • 122. © 2016 Mesosphere, Inc. All Rights Reserved. 122
  • 123. © 2016 Mesosphere, Inc. All Rights Reserved. 123
  • 124. © 2016 Mesosphere, Inc. All Rights Reserved. 124
  • 125. © 2016 Mesosphere, Inc. All Rights Reserved. 125
  • 126. © 2016 Mesosphere, Inc. All Rights Reserved. 126
  • 127. © 2016 Mesosphere, Inc. All Rights Reserved. 127
  • 128. © 2016 Mesosphere, Inc. All Rights Reserved. 128
  • 129. © 2016 Mesosphere, Inc. All Rights Reserved. 129
  • 130. © 2016 Mesosphere, Inc. All Rights Reserved. 130 Connected Graph Hyparview
  • 131. © 2016 Mesosphere, Inc. All Rights Reserved. 131 Constant Adaptive Health Checks* *Borrowed from SWIM, Gossip Style Failure Detector
  • 132. © 2016 Mesosphere, Inc. All Rights Reserved. 132 Dealing with Failure Hyparview
  • 133. © 2016 Mesosphere, Inc. All Rights Reserved. 133 Dealing with Failure Hyparview
  • 134. © 2016 Mesosphere, Inc. All Rights Reserved. 134 Dealing with Failure Hyparview
  • 135. © 2016 Mesosphere, Inc. All Rights Reserved. 135 Dealing with Failure Hyparview
  • 136. © 2016 Mesosphere, Inc. All Rights Reserved. 136 Routing* *Borrowed from Dijkstra, OSPF, IS-IS
  • 137. © 2016 Mesosphere, Inc. All Rights Reserved. 137
  • 138. © 2016 Mesosphere, Inc. All Rights Reserved. 138
  • 139. © 2016 Mesosphere, Inc. All Rights Reserved. 139 Adjacent Node 1 Adjacent Node 2 Adjacent Node 3 A T B C B T A C C B A D D C E F E D F H F D E G G F H I H E G I I G H J J I L K K M L J L M K J M L K N N P O M O R P N P Q O N Q S R O R O Q S S T R Q T B A S
  • 140. © 2016 Mesosphere, Inc. All Rights Reserved. 140 View Changes Gossiped on Change
  • 141. © 2016 Mesosphere, Inc. All Rights Reserved. 141 Adjacent Node 1 Adjacent Node 2 Adjacent Node 3 Version (epoch) A T B C 1 B T A C 5 C B A D 2 D C E F 7 E D F H 94 F D E G 1 G F H I 415 H E G I 15 I G H J 1 J I L K 3 K M L J 5 L M K J 7 M L K N 88 N P O M 1 O R P N 3 P Q O N 4 Q S R O 6 R O Q S 8 S T R Q 1 T B A S 3
  • 142. © 2016 Mesosphere, Inc. All Rights Reserved. 142
  • 143. © 2016 Mesosphere, Inc. All Rights Reserved. 143 Just Run Dijkstra* *BFS / DFS
  • 144. © 2016 Mesosphere, Inc. All Rights Reserved. 144 Minimum Spanning Tree, From Sender A
  • 145. © 2016 Mesosphere, Inc. All Rights Reserved. 145 A Wild Pokemon Appears!* *CRDT papers Database
  • 146. © 2016 Mesosphere, Inc. All Rights Reserved. 146 CRDTS: Semilattices “Time”
  • 147. © 2016 Mesosphere, Inc. All Rights Reserved. 147 CRDT KV Store
  • 148. © 2016 Mesosphere, Inc. All Rights Reserved. 148 “Demo”
  • 149. © 2016 Mesosphere, Inc. All Rights Reserved. 149 “Demo” (foo@3c075477e55e)10> nodes(). [baz@3c075477e55e,bar@3c075477e55e] (bar@3c075477e55e)8> nodes(). [foo@3c075477e55e,baz@3c075477e55e] (baz@3c075477e55e)7> nodes(). [foo@3c075477e55e,bar@3c075477e55e]
  • 150. © 2016 Mesosphere, Inc. All Rights Reserved. 150 “Demo” (foo@3c075477e55e)9> lashup_kv:value([erlang_users]). [] (bar@3c075477e55e)9> lashup_kv:value([erlang_users]). [] (baz@3c075477e55e)9> lashup_kv:value([erlang_users]). []
  • 151. © 2016 Mesosphere, Inc. All Rights Reserved. 151 “Demo” (baz@3c075477e55e)10> net_kernel:allow([foo@3c075477e55e]). ok (baz@3c075477e55e)10> net_kernel:disconnect('bar@3c075477e55e'). ok.
  • 152. © 2016 Mesosphere, Inc. All Rights Reserved. 152 “Demo”
  • 153. © 2016 Mesosphere, Inc. All Rights Reserved. 153 “Demo” (bar@3c075477e55e)11> lashup_kv:request_op([erlang_users], {update, [{update, {number, riak_dt_pncounter}, {increment, 5}}]}). {ok,[{{number,riak_dt_pncounter},5}]}
  • 154. © 2016 Mesosphere, Inc. All Rights Reserved. 154 “Demo” (foo@3c075477e55e)12> lashup_kv:value([erlang_users]). [{{number,riak_dt_pncounter},5}] (bar@3c075477e55e)13> lashup_kv:value([erlang_users]). [{{number,riak_dt_pncounter},5}] (baz@3c075477e55e)15> lashup_kv:value([erlang_users]). [{{number,riak_dt_pncounter},5}]
  • 155. © 2016 Mesosphere, Inc. All Rights Reserved. 155 “Demo” (foo@3c075477e55e)23> erlang:set_cookie(baz@3c075477e55e, fake). true (foo@3c075477e55e)24> erlang:set_cookie(bar@3c075477e55e, fake). true
  • 156. © 2016 Mesosphere, Inc. All Rights Reserved. 156 “Demo”
  • 157. © 2016 Mesosphere, Inc. All Rights Reserved. 157 “Demo” (foo@3c075477e55e)29> lashup_kv:request_op([erlang_users], {update, [{update, {number, riak_dt_pncounter}, {increment, 3}}]}). {ok,[{{number,riak_dt_pncounter},8}]} (bar@3c075477e55e)17> lashup_kv:request_op([erlang_users], {update, [{update, {number, riak_dt_pncounter}, {increment, 7}}]}). {ok,[{{number,riak_dt_pncounter},12}]} (baz@3c075477e55e)19> lashup_kv:request_op([erlang_users], {update, [{update, {number, riak_dt_pncounter}, {increment, 11}}]}). {ok,[{{number,riak_dt_pncounter},16}]}
  • 158. © 2016 Mesosphere, Inc. All Rights Reserved. 158 “Demo”
  • 159. © 2016 Mesosphere, Inc. All Rights Reserved. 159 “Demo” (foo@3c075477e55e)1> lashup_kv:value([erlang_users]). [{{number,riak_dt_pncounter},26}] (bar@3c075477e55e)25> lashup_kv:value([erlang_users]). [{{number,riak_dt_pncounter},26}] (baz@3c075477e55e)23> lashup_kv:value([erlang_users]). [{{number,riak_dt_pncounter},26}]
  • 160. © 2016 Mesosphere, Inc. All Rights Reserved. LASHUP KV 160 •Datatypes: •Maps •Composable •Sets •Flags •Counters •Registers •Last-write-wins
  • 161. © 2016 Mesosphere, Inc. All Rights Reserved. 161 Does Lashup provide Business Value?
  • 162. © 2016 Mesosphere, Inc. All Rights Reserved. 162 Prior to Lashup
  • 163. © 2016 Mesosphere, Inc. All Rights Reserved. 163 After Lashup
  • 164. © 2016 Mesosphere, Inc. All Rights Reserved. PROJECT LASHUP 164 •A novel distributed systems SDK that provides: •Membership •Multicast Delivery •Strongly-eventually consistent data storage •Powers: •Minuteman VIP dissemination •Minuteman node liveness checks •Overlay routing •DNS Synchronization •Open source: github.com/dcos/lashup
  • 165. © 2016 Mesosphere, Inc. All Rights Reserved. 165 So, Why Erlang/OTP?
  • 166. © 2016 Mesosphere, Inc. All Rights Reserved. 166 Why Not? (Go)
  • 167. © 2016 Mesosphere, Inc. All Rights Reserved. 167 The First Version of Minuteman Was In Golang
  • 168. © 2016 Mesosphere, Inc. All Rights Reserved. 168 Stand on the Shoulders of Giants
  • 169. © 2016 Mesosphere, Inc. All Rights Reserved. 169 What’s a good language with a healthy set of distributed systems, and networking libraries?
  • 170. © 2016 Mesosphere, Inc. All Rights Reserved. 170 What’s a good language with a healthy set of distributed systems, and networking libraries? With an ecosystem
  • 171. © 2016 Mesosphere, Inc. All Rights Reserved. 171 What’s a good language with a healthy set of distributed systems, and networking libraries? With an ecosystem That’s battle tested
  • 172. © 2016 Mesosphere, Inc. All Rights Reserved. 172 It’s a 3AM, who do you want picking up the phone?
  • 173. © 2016 Mesosphere, Inc. All Rights Reserved. 173 Answer: You make it so that your software so it doesn’t page you at 3 AM.
  • 174. © 2016 Mesosphere, Inc. All Rights Reserved. 174 Upgrading Software on Mars is Easier vs. On-Prem
  • 175. © 2016 Mesosphere, Inc. All Rights Reserved. 175 Erlang
  • 176. © 2016 Mesosphere, Inc. All Rights Reserved. LASHUP KV NEEDED A DURABLE STORE ANSWER: MNESIA 176 •ACID, Transactional •20+ years old •Battle Tested •Comes built-in •Software Transaction Memory
  • 177. © 2016 Mesosphere, Inc. All Rights Reserved. LASHUP KV NEEDED A CRDT LIBRARY ANSWER: RIAK_DT 177 •Riak’s CRDT Library •Used in production by others •Battle Tested •Property tested
  • 178. © 2016 Mesosphere, Inc. All Rights Reserved. LASHUP NEEDED SECURE DISTRIBUTION ANSWER: DISTERL 178 •SSL with mutual authentication is a matter of configuration •Used in production by others •Battle Tested •Comes Built-in
  • 179. © 2016 Mesosphere, Inc. All Rights Reserved. SPARTAN NEEDED A DNS SERVER ANSWER: ERL-DNS 179 •Runs DNSimple •Used in production •Battle Tested •Some Statistics from DNSimple •Serves 20K+ domains •Does 20k queries/sec+
  • 180. © 2016 Mesosphere, Inc. All Rights Reserved. MINUTEMAN NEEDED A KERNEL API LIBRARY ANSWER: GEN_NETLINK 180 •Liberal license •Deployed by TravelPing •Used in production •Battle Tested
  • 181. © 2016 Mesosphere, Inc. All Rights Reserved. LASHUP NEEDED A GRAPH LIBRARY ANSWER: DIGRAPH 181 •Built-in Library to Erlang/OTP •Correctness verified •Simple API •Downsides: •Slow •Heavy
  • 182. © 2016 Mesosphere, Inc. All Rights Reserved. 182 So, we built our own.
  • 183. © 2016 Mesosphere, Inc. All Rights Reserved. 183 On Testing…
  • 184. © 2016 Mesosphere, Inc. All Rights Reserved. 184 We verified lashup_gm_route against digraph
  • 185. © 2016 Mesosphere, Inc. All Rights Reserved. 185 Property-Based Testing: PropEr
  • 186. © 2016 Mesosphere, Inc. All Rights Reserved. 186 Automatically Generate Command Set CSet ={add_node(e), add_node(b), add_edge(e,b), …}
  • 187. © 2016 Mesosphere, Inc. All Rights Reserved. 187 Verify Equality Digraph lashup_gm add_node(e) add_node(e) Check Equivalency add_node(b) add_node(b) Check Equivalency add_edge(e, b) add_edge(e, b) Check Equivalency
  • 188. © 2016 Mesosphere, Inc. All Rights Reserved. 188 …Tens of Thousands of Times
  • 189. © 2016 Mesosphere, Inc. All Rights Reserved. 189 Common Test Makes Integration Testing A Breeze
  • 190. © 2016 Mesosphere, Inc. All Rights Reserved. COMMON TEST: ON EACH CHECK-IN (LASHUP) 190 •Spins up 25 virtual nodes •Torture tests: •Partitions nodes randomly for 5 minutes to see if it can generate a permanent split •Kills nodes randomly to verify global health check convergence •Verifies multicast works even in poor network conditions •Writes divergent keys to all nodes, and reconnects them •~500 lines of tests, 80%+ code coverage
  • 191. © 2016 Mesosphere, Inc. All Rights Reserved. TAKE-AWAYS 191 •The container ecosystem is in is early stages •Erlang is suitable for building modern, reliable distributed systems •These systems are tricky, so testing is key •We have a healthy ecosystem •There need to be alternatives to consensus
  • 192. © 2016 Mesosphere, Inc. All Rights Reserved. ERLANG & CONTAINER NETWORKING @SARGUN 192