Building the Glue for Service Discovery & Load Balancing Microservices
-
Upload
sargun-dhillon -
Category
Technology
-
view
839 -
download
0
Transcript of Building the Glue for Service Discovery & Load Balancing Microservices
![Page 1: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/1.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
BUILDING THE GLUE FOR SERVICE DISCOVERY & LOAD BALANCING MICROSERVICES
@SARGUN
1
Sargun Dhillon, 2016
![Page 2: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/2.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
WHO AM I?
2
![Page 3: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/3.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
AGENDA
3
• How, and why did we go here?
• What have I been building in the past year?
• Why?
• How?
• Challenges
• Some of the future
![Page 4: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/4.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
A BRIEF HISTORY OF NETWORKS IN THE DATACENTER
4
![Page 5: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/5.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
ORGANIZATIONS CIRCA 2007
5
•Before DevOps was coined
•Clear differentiation of ownership
•The datacenter was owned by the NOC
•Deployment of services was done by sysadmins in the operations group
•Developers operated without access to production systems
•Production deployments gated by QA and Operations
![Page 6: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/6.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
SOFTWARE CIRCA 2007
6
•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
•Everyone ran their own datacenter
•EC2 in its infancy, only a year prior has the term “Cloud” began to become popular
•Systems statically partitioned
![Page 7: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/7.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 7
SaaS continued to grow at an incredible rate
![Page 8: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/8.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 8
There became a race to ship faster
![Page 9: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/9.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 9
We kept the software alive By feeding it
With Sysadmins
![Page 10: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/10.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 10
We kept the machines alive By feeding them
With Blood
![Page 11: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/11.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 11
This wasn’t working
![Page 12: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/12.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
ORGANIZATIONS 2008+
12
•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
![Page 13: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/13.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
SOFTWARE CIRCA 2008+
13
•Popularization of Open Source tooling to automate QA and much of traditional operations
•Jenkins / Hudson
•Puppet / Chef
•Capistrano
•Popularization of stacks requiring more complex operational requirements
•Nutch / Hadoop
•NoSQLs
•Machine still statically partitioned
•Networks still sacred territory
![Page 14: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/14.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
CIRCA 2011
14
•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
![Page 15: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/15.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
CIRCA 2013
15
• Docker becomes an 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
![Page 16: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/16.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 16
Everything was changing
![Page 17: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/17.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 17
Why?
![Page 18: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/18.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 18
Business Value
![Page 19: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/19.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 19
![Page 20: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/20.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
BENEFITS
20
•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 and fixes
![Page 21: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/21.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 21
But at what cost?
![Page 22: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/22.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 22
Complexity
![Page 23: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/23.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
OLD WORLD
23
![Page 24: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/24.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
NEW WORLD
24
![Page 25: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/25.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
DIVING DEEPER
25
![Page 26: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/26.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 26
Paxos?
Raft?
Ω Failure Detector?
Pods?
Wat?
Sidecars?
Etcd?
Zookeeper?
VxLan?
![Page 27: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/27.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 27
Performance
![Page 28: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/28.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
REDIS PERFORMANCE
28
![Page 29: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/29.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 29
MySQL Performance with Containers
0
75000
150000
225000
300000
Container-free Host Mode Bridged Overlay
Transactions / Sec
![Page 30: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/30.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
OUR JOURNEY
30
![Page 31: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/31.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 31
“Connectivity”
![Page 32: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/32.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 32
Where are my apps running?
![Page 33: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/33.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 33
![Page 34: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/34.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 34
The Old World
![Page 35: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/35.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 35
Let Mesos* Choose Ports
*The Scheduler
![Page 36: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/36.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 36
How do you find the tasks?
![Page 37: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/37.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 37
A Directory?
![Page 38: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/38.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 38
See: DNS
![Page 39: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/39.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 39
![Page 40: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/40.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 40
Solution: Expose the IP and Port of Tasks
via DNS SRV records
![Page 41: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/41.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 41
Everyone has DNS right?
![Page 42: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/42.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 42
And GLibc even has a bug open for it!
![Page 43: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/43.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 43
…Opened in 2005
![Page 44: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/44.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 44
So, we performed an OODA loop
1. Observe 2. Orient 3. Decide 4. Act
![Page 45: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/45.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
OBSERVE: SERVICE DISCOVERY
45
• 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
![Page 46: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/46.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
OBSERVE: NETWORKING
46
• 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
![Page 47: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/47.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
ORIENT: NETWORKING CORE TENANTS
47
•We must be agnostic to the underlying environment
•AWS / Azure / GCE / Softlayer as the lowest common denominators
•We should require minimal changes to user code in order to work
•We should provide similar services to existing environments
•Fixed load balancers
•Security
•IP/Container
•We do not want to require a change in organization procedures
![Page 48: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/48.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 48
Act: What did we build?
![Page 49: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/49.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 49
Load Balancing: Minuteman
![Page 50: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/50.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
WHAT WE WANTED
50
![Page 51: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/51.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 51
First try: LD_PRELOAD
![Page 52: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/52.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 52
How does connect() work?
![Page 53: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/53.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 53
![Page 54: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/54.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 54
![Page 55: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/55.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 55
How does connect() work on LD_PRELOAD?
![Page 56: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/56.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 56
![Page 57: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/57.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 57
![Page 58: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/58.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 58
![Page 59: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/59.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 59
![Page 60: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/60.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 60
…But no
![Page 61: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/61.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 61
Static Linking
![Page 62: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/62.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 62
What else is there?
![Page 63: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/63.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 63
![Page 64: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/64.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 64
![Page 65: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/65.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 65
![Page 66: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/66.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 66
![Page 67: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/67.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 67
Minuteman: Flows at a Moment’s notice
![Page 68: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/68.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
MINUTEMAN: BENEFITS
68
•Appearance of a fixed-load balancer
•Fully distributed
•Other than first packet, the entire lifetime is handled in kernel space
•Source: github.com/dcos/minuteman
![Page 69: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/69.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 69
How do we tie it all together?
![Page 70: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/70.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
GLOBAL STATE
70
• Load Balancer Task Mapping
• DNS Zones
• Virtual Network Routing Tables
• Reachability
• Security ACLs
![Page 71: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/71.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 71
Computers
![Page 72: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/72.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 72
Constant Churn
![Page 73: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/73.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 73
Sometimes
They Break
![Page 74: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/74.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 74
Sometimes
Many Break
![Page 75: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/75.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 75
Sometimes
You don’t know
![Page 76: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/76.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
HOW DO YOU DO SIGNALING?
76
![Page 77: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/77.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 77
Nobody ever got fired for using Zookeeper
![Page 78: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/78.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 78
We know about Zookeeper
![Page 79: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/79.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 79
It works…usually
![Page 80: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/80.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 80
How else can we do this?
![Page 81: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/81.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 81
Naively
![Page 82: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/82.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 82
Massive Amount of Information
![Page 83: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/83.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 83
Who else has solved this?
![Page 84: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/84.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 84
Academia
![Page 85: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/85.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 85
Control Plane: Lashup
![Page 86: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/86.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 86
How do we scale the naive approach?
![Page 87: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/87.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 87
All we need is a sparse, connected graph
![Page 88: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/88.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 88
But how?
![Page 89: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/89.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 89
Enter: HyParViewBuilds a connected graph (overlay), where the degree is <=K
![Page 90: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/90.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 90
Boot Time
![Page 91: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/91.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 91
![Page 92: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/92.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 92
![Page 93: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/93.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 93
![Page 94: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/94.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 94
![Page 95: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/95.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 95
![Page 96: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/96.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 96
![Page 97: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/97.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 97
![Page 98: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/98.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 98
![Page 99: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/99.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 99
![Page 100: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/100.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 100
![Page 101: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/101.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 101
![Page 102: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/102.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 102
![Page 103: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/103.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 103
![Page 104: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/104.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 104
Connected Graph
Hyparview
![Page 105: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/105.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 105
Constant Adaptive Health Checks*
*Borrowed from SWIM, Gossip Style Failure Detector
![Page 106: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/106.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 106
Dealing with Failure
Hyparview
![Page 107: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/107.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 107
Dealing with Failure
Hyparview
![Page 108: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/108.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 108
Dealing with Failure
Hyparview
![Page 109: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/109.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 109
Dealing with Failure
Hyparview
![Page 110: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/110.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 110
Routing*
*Borrowed from Dijkstra, OSPF, IS-IS, Perlman
![Page 111: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/111.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 111
![Page 112: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/112.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 112
![Page 113: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/113.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 113
Just Run Dijkstra*
*BFS / DFS
![Page 114: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/114.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 114
Minimum Spanning Tree, From Sender A
![Page 115: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/115.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 115
A Wild Pokemon Appears!*
*CRDT papers
Database
![Page 116: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/116.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 116
CRDTS: Semilattices
“Time”
![Page 117: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/117.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 117
CRDT KV Store
![Page 118: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/118.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
LASHUP KV
118
•Datatypes:
•Maps
•Composable
•Sets
•Flags
•Counters
•Registers
•Last-write-wins
![Page 119: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/119.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 119
Evaluation
![Page 120: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/120.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 120
Prior to Lashup
![Page 121: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/121.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 121
After Lashup
![Page 122: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/122.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
PROJECT LASHUP
122
•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
•Source: github.com/dcos/lashup
![Page 123: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/123.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
THE FUTURE
123
![Page 124: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/124.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 124
Zero Overhead NFV: Software Defined Systems?
![Page 125: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/125.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 125
This seems familiar
![Page 126: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/126.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 126
Something new
![Page 127: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/127.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 127
Something new(-ish)
![Page 128: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/128.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 128
![Page 129: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/129.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 129
(Extended)BPF?
![Page 130: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/130.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 130
![Page 131: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/131.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 131
![Page 132: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/132.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
ZERO-OVERHEAD NFV
132
•Implemented using built-in Linux APIs
•Linux Security Module API
•Linux eBPF
•Allows standard BSD API to work
•Example: getpeername() works
•In preliminary testing: <0.1% overhead
•Challenges
•Upgrading Kernel
![Page 133: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/133.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 133
IPv6: Just more addresses?
![Page 134: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/134.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 134
000.000.000.000
32-bits
IPv4
![Page 135: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/135.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 135
0000:0000:0000:0000:0000:0000:0000:0000
64-bits
IPv6
64-bits
Network Part
Host Part
![Page 136: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/136.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 136
SLAAC StateLess Address Auto Configuration
![Page 137: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/137.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
IPV6
137
•264 addresses per host
•Automatically configured
•Challenges
•Cloud support
•Organization challenges
![Page 138: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/138.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 138
What did we learn?
![Page 139: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/139.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 139
Organizations are weird
![Page 140: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/140.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 140
We’re probably doing it wrong (today)
![Page 141: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/141.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved. 141
The future looks bright
![Page 142: Building the Glue for Service Discovery & Load Balancing Microservices](https://reader034.fdocuments.in/reader034/viewer/2022051521/586e8c3e1a28aba0038b83b7/html5/thumbnails/142.jpg)
© 2016 Mesosphere, Inc. All Rights Reserved.
BUILDING THE GLUE FOR SERVICE DISCOVERY & LOAD BALANCING MICROSERVICES
@SARGUN
142