SlideShare a Scribd company logo
Advanced Topics in
        Distributed Systems

   The Chubby lock service for loosely-
       coupled distributed systems
              Mike Burrows, Google Inc.




Presented by: Ioanna Tsalouchidou
                                          1
Outline
●   Introduction
●   Design
●   Scaling
●   Usage
●   Summary




                             2
Introduction
●   What is Chubby?
       –   An engineering effort by Google
       –   Coarse-grained lock service
       –   Loosely-coupled distributed systems
       –   Large number of small machines
       –   High-speed network (1Gbit/s Ethernet)
       –   Availability and Reliability Vs. Performance


                                                          3
Outline
●   Introduction - Motivation
●   Design
●   Scaling
●   Usage
●   Summary




                                4
Design
             le
         iona
     Rat

                                                                         ks                   Se
                                                                     Loc                        qu
                                                                                                   en
                   Sy
                      st   em                                                                        ce
                                str                                                                       rs
                                      uc
                                        tur                                     rs
                                              e
                                                                          handle
  File
                                                                                     Fa         Backup
                             es                                                        il-o
                       pAliv                                                               ve
                    Kee                                                                      rs
                                                  Dir                  Mirroring
                                                      ec
                                                           tor                                Events
                                                               ies
      ns
Sessio

                  Ca                                      se
                     ch                               a Ba                     API
                       ing                        Dat
                                                                                                               5
Rationale
●   Lock service library Vs. Paxos client library
        –   Maintain existing program structure
        –   Advertising the results
        –   Familiar interface to programmers
        –   Reduces the # of servers needed for progress


●   Design decision
        –   Small-files service (for primaries)
        –   Event notification
        –   Consistent caching                             6
Rationale

●   Coarse-grained locks
       –   Less load in the lock server
       –   Less delay caused by lock server unavailability
       –   Survive lock server failures
       –   Many clients served by less servers
●   Fine-grained locks
       –   Lock-server unavailability → many clients stall

                                                             7
System Structure




●   One Chubby cell → five servers
●   Client ↔ Server: via client library
●   Server and library communicate via RPC
                                             8
●   Optional: proxy server
Chubby Cell

●   Set of five servers (replicas)




                                          :-)
●   Distributed consensus protocol
●   One master among replicas
●   Master lease → periodically renewed




                                                9
Chubby Client


                ●   Clients find the master between replicas
                ●   Client requests to master
                ●   Write requests via consensus protocol
                    among replicas
                ●   Read requests handled by master

App   Library

                                                               10
Files, directories and handles
●   Interface: similar to UNIX file system
     /ls/foo/wombat/pouch




                                             11
Files, directories and handles
●   Interface: similar to UNIX file system
     /ls/foo/wombat/pouch
                                 Stands for lock service.
                               Common to all Chubby names




                                                            12
Files, directories and handles
●   Interface: similar to UNIX file system
     /ls/foo/wombat/pouch
                                  Stands for lock service.
                                Common to all Chubby names


                             The name of a Chubby cell, which is
                               resolved to one or more servers
                                    through a DNS lookup




                                                                   13
Files, directories and handles
●   Interface: similar to UNIX file system
     /ls/foo/wombat/pouch
                                  Stands for lock service.
                                Common to all Chubby names


                             The name of a Chubby cell, which is
                               resolved to one or more servers
                                    through a DNS lookup



                            The name of the directory and the file

                                                                     14
Files, directories and handles
●   Interface: similar to UNIX file system
     /ls/foo/wombat/pouch
●   Name space: files and directories called nodes
        –   Ephemeral
        –   Permanent
●   Clients open nodes to obtain Handles
        –   ~ UNIX file descriptors
        –   Subscription to events
                                                     15
Locks

●   Any node can act as a lock
●   Advisory locks (no mandatory locks)
●   Client handles hold
       –   Exclusive locks (write)
       –   Shared locks (read)
●   No write permission → no influence to writers

                                                    16
Sequencers

●   Sequence numbers to interactions that use
    locks
●   Lock holder requests a sequencer
●   Opaque bite-string → state of lock
       –   Name of lock
       –   Mode which was acquired
       –   Lock generation number

                                                17
Caching

●   To reduce read traffic
        –   File data
        –   Meta-data
        –   File absence
        –   Consistent, write-through cache




                                              18
Fail-overs




             19
Fail-overs




             20
Fail-overs
OOOPS




              21
Fail-overs
OOOPS




              22
Outline
●   Introduction - Motivation
●   Design
●   Scaling
●   Usage
●   Summary




                                24
Current scaling techniques
●   Reduce communication with the master
       –   Client caching
       –   Open handles
●   Use a nearby cell (found with DNS)
●   Increase lease time (12s → 60s)
●   Protocol-conversion servers
       –   Translate Chubby to less-complex


                                              25
Future scaling techniques
●   Proxies
        –   Handling KeepAlive requests
        –   Read requests
●   Partitioning
        –   Enable large Chubby cells
        –   Little communication between partitions



                                                      26
Outline
●   Introduction
●   Design
●   Scaling
●   Usage
●   Summary




                             27
Usage

●   Initially as a lock service
●   Most popular use as a name service
●   GFS: to appoint a master server
●   Bigtable
        –   Master election
        –   Master discovers its controlling servers
        –   Clients to find their master

                                                       28
Summary
●   Distributed lock service
        –   Coarse grained synchronization
●   Based on existing ideas and algorithms
●   Primary internal name service
●   Reliable but low-volume storage




                                             29
Advanced Topics in
       Distributed Systems

   The Chubby lock service for loosely-
       coupled distributed systems
             Mike Burrows, Google Inc.




Presented by: Ιωάννα Τσαλουχίδου
                                          30

More Related Content

PDF
Multi-tenancy in the cloud
PPTX
NetApp & Storage fundamentals
PPTX
Basics of storage Technology
PPTX
VXLAN Integration with CloudStack Advanced Zone
PPTX
Storage Virtualization
PDF
WebRTC Real time media P2P, Server, Infrastructure, and Platform
PDF
AWS Direct Connect 및 VPN을 이용한 클라우드 아키텍쳐 설계:: Steve Seymour :: AWS Summit Seou...
PPT
Introduction to storage
Multi-tenancy in the cloud
NetApp & Storage fundamentals
Basics of storage Technology
VXLAN Integration with CloudStack Advanced Zone
Storage Virtualization
WebRTC Real time media P2P, Server, Infrastructure, and Platform
AWS Direct Connect 및 VPN을 이용한 클라우드 아키텍쳐 설계:: Steve Seymour :: AWS Summit Seou...
Introduction to storage

What's hot (20)

PPTX
Understanding das-nas-san
PDF
The Google Chubby lock service for loosely-coupled distributed systems
PPTX
Virtualization Vs. Containers
PPTX
Introduction to CloudStack: How to Deploy and Manage Infrastructure-as-a-Serv...
PPTX
virtualization-vs-containerization-paas
PPTX
Introduction to Redis
PDF
VMware - Virtual SAN - IT Changes Everything
PPTX
Storage basics
PPTX
Microsoft Active Directory.pptx
PPTX
Aws Solution Architecture Associate - summary
PPTX
Principles of virtualization
PPTX
Storage Area Networks, Networks, Networking, Computer Networks
PPTX
redis basics
PDF
Data Engineer's Lunch #83: Strategies for Migration to Apache Iceberg
PPTX
Building a Stretched Cluster using Virtual SAN 6.1
PPTX
HBase Vs Cassandra Vs MongoDB - Choosing the right NoSQL database
PPT
CDW: SAN vs. NAS
PPTX
Cloud Computing Environment using Cluster as a service
PPTX
Datacenter overview
Understanding das-nas-san
The Google Chubby lock service for loosely-coupled distributed systems
Virtualization Vs. Containers
Introduction to CloudStack: How to Deploy and Manage Infrastructure-as-a-Serv...
virtualization-vs-containerization-paas
Introduction to Redis
VMware - Virtual SAN - IT Changes Everything
Storage basics
Microsoft Active Directory.pptx
Aws Solution Architecture Associate - summary
Principles of virtualization
Storage Area Networks, Networks, Networking, Computer Networks
redis basics
Data Engineer's Lunch #83: Strategies for Migration to Apache Iceberg
Building a Stretched Cluster using Virtual SAN 6.1
HBase Vs Cassandra Vs MongoDB - Choosing the right NoSQL database
CDW: SAN vs. NAS
Cloud Computing Environment using Cluster as a service
Datacenter overview
Ad

Similar to The Chubby lock service for loosely- coupled distributed systems (20)

PDF
Bigtable and Dynamo
ODP
Concurrent Programming with Ruby and Tuple Spaces
PPTX
Hadoop Meetup Jan 2019 - Overview of Ozone
PDF
Memory
PDF
06threadsimp
PDF
RubyWorld 2011
PPTX
PDF
Ruby on Rails (RoR) as a back-end processor for Apex
PDF
Paravirtualized File Systems
PDF
"JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ e...
PDF
Kafka on ZFS: Better Living Through Filesystems
PDF
You got ur Erlang in my Ruby
PDF
Sly and the RoarVM: Exploring the Manycore Future of Programming
PDF
LXC Containers and AUFs
PDF
OSDC 2016 - Interesting things you can do with ZFS by Allan Jude&Benedict Reu...
PPT
4.Hardware concepts, Software Concept & Middleware.ppt
PDF
Lightweight Virtualization: LXC containers & AUFS
PPT
PDF
Netflix Open Source Meetup Season 4 Episode 2
PDF
Building a Messaging Solutions for OVHcloud with Apache Pulsar_Pierre Zemb
Bigtable and Dynamo
Concurrent Programming with Ruby and Tuple Spaces
Hadoop Meetup Jan 2019 - Overview of Ozone
Memory
06threadsimp
RubyWorld 2011
Ruby on Rails (RoR) as a back-end processor for Apex
Paravirtualized File Systems
"JBoss clustering solutions Mission Critical Enterprise" by Mircea Markus @ e...
Kafka on ZFS: Better Living Through Filesystems
You got ur Erlang in my Ruby
Sly and the RoarVM: Exploring the Manycore Future of Programming
LXC Containers and AUFs
OSDC 2016 - Interesting things you can do with ZFS by Allan Jude&Benedict Reu...
4.Hardware concepts, Software Concept & Middleware.ppt
Lightweight Virtualization: LXC containers & AUFS
Netflix Open Source Meetup Season 4 Episode 2
Building a Messaging Solutions for OVHcloud with Apache Pulsar_Pierre Zemb
Ad

More from Ioanna Tsalouchidou (8)

PDF
Scalable Dynamic Graph Summarization
PDF
A Distributed Self-management Service
PDF
Observation, Experiment, Conclusion: the Three Princes of Serendip_essay_Phil...
PDF
7.howcompanieslearnyoursecrets 120318193259-phpapp01
PDF
Simulation vs experimental-testbeds_ioanna_tsalouchidou
PDF
Intelligent placement of_datacenters_for_internet_services_ioanna_tsalouchidou
PDF
Cap in depth
PDF
Rest vs soap
Scalable Dynamic Graph Summarization
A Distributed Self-management Service
Observation, Experiment, Conclusion: the Three Princes of Serendip_essay_Phil...
7.howcompanieslearnyoursecrets 120318193259-phpapp01
Simulation vs experimental-testbeds_ioanna_tsalouchidou
Intelligent placement of_datacenters_for_internet_services_ioanna_tsalouchidou
Cap in depth
Rest vs soap

The Chubby lock service for loosely- coupled distributed systems

  • 1. Advanced Topics in Distributed Systems The Chubby lock service for loosely- coupled distributed systems Mike Burrows, Google Inc. Presented by: Ioanna Tsalouchidou 1
  • 2. Outline ● Introduction ● Design ● Scaling ● Usage ● Summary 2
  • 3. Introduction ● What is Chubby? – An engineering effort by Google – Coarse-grained lock service – Loosely-coupled distributed systems – Large number of small machines – High-speed network (1Gbit/s Ethernet) – Availability and Reliability Vs. Performance 3
  • 4. Outline ● Introduction - Motivation ● Design ● Scaling ● Usage ● Summary 4
  • 5. Design le iona Rat ks Se Loc qu en Sy st em ce str rs uc tur rs e handle File Fa Backup es il-o pAliv ve Kee rs Dir Mirroring ec tor Events ies ns Sessio Ca se ch a Ba API ing Dat 5
  • 6. Rationale ● Lock service library Vs. Paxos client library – Maintain existing program structure – Advertising the results – Familiar interface to programmers – Reduces the # of servers needed for progress ● Design decision – Small-files service (for primaries) – Event notification – Consistent caching 6
  • 7. Rationale ● Coarse-grained locks – Less load in the lock server – Less delay caused by lock server unavailability – Survive lock server failures – Many clients served by less servers ● Fine-grained locks – Lock-server unavailability → many clients stall 7
  • 8. System Structure ● One Chubby cell → five servers ● Client ↔ Server: via client library ● Server and library communicate via RPC 8 ● Optional: proxy server
  • 9. Chubby Cell ● Set of five servers (replicas) :-) ● Distributed consensus protocol ● One master among replicas ● Master lease → periodically renewed 9
  • 10. Chubby Client ● Clients find the master between replicas ● Client requests to master ● Write requests via consensus protocol among replicas ● Read requests handled by master App Library 10
  • 11. Files, directories and handles ● Interface: similar to UNIX file system /ls/foo/wombat/pouch 11
  • 12. Files, directories and handles ● Interface: similar to UNIX file system /ls/foo/wombat/pouch Stands for lock service. Common to all Chubby names 12
  • 13. Files, directories and handles ● Interface: similar to UNIX file system /ls/foo/wombat/pouch Stands for lock service. Common to all Chubby names The name of a Chubby cell, which is resolved to one or more servers through a DNS lookup 13
  • 14. Files, directories and handles ● Interface: similar to UNIX file system /ls/foo/wombat/pouch Stands for lock service. Common to all Chubby names The name of a Chubby cell, which is resolved to one or more servers through a DNS lookup The name of the directory and the file 14
  • 15. Files, directories and handles ● Interface: similar to UNIX file system /ls/foo/wombat/pouch ● Name space: files and directories called nodes – Ephemeral – Permanent ● Clients open nodes to obtain Handles – ~ UNIX file descriptors – Subscription to events 15
  • 16. Locks ● Any node can act as a lock ● Advisory locks (no mandatory locks) ● Client handles hold – Exclusive locks (write) – Shared locks (read) ● No write permission → no influence to writers 16
  • 17. Sequencers ● Sequence numbers to interactions that use locks ● Lock holder requests a sequencer ● Opaque bite-string → state of lock – Name of lock – Mode which was acquired – Lock generation number 17
  • 18. Caching ● To reduce read traffic – File data – Meta-data – File absence – Consistent, write-through cache 18
  • 23. Outline ● Introduction - Motivation ● Design ● Scaling ● Usage ● Summary 24
  • 24. Current scaling techniques ● Reduce communication with the master – Client caching – Open handles ● Use a nearby cell (found with DNS) ● Increase lease time (12s → 60s) ● Protocol-conversion servers – Translate Chubby to less-complex 25
  • 25. Future scaling techniques ● Proxies – Handling KeepAlive requests – Read requests ● Partitioning – Enable large Chubby cells – Little communication between partitions 26
  • 26. Outline ● Introduction ● Design ● Scaling ● Usage ● Summary 27
  • 27. Usage ● Initially as a lock service ● Most popular use as a name service ● GFS: to appoint a master server ● Bigtable – Master election – Master discovers its controlling servers – Clients to find their master 28
  • 28. Summary ● Distributed lock service – Coarse grained synchronization ● Based on existing ideas and algorithms ● Primary internal name service ● Reliable but low-volume storage 29
  • 29. Advanced Topics in Distributed Systems The Chubby lock service for loosely- coupled distributed systems Mike Burrows, Google Inc. Presented by: Ιωάννα Τσαλουχίδου 30