Supporting the growth of Uber's product, business and systems necessitated a new way to think about its dispatching systems. Availability is taken extremely seriously. Manual operational intervention should be kept to a minimum. And scaling is a continuous exercise and should be possible with little effort. With these tenets in mind, we developed Ringpop. Ringpop is a library that brings cooperation and coordination to distributed applications. In this talk, you'll hear about gossip protocols, consistent hashing and the fun ways we applied Ringpop to distributed systems programming! Join me!
2. WHAT IS RINGPOP?
HIGH-LEVEL FACTS
It is a library written in Node.js and Go.
It is...
“...scalable, fault-tolerant application layer sharding.”
"...a library that brings cooperation and coordination to distributed applications.”
“...a hash ring.”
It is open source.
3. BUT WHAT IS UBER?
REALTIME DISPATCH ENGINEERING
Mobile API, match-maker, trip orchestrator
Platform for marketplaces
Highly interactive, real-time
Data locality
Long-running transactions
9. EVOLUTION OF THINKING AT UBER
UBER REAL-TIME DISPATCHING
Scaling our
organization,
product and
systems
100x scale
Availability
over
consistency Self-healing
No “master” No monolith
Flexibility and
safety
14. SWIM GOSSIP PROTOCOL
ENTER RINGPOP: MEMBERSHIP PROTOCOL
PING
INST. A INST. B
INST. A
INST. B
INST. C
INST. A
INST. B
INST. C
INST. C
INST. A
INST. B
INST. C
PING PING
Membership list
15. ENTER RINGPOP: MEMBERSHIP PROTOCOL
PING
INST. A INST. B
INST. A
INST. B
INST. C
INST. A
INST. B
INST. C
INST. C
INST. A
INST. B
INST. C
FAILURE DETECTION
16. ENTER RINGPOP: MEMBERSHIP PROTOCOL
INST. A INST. B
INST. A
INST. B
INST. C
INST. A
INST. B
INST. C
INST. C
INST. A
INST. B
INST. C
PING-REQ PING
AN INDIRECT PING
17. ENTER RINGPOP: MEMBERSHIP PROTOCOL
INST. A INST. B
INST. A
INST. B
INST. C
INST. A
INST. B
INST. C
INST. C
INST. A
INST. B
INST. C
PING-REQ
DECLARE INST. B SUSPECT
18. ENTER RINGPOP: MEMBERSHIP PROTOCOL
INST. A INST. B
INST. A
INST. B
INST. C
INST. A
INST. B
INST. C
INST. C
INST. A
INST. B
INST. C
PING
INST. B
PIGGYBACK MEMBERSHIP UPDATES
19. ENTER RINGPOP: MEMBERSHIP PROTOCOL
INST. A INST. B
INST. A
INST. B
INST. C
INST. A
INST. B
INST. C
INST. C
INST. A
INST. B
INST. C
PING
INST. B
INFECTION-STYLE DISSEMINATION
20. ENTER RINGPOP: MEMBERSHIP PROTOCOL
INST. A INST. B
INST. A
INST. B
INST. C
INST. A
INST. B
INST. C
INST. C
INST. A
INST. B
INST. C
PING
DETECTING A FAILURE
21. CREATING A CLUSTER
ENTER RINGPOP: MEMBERSHIP PROTOCOL
INST. A
INST. A
INST. C
INST. B
SENDS JOIN
SENDS JOIN
22. INST. B STARTS UP
ENTER RINGPOP: MEMBERSHIP PROTOCOL
INST. A
INST. A
INST. C
SENDS JOIN
SENDS JOIN
INST. B INST. B
23. PIGGYBACK MEMBERSHIP ON JOIN
ENTER RINGPOP: MEMBERSHIP PROTOCOL
INST. A
INST. A
INST. C
INST. B INST. B
SENDS JOIN
RESPONDS TO JOIN
INST. B
24. “A” APPLIES UPDATE FROM “B”
ENTER RINGPOP: MEMBERSHIP PROTOCOL
INST. A
INST. A
INST. C
INST. B INST. BINST. B
SENDS JOIN
RESPONDS TO JOIN
INST. B
25. “A” PIGGYBACKS UPDATE
ENTER RINGPOP: MEMBERSHIP PROTOCOL
INST. A
INST. A
INST. C
INST. B INST. BINST. B
SENDS JOIN
SENDS PING
INST. A
26. “B” APPLIES “A” UPDATE
ENTER RINGPOP: MEMBERSHIP PROTOCOL
INST. A
INST. A
INST. C
INST. B INST. BINST. B
SENDS JOIN
SENDS PING
INST. A
INST. A
45. APPLICATIONS OF RINGPOP
RINGPOP IN PRODUCTION
Geospatial sharding
Work delegation
Server-side push / long-polling
Caching
Aggregation
Mailboxes
Database
Service Discovery and Routing