SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
ZOOKEEPER IN MY WORDS
                              fujohnwang@Pluto
                                  2011.01.11




Wednesday, January 12, 2011
WHAT’S ZK?

                  “ZooKeeper is a centralized service for maintaining configuration
             information, naming, providing distributed synchronization, and providing
             group services. All of these kinds of services are used in some form or another
             by distributed applications. Each time they are implemented there is a lot of
             work that goes into fixing the bugs and race conditions that are inevitable.
             Because of the difficulty of implementing these kinds of services, applications
             initially usually skimp on them ,which make them brittle in the presence of
             change and difficult to manage. Even when done correctly, different
             implementations of these services lead to management complexity when the
             applications are deployed.”




Wednesday, January 12, 2011
WHAT THE FUCK
              DOES THAT MEAN?
                 Simply Put: Coordination Service For Distributed
                 Systems




Wednesday, January 12, 2011
WHAT ZK CAN DO?


                 Name Service

                 Configuration

                 Group Membership

                 Distributed Synchronization



Wednesday, January 12, 2011
WHAT ZK LOOKS LIKE?

                              File System Model
                              Hierarchical Namespace




                                                       each node can have both data and children


Wednesday, January 12, 2011
HOW ZK WORKS?




Wednesday, January 12, 2011
HOW ZK WORKS?




                                Zab


Wednesday, January 12, 2011
HOW TO DEPLOY ZK?

               single server            quorum cluster
                                               majority algorithm(2n + 1)




Wednesday, January 12, 2011
ZK DEPLOYMENT IN DETAILS


                 configuration

                      data location

                      transaction log location (optional but necessary)

                      cluster members

                      myid file (under data location directory)


Wednesday, January 12, 2011
CONFIGURATION FILE
                                   SAMPLE
                          # The number of milliseconds of each tick
                          tickTime=2000
                          # The number of ticks that the initial
                          # synchronization phase can take
                          initLimit=10
                          # The number of ticks that can pass between
                          # sending a request and getting an acknowledgement
                          syncLimit=5
                          # the directory where the snapshot is stored.
                          dataDir=/Users/fujohnwang/Downloads/zookeeper-3.3.2/data
                          # the port at which the clients will connect
                          clientPort=2181

                          server.1=10.16.200.14:2888:3888
                          server.2=10.20.135.206:2888:3888
                          server.3=10.20.130.233:2888:3888




Wednesday, January 12, 2011
HOW TO INTERACTIVE WITH
                       ZK?


                 Command Line Tool

                 Zookeeper API Bindings

                      Java Bindings

                      C Bindings



Wednesday, January 12, 2011
ZOOKEEPER CLI

                 bin/zkCli.sh -server 127.0.0.1:2181
                 [zk: 10.20.130.233:2181(CONNECTED) 0] help
                 ZooKeeper -server host:port cmd args
                 	

    printwatches on|off
                 	

    ls2 path [watch]
                 	

    listquota path
                 	

    close
                 	

    get path [watch]
                 	

    sync path
                 	

    delete path [version]
                 	

    quit
                 	

    addauth scheme auth
                 	

    getAcl path
                 	

    setAcl path acl
                 	

    setquota -n|-b val path
                 	

    redo cmdno
                 	

    create [-s] [-e] path data acl
                 	

    set path data [version]
                 	

    stat path [watch]
                 	

    connect host:port
                 	

    ls path [watch]
                 	

    history
                 	

    delquota [-n|-b] path

Wednesday, January 12, 2011
ZK API = SIMPLE API
                      create

                      delete

                      exists

                      set data

                      get data

                      get children

                      sync
Wednesday, January 12, 2011
WHAT THE FEATURES OF ZK?
                 Notification

                 Ordering

                 Atomicity

                 Versioned Write

                 Ephemeral Nodes

                 Sequential Nodes

                 High Availability
Wednesday, January 12, 2011
WATCH - NOTIFICATION



                 Concept

                 Usecase

                      dynamic configuration push

                      other (semi)real-time information notification


Wednesday, January 12, 2011
EPHEMERAL NODES

                 Concept

                      lifecycle-dependent

                      no children

                 Usecase

                      group membership

                      leader election

Wednesday, January 12, 2011
SEQUENTIAL NODES



                 Concept

                 Usecase

                      queue




Wednesday, January 12, 2011
GUARANTEES OF ZK

                 Sequential Consistency - Updates from a client will be applied in the order that they
                 were sent.


                 Atomicity - Updates either succeed or fail. No partial results.

                 Single System Image - A client will see the same view of the service regardless of the
                 server that it connects to.


                 Reliability - Once an update has been applied, it will persist from that time forward until a client
                 overwrites the update.


                 Timeliness - The clients view of the system is guaranteed to be up-to-date within a certain time
                 bound.




Wednesday, January 12, 2011
CAUTIONS TO TAKE


                 prefer small data size for each node(less than 1M)

                 one time trigger (add again and again if u need)

                 dataset in all must fit in memory




Wednesday, January 12, 2011
QUESTIONS?




                                       nicholsong




Wednesday, January 12, 2011

Mais conteúdo relacionado

Mais procurados

Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLabIntroduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLabCloudxLab
 
Zookeeper Architecture
Zookeeper ArchitectureZookeeper Architecture
Zookeeper ArchitecturePrasad Wali
 
Puppet for Developers
Puppet for DevelopersPuppet for Developers
Puppet for Developerssagarhere4u
 
OpenStack DevStack Tutorial
OpenStack DevStack TutorialOpenStack DevStack Tutorial
OpenStack DevStack TutorialSaju Madhavan
 
Apache ZooKeeper TechTuesday
Apache ZooKeeper TechTuesdayApache ZooKeeper TechTuesday
Apache ZooKeeper TechTuesdayAndrei Savu
 
Pitfalls of Continuous Deployment
Pitfalls of Continuous DeploymentPitfalls of Continuous Deployment
Pitfalls of Continuous Deploymentzeeg
 
OpenStack Development Using devstack
OpenStack Development Using devstackOpenStack Development Using devstack
OpenStack Development Using devstackmestery
 
Geneva JUG - Cassandra for Java Developers
Geneva JUG - Cassandra for Java DevelopersGeneva JUG - Cassandra for Java Developers
Geneva JUG - Cassandra for Java DevelopersMichaël Figuière
 
Cassandra summit 2013 - DataStax Java Driver Unleashed!
Cassandra summit 2013 - DataStax Java Driver Unleashed!Cassandra summit 2013 - DataStax Java Driver Unleashed!
Cassandra summit 2013 - DataStax Java Driver Unleashed!Michaël Figuière
 
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lotThinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lotMark Broadbent
 
Docker Security
Docker SecurityDocker Security
Docker SecurityBladE0341
 
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxConAnatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxConJérôme Petazzoni
 
Full system roll-back and systemd in SUSE Linux Enterprise 12
Full system roll-back and systemd in SUSE Linux Enterprise 12Full system roll-back and systemd in SUSE Linux Enterprise 12
Full system roll-back and systemd in SUSE Linux Enterprise 12Gábor Nyers
 
How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...
How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...
How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...Docker, Inc.
 
Coscup SDN workshop - mininet
Coscup SDN workshop - mininetCoscup SDN workshop - mininet
Coscup SDN workshop - mininetHungWei Chiu
 

Mais procurados (20)

Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLabIntroduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
 
Zookeeper Architecture
Zookeeper ArchitectureZookeeper Architecture
Zookeeper Architecture
 
Puppet for Developers
Puppet for DevelopersPuppet for Developers
Puppet for Developers
 
OpenStack DevStack Tutorial
OpenStack DevStack TutorialOpenStack DevStack Tutorial
OpenStack DevStack Tutorial
 
java
javajava
java
 
Apache ZooKeeper TechTuesday
Apache ZooKeeper TechTuesdayApache ZooKeeper TechTuesday
Apache ZooKeeper TechTuesday
 
Pitfalls of Continuous Deployment
Pitfalls of Continuous DeploymentPitfalls of Continuous Deployment
Pitfalls of Continuous Deployment
 
OpenStack Development Using devstack
OpenStack Development Using devstackOpenStack Development Using devstack
OpenStack Development Using devstack
 
Geneva JUG - Cassandra for Java Developers
Geneva JUG - Cassandra for Java DevelopersGeneva JUG - Cassandra for Java Developers
Geneva JUG - Cassandra for Java Developers
 
Cassandra summit 2013 - DataStax Java Driver Unleashed!
Cassandra summit 2013 - DataStax Java Driver Unleashed!Cassandra summit 2013 - DataStax Java Driver Unleashed!
Cassandra summit 2013 - DataStax Java Driver Unleashed!
 
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lotThinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
 
ChtiJUG - Cassandra 2.0
ChtiJUG - Cassandra 2.0ChtiJUG - Cassandra 2.0
ChtiJUG - Cassandra 2.0
 
Docker Security
Docker SecurityDocker Security
Docker Security
 
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxConAnatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
 
Zookeeper
ZookeeperZookeeper
Zookeeper
 
DevStack
DevStackDevStack
DevStack
 
Build Automation 101
Build Automation 101Build Automation 101
Build Automation 101
 
Full system roll-back and systemd in SUSE Linux Enterprise 12
Full system roll-back and systemd in SUSE Linux Enterprise 12Full system roll-back and systemd in SUSE Linux Enterprise 12
Full system roll-back and systemd in SUSE Linux Enterprise 12
 
How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...
How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...
How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...
 
Coscup SDN workshop - mininet
Coscup SDN workshop - mininetCoscup SDN workshop - mininet
Coscup SDN workshop - mininet
 

Destaque

Apache Zookeeper Explained: Tutorial, Use Cases and Zookeeper Java API Examples
Apache Zookeeper Explained: Tutorial, Use Cases and Zookeeper Java API ExamplesApache Zookeeper Explained: Tutorial, Use Cases and Zookeeper Java API Examples
Apache Zookeeper Explained: Tutorial, Use Cases and Zookeeper Java API ExamplesBinu George
 
Distributed Applications with Apache Zookeeper
Distributed Applications with Apache ZookeeperDistributed Applications with Apache Zookeeper
Distributed Applications with Apache ZookeeperAlex Ehrnschwender
 
Zoo keeper in the wild
Zoo keeper in the wildZoo keeper in the wild
Zoo keeper in the wilddatamantra
 
Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012mumrah
 
Scala funbyexample
Scala funbyexampleScala funbyexample
Scala funbyexampleFuqiang Wang
 
Gold investment types introduction
Gold investment types introductionGold investment types introduction
Gold investment types introductionFuqiang Wang
 
Proof and Emacs
Proof and EmacsProof and Emacs
Proof and Emacsdico_leque
 
挖财的互联网金融技术实践与探索@upyun opentalk
挖财的互联网金融技术实践与探索@upyun opentalk挖财的互联网金融技术实践与探索@upyun opentalk
挖财的互联网金融技术实践与探索@upyun opentalkFuqiang Wang
 
モナドをつくろう
モナドをつくろうモナドをつくろう
モナドをつくろうdico_leque
 
Continuations in scala (incomplete version)
Continuations in scala (incomplete version)Continuations in scala (incomplete version)
Continuations in scala (incomplete version)Fuqiang Wang
 
Architecture patterns and practices
Architecture patterns and practicesArchitecture patterns and practices
Architecture patterns and practicesFuqiang Wang
 
Scala the-good-parts
Scala the-good-partsScala the-good-parts
Scala the-good-partsFuqiang Wang
 
Introduction to Apache ZooKeeper
Introduction to Apache ZooKeeperIntroduction to Apache ZooKeeper
Introduction to Apache ZooKeeperknowbigdata
 
More Than Java Concurrency
More Than Java ConcurrencyMore Than Java Concurrency
More Than Java ConcurrencyFuqiang Wang
 
Apache Zookeeper 分布式服务框架
Apache Zookeeper 分布式服务框架Apache Zookeeper 分布式服务框架
Apache Zookeeper 分布式服务框架Cabin WJ
 
使用ZooKeeper打造軟體式負載平衡
使用ZooKeeper打造軟體式負載平衡使用ZooKeeper打造軟體式負載平衡
使用ZooKeeper打造軟體式負載平衡Lawrence Huang
 
Introduction to Terracotta
Introduction to TerracottaIntroduction to Terracotta
Introduction to TerracottaCris Holdorph
 

Destaque (20)

Apache Zookeeper Explained: Tutorial, Use Cases and Zookeeper Java API Examples
Apache Zookeeper Explained: Tutorial, Use Cases and Zookeeper Java API ExamplesApache Zookeeper Explained: Tutorial, Use Cases and Zookeeper Java API Examples
Apache Zookeeper Explained: Tutorial, Use Cases and Zookeeper Java API Examples
 
Distributed Applications with Apache Zookeeper
Distributed Applications with Apache ZookeeperDistributed Applications with Apache Zookeeper
Distributed Applications with Apache Zookeeper
 
Zoo keeper in the wild
Zoo keeper in the wildZoo keeper in the wild
Zoo keeper in the wild
 
Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012
 
Scala funbyexample
Scala funbyexampleScala funbyexample
Scala funbyexample
 
Kafka简介
Kafka简介Kafka简介
Kafka简介
 
Gold investment types introduction
Gold investment types introductionGold investment types introduction
Gold investment types introduction
 
Proof and Emacs
Proof and EmacsProof and Emacs
Proof and Emacs
 
挖财的互联网金融技术实践与探索@upyun opentalk
挖财的互联网金融技术实践与探索@upyun opentalk挖财的互联网金融技术实践与探索@upyun opentalk
挖财的互联网金融技术实践与探索@upyun opentalk
 
モナドをつくろう
モナドをつくろうモナドをつくろう
モナドをつくろう
 
Continuations in scala (incomplete version)
Continuations in scala (incomplete version)Continuations in scala (incomplete version)
Continuations in scala (incomplete version)
 
Architecture patterns and practices
Architecture patterns and practicesArchitecture patterns and practices
Architecture patterns and practices
 
SBT Made Simple
SBT Made SimpleSBT Made Simple
SBT Made Simple
 
Scala the-good-parts
Scala the-good-partsScala the-good-parts
Scala the-good-parts
 
Introduction to Apache ZooKeeper
Introduction to Apache ZooKeeperIntroduction to Apache ZooKeeper
Introduction to Apache ZooKeeper
 
More Than Java Concurrency
More Than Java ConcurrencyMore Than Java Concurrency
More Than Java Concurrency
 
Apache Zookeeper 分布式服务框架
Apache Zookeeper 分布式服务框架Apache Zookeeper 分布式服务框架
Apache Zookeeper 分布式服务框架
 
Terracotta Hadoop & In-Memory Webcast
Terracotta Hadoop & In-Memory WebcastTerracotta Hadoop & In-Memory Webcast
Terracotta Hadoop & In-Memory Webcast
 
使用ZooKeeper打造軟體式負載平衡
使用ZooKeeper打造軟體式負載平衡使用ZooKeeper打造軟體式負載平衡
使用ZooKeeper打造軟體式負載平衡
 
Introduction to Terracotta
Introduction to TerracottaIntroduction to Terracotta
Introduction to Terracotta
 

Semelhante a Zookeeper In Simple Words

WTF Is Messaging And Why You Should Use It?
WTF Is Messaging And Why You Should Use It?WTF Is Messaging And Why You Should Use It?
WTF Is Messaging And Why You Should Use It?James Russell
 
An introduction to OSGi
An introduction to OSGi An introduction to OSGi
An introduction to OSGi Andrea Chiodoni
 
WebLogic Diagnostic Framework Dr. Frank Munz / munz & more WLS11g
WebLogic Diagnostic Framework  Dr. Frank Munz / munz & more WLS11gWebLogic Diagnostic Framework  Dr. Frank Munz / munz & more WLS11g
WebLogic Diagnostic Framework Dr. Frank Munz / munz & more WLS11gInSync Conference
 
Java EE Technical Keynote - JavaOne India 2011
Java EE Technical Keynote - JavaOne India 2011Java EE Technical Keynote - JavaOne India 2011
Java EE Technical Keynote - JavaOne India 2011Arun Gupta
 
Experience in Corporate Training in Virtual Worlds
Experience in Corporate Training in Virtual WorldsExperience in Corporate Training in Virtual Worlds
Experience in Corporate Training in Virtual WorldsAgile Dimensions LLC
 
Cloudcamp Athens 2011 Presenting Heroku
Cloudcamp Athens 2011 Presenting HerokuCloudcamp Athens 2011 Presenting Heroku
Cloudcamp Athens 2011 Presenting HerokuSavvas Georgiou
 
Complex Er[jl]ang Processing with StreamBase
Complex Er[jl]ang Processing with StreamBaseComplex Er[jl]ang Processing with StreamBase
Complex Er[jl]ang Processing with StreamBasedarach
 
Oracle GoldenGate - Herve Schweitzer, dbi services - Hilton Basel 5/2011
Oracle GoldenGate - Herve Schweitzer, dbi services - Hilton Basel 5/2011Oracle GoldenGate - Herve Schweitzer, dbi services - Hilton Basel 5/2011
Oracle GoldenGate - Herve Schweitzer, dbi services - Hilton Basel 5/2011dbi services
 
04.egovFrame Runtime Environment Workshop
04.egovFrame Runtime Environment Workshop04.egovFrame Runtime Environment Workshop
04.egovFrame Runtime Environment WorkshopChuong Nguyen
 
Testability for developers – Fighting a mess by making it testable
Testability for developers – Fighting a mess by making it testableTestability for developers – Fighting a mess by making it testable
Testability for developers – Fighting a mess by making it testableAlexander Tarlinder
 
Comparison between rdbms and nosql
Comparison between rdbms and nosqlComparison between rdbms and nosql
Comparison between rdbms and nosqlbharati k
 
Performance tuningtoolkitintroduction
Performance tuningtoolkitintroductionPerformance tuningtoolkitintroduction
Performance tuningtoolkitintroductionRohit Kelapure
 
Membase Meetup - San Diego
Membase Meetup - San DiegoMembase Meetup - San Diego
Membase Meetup - San DiegoMembase
 
Nguyễn Vũ Hưng: Subversion best practices
Nguyễn Vũ Hưng: Subversion best practicesNguyễn Vũ Hưng: Subversion best practices
Nguyễn Vũ Hưng: Subversion best practicesVu Hung Nguyen
 
Always on availability groups way too deep
Always on availability groups way too deepAlways on availability groups way too deep
Always on availability groups way too deepJoseph D'Antoni
 
Solving performance problems in MySQL without denormalization
Solving performance problems in MySQL without denormalizationSolving performance problems in MySQL without denormalization
Solving performance problems in MySQL without denormalizationdmcfarlane
 

Semelhante a Zookeeper In Simple Words (20)

WTF Is Messaging And Why You Should Use It?
WTF Is Messaging And Why You Should Use It?WTF Is Messaging And Why You Should Use It?
WTF Is Messaging And Why You Should Use It?
 
An introduction to OSGi
An introduction to OSGi An introduction to OSGi
An introduction to OSGi
 
WebLogic Diagnostic Framework Dr. Frank Munz / munz & more WLS11g
WebLogic Diagnostic Framework  Dr. Frank Munz / munz & more WLS11gWebLogic Diagnostic Framework  Dr. Frank Munz / munz & more WLS11g
WebLogic Diagnostic Framework Dr. Frank Munz / munz & more WLS11g
 
Java EE Technical Keynote - JavaOne India 2011
Java EE Technical Keynote - JavaOne India 2011Java EE Technical Keynote - JavaOne India 2011
Java EE Technical Keynote - JavaOne India 2011
 
Experience in Corporate Training in Virtual Worlds
Experience in Corporate Training in Virtual WorldsExperience in Corporate Training in Virtual Worlds
Experience in Corporate Training in Virtual Worlds
 
Cloudcamp Athens 2011 Presenting Heroku
Cloudcamp Athens 2011 Presenting HerokuCloudcamp Athens 2011 Presenting Heroku
Cloudcamp Athens 2011 Presenting Heroku
 
Complex Er[jl]ang Processing with StreamBase
Complex Er[jl]ang Processing with StreamBaseComplex Er[jl]ang Processing with StreamBase
Complex Er[jl]ang Processing with StreamBase
 
Oracle GoldenGate - Herve Schweitzer, dbi services - Hilton Basel 5/2011
Oracle GoldenGate - Herve Schweitzer, dbi services - Hilton Basel 5/2011Oracle GoldenGate - Herve Schweitzer, dbi services - Hilton Basel 5/2011
Oracle GoldenGate - Herve Schweitzer, dbi services - Hilton Basel 5/2011
 
04.egovFrame Runtime Environment Workshop
04.egovFrame Runtime Environment Workshop04.egovFrame Runtime Environment Workshop
04.egovFrame Runtime Environment Workshop
 
Testability for developers – Fighting a mess by making it testable
Testability for developers – Fighting a mess by making it testableTestability for developers – Fighting a mess by making it testable
Testability for developers – Fighting a mess by making it testable
 
Comparison between rdbms and nosql
Comparison between rdbms and nosqlComparison between rdbms and nosql
Comparison between rdbms and nosql
 
Performance tuningtoolkitintroduction
Performance tuningtoolkitintroductionPerformance tuningtoolkitintroduction
Performance tuningtoolkitintroduction
 
Dtrace Overview
Dtrace OverviewDtrace Overview
Dtrace Overview
 
Node at artsy
Node at artsyNode at artsy
Node at artsy
 
SQL Azure in deep
SQL Azure in deepSQL Azure in deep
SQL Azure in deep
 
Membase Meetup - San Diego
Membase Meetup - San DiegoMembase Meetup - San Diego
Membase Meetup - San Diego
 
Nguyễn Vũ Hưng: Subversion best practices
Nguyễn Vũ Hưng: Subversion best practicesNguyễn Vũ Hưng: Subversion best practices
Nguyễn Vũ Hưng: Subversion best practices
 
Always on availability groups way too deep
Always on availability groups way too deepAlways on availability groups way too deep
Always on availability groups way too deep
 
Groke
GrokeGroke
Groke
 
Solving performance problems in MySQL without denormalization
Solving performance problems in MySQL without denormalizationSolving performance problems in MySQL without denormalization
Solving performance problems in MySQL without denormalization
 

Último

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Último (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Zookeeper In Simple Words

  • 1. ZOOKEEPER IN MY WORDS fujohnwang@Pluto 2011.01.11 Wednesday, January 12, 2011
  • 2. WHAT’S ZK? “ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications. Each time they are implemented there is a lot of work that goes into fixing the bugs and race conditions that are inevitable. Because of the difficulty of implementing these kinds of services, applications initially usually skimp on them ,which make them brittle in the presence of change and difficult to manage. Even when done correctly, different implementations of these services lead to management complexity when the applications are deployed.” Wednesday, January 12, 2011
  • 3. WHAT THE FUCK DOES THAT MEAN? Simply Put: Coordination Service For Distributed Systems Wednesday, January 12, 2011
  • 4. WHAT ZK CAN DO? Name Service Configuration Group Membership Distributed Synchronization Wednesday, January 12, 2011
  • 5. WHAT ZK LOOKS LIKE? File System Model Hierarchical Namespace each node can have both data and children Wednesday, January 12, 2011
  • 6. HOW ZK WORKS? Wednesday, January 12, 2011
  • 7. HOW ZK WORKS? Zab Wednesday, January 12, 2011
  • 8. HOW TO DEPLOY ZK? single server quorum cluster majority algorithm(2n + 1) Wednesday, January 12, 2011
  • 9. ZK DEPLOYMENT IN DETAILS configuration data location transaction log location (optional but necessary) cluster members myid file (under data location directory) Wednesday, January 12, 2011
  • 10. CONFIGURATION FILE SAMPLE # The number of milliseconds of each tick tickTime=2000 # The number of ticks that the initial # synchronization phase can take initLimit=10 # The number of ticks that can pass between # sending a request and getting an acknowledgement syncLimit=5 # the directory where the snapshot is stored. dataDir=/Users/fujohnwang/Downloads/zookeeper-3.3.2/data # the port at which the clients will connect clientPort=2181 server.1=10.16.200.14:2888:3888 server.2=10.20.135.206:2888:3888 server.3=10.20.130.233:2888:3888 Wednesday, January 12, 2011
  • 11. HOW TO INTERACTIVE WITH ZK? Command Line Tool Zookeeper API Bindings Java Bindings C Bindings Wednesday, January 12, 2011
  • 12. ZOOKEEPER CLI bin/zkCli.sh -server 127.0.0.1:2181 [zk: 10.20.130.233:2181(CONNECTED) 0] help ZooKeeper -server host:port cmd args printwatches on|off ls2 path [watch] listquota path close get path [watch] sync path delete path [version] quit addauth scheme auth getAcl path setAcl path acl setquota -n|-b val path redo cmdno create [-s] [-e] path data acl set path data [version] stat path [watch] connect host:port ls path [watch] history delquota [-n|-b] path Wednesday, January 12, 2011
  • 13. ZK API = SIMPLE API create delete exists set data get data get children sync Wednesday, January 12, 2011
  • 14. WHAT THE FEATURES OF ZK? Notification Ordering Atomicity Versioned Write Ephemeral Nodes Sequential Nodes High Availability Wednesday, January 12, 2011
  • 15. WATCH - NOTIFICATION Concept Usecase dynamic configuration push other (semi)real-time information notification Wednesday, January 12, 2011
  • 16. EPHEMERAL NODES Concept lifecycle-dependent no children Usecase group membership leader election Wednesday, January 12, 2011
  • 17. SEQUENTIAL NODES Concept Usecase queue Wednesday, January 12, 2011
  • 18. GUARANTEES OF ZK Sequential Consistency - Updates from a client will be applied in the order that they were sent. Atomicity - Updates either succeed or fail. No partial results. Single System Image - A client will see the same view of the service regardless of the server that it connects to. Reliability - Once an update has been applied, it will persist from that time forward until a client overwrites the update. Timeliness - The clients view of the system is guaranteed to be up-to-date within a certain time bound. Wednesday, January 12, 2011
  • 19. CAUTIONS TO TAKE prefer small data size for each node(less than 1M) one time trigger (add again and again if u need) dataset in all must fit in memory Wednesday, January 12, 2011
  • 20. QUESTIONS? nicholsong Wednesday, January 12, 2011