

{"id":20542,"date":"2018-07-20T03:53:25","date_gmt":"2018-07-20T03:53:25","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=20542"},"modified":"2021-05-19T18:24:09","modified_gmt":"2021-05-19T12:54:09","slug":"zookeeper-terminologies","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/zookeeper-terminologies\/","title":{"rendered":"9 Zookeeper Terminologies: Basics of Zookeeper"},"content":{"rendered":"<p><span style=\"font-weight: 400\">As we have already seen the <strong>introduction of Apache Zookeeper<\/strong>. So, before going more deeper into the working of ZooKeeper, we must know some terminologies in ZooKeeper. <\/span><\/p>\n<p><span style=\"font-weight: 400\">Today, in this Zookeeper article, we will learn the fundamental concepts or ZooKeeper Terminologies, in brief, to further understand it\u2019s working well.<\/span><\/p>\n<p>So, let&#8217;s start Apache ZooKeeper Terminologies.<\/p>\n<h2><span style=\"font-weight: 400\">Zookeeper Terminologies<\/span><\/h2>\n<p>Below, we are discussing various terminologies in Apache ZooKeeper:<\/p>\n<h3>a. Sessions<\/h3>\n<p><span style=\"font-weight: 400\">In ZOOKEEPER operations, Sessions are very important. Basically in a session requests executes in FIFO order. \u00a0However, the session will be established and a session id is assigned to the client, as soon as the client connects to a server.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Moreover, to keep the session valid, the client sends heartbeats at a particular time interval. There is a case that in which ZooKeeper ensemble decides that the client died when it does not receive heartbeats from a client for more than the period, session timeout which is specified at the starting of the service.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Although, usually Session timeouts are represented in milliseconds. Also, the ephemeral znodes created during that session also get deleted, when a session ends for any reason.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">b. Watches<\/span><\/h3>\n<p><span style=\"font-weight: 400\">Watches are a simple mechanism, for the client to get notifications about the changes in the ZooKeeper ensemble. While reading a particular znode, clients can set watches. Moreover, for any of the znode (on which client registers) changes, watches send a notification to the registered client.<\/span><\/p>\n<p><span style=\"font-weight: 400\">With the znode or changes in the Znode\u2019s children, Znode changes are a modification of data associated. However, \u00a0only once, watches are triggered. It must be done through another read operation if a client wants a notification again. <\/span><\/p>\n<p><span style=\"font-weight: 400\">The client will be disconnected from the server and the associated watches are also removed when a connection session is expired.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">c. ZNodes<\/span><\/h3>\n<p><span style=\"font-weight: 400\">In a ZooKeeper tree, every node is a znode. Basically, it maintains a stat structure. Stat Structure is a structure which contains version numbers for data changes, ACL changes and many more. So, Znodes maintains these changes. The stat structure also has timestamps. <\/span><\/p>\n<p><span style=\"font-weight: 400\">The version number, together with the timestamp allow ZooKeeper to validate the cache and to coordinate updates. The version number increases, e<\/span><span style=\"font-weight: 400\">ach time a znode&#8217;s data changes. <\/span><\/p>\n<p><span style=\"font-weight: 400\">As an example, the client receives the version of the data, whenever a client retrieves data.\u00a0Though, it must supply the version of the data of the Znode it is changing, when a client performs an update or a delete. Hence,\u00a0the update will fail, if the version it supplies doesn&#8217;t match the actual version of the data.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">d. Name Service<\/span><\/h3>\n<p><span style=\"font-weight: 400\">A service that maps a name to some information associated with that name, is what we call\u00a0a name service. In addition, we can also extend a name service to a group membership service.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Because by that\u00a0it is possible to obtain information pertaining to the group where that entity is, whose name is we are searching.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">e. Locking<\/span><\/h3>\n<p><span style=\"font-weight: 400\">We may need to implement distributed mutexes, to allow for serialized access to a shared resource in our distributed system. Hence, by ZooKeeper,\u00a0we can implement them easily.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">f. Synchronization<\/span><\/h3>\n<p><span style=\"font-weight: 400\">Basically, for synchronizing access to shared resources we need Hand in hand with distributed mutexes. However, ZooKeeper provides for a simple interface to implement, whether implementing a producer-consumer queue or a barrier. <\/span><\/p>\n<h3><span style=\"font-weight: 400\">g. Configuration management<\/span><\/h3>\n<p><span style=\"font-weight: 400\">In order to store and manage the configuration of our distributed system centrally, we can use ZooKeeper.\u00a0<\/span><\/p>\n<h3><span style=\"font-weight: 400\">h. Leader Election<\/span><\/h3>\n<p><span style=\"font-weight: 400\">It is possible that\u00a0the distributed system may have to deal with the problem of nodes going down. Also, we may want to implement an automatic fail-over strategy. For these type of issues, ZooKeeper offers off-the-shelf support\u00a0by leader election.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">i. ZooKeeper Access Control Using ACLs<\/span><\/h3>\n<p><span style=\"font-weight: 400\">In order to control access to its Znodes (the data nodes of a ZooKeeper data tree), ZooKeeper uses ACLs.\u00a0<\/span><br \/>\nSo, this was all in ZooKeeper Terminologies. Hope you like our explanation.<\/p>\n<h2><span style=\"font-weight: 400\">Conclusion: Zookeeper Terminologies<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Hence, we have covered some important ZooKeeper terminologies to understand Zookeeper well. Still, if any doubt regarding, terminologies in ZooKeeper, ask in the comment tab.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As we have already seen the introduction of Apache Zookeeper. So, before going more deeper into the working of ZooKeeper, we must know some terminologies in ZooKeeper. Today, in this Zookeeper article, we will&#46;&#46;&#46;<\/p>\n","protected":false},"author":7,"featured_media":20621,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[77],"tags":[2871,8124,8370,8998,12763,14024,14621,15422,16356,16420],"class_list":["post-20542","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-zookeeper","tag-configuration-management","tag-leader-election","tag-locking","tag-name-service","tag-sessions","tag-synchronization","tag-terminologies-in-zookeeper","tag-watches","tag-znodes","tag-zookeeper-terminologies"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>9 Zookeeper Terminologies: Basics of Zookeeper - DataFlair<\/title>\n<meta name=\"description\" content=\"ZooKeeper Terminologies,terms in Apache ZooKeeper,basics of ZooKeeper,ZooKeeper tutorial,Sessions,ZNodes,Name Service,Configuration management\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/zookeeper-terminologies\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"9 Zookeeper Terminologies: Basics of Zookeeper - DataFlair\" \/>\n<meta property=\"og:description\" content=\"ZooKeeper Terminologies,terms in Apache ZooKeeper,basics of ZooKeeper,ZooKeeper tutorial,Sessions,ZNodes,Name Service,Configuration management\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/zookeeper-terminologies\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-20T03:53:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-19T12:54:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Zookeeper-Terminologies-01.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"9 Zookeeper Terminologies: Basics of Zookeeper - DataFlair","description":"ZooKeeper Terminologies,terms in Apache ZooKeeper,basics of ZooKeeper,ZooKeeper tutorial,Sessions,ZNodes,Name Service,Configuration management","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/zookeeper-terminologies\/","og_locale":"en_US","og_type":"article","og_title":"9 Zookeeper Terminologies: Basics of Zookeeper - DataFlair","og_description":"ZooKeeper Terminologies,terms in Apache ZooKeeper,basics of ZooKeeper,ZooKeeper tutorial,Sessions,ZNodes,Name Service,Configuration management","og_url":"https:\/\/data-flair.training\/blogs\/zookeeper-terminologies\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-07-20T03:53:25+00:00","article_modified_time":"2021-05-19T12:54:09+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Zookeeper-Terminologies-01.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/zookeeper-terminologies\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/zookeeper-terminologies\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/beb0cab24b7aa54423a3b50e669a9dcd"},"headline":"9 Zookeeper Terminologies: Basics of Zookeeper","datePublished":"2018-07-20T03:53:25+00:00","dateModified":"2021-05-19T12:54:09+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/zookeeper-terminologies\/"},"wordCount":688,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/zookeeper-terminologies\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Zookeeper-Terminologies-01.jpg","keywords":["Configuration management","Leader election","Locking","Name Service","Sessions","Synchronization","Terminologies in ZooKeeper","Watches","ZNodes","ZooKeeper Terminologies"],"articleSection":["Zookeeper Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/zookeeper-terminologies\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/zookeeper-terminologies\/","url":"https:\/\/data-flair.training\/blogs\/zookeeper-terminologies\/","name":"9 Zookeeper Terminologies: Basics of Zookeeper - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/zookeeper-terminologies\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/zookeeper-terminologies\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Zookeeper-Terminologies-01.jpg","datePublished":"2018-07-20T03:53:25+00:00","dateModified":"2021-05-19T12:54:09+00:00","description":"ZooKeeper Terminologies,terms in Apache ZooKeeper,basics of ZooKeeper,ZooKeeper tutorial,Sessions,ZNodes,Name Service,Configuration management","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/zookeeper-terminologies\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/zookeeper-terminologies\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/zookeeper-terminologies\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Zookeeper-Terminologies-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Zookeeper-Terminologies-01.jpg","width":1200,"height":628,"caption":"9 Zookeeper Terminologies: Basics of Zookeeper"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/zookeeper-terminologies\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Zookeeper Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/zookeeper\/"},{"@type":"ListItem","position":3,"name":"9 Zookeeper Terminologies: Basics of Zookeeper"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/beb0cab24b7aa54423a3b50e669a9dcd","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team specializes in creating clear, actionable content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Backed by industry expertise, we make learning easy and career-oriented for beginners and pros alike.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam3\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/20542","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=20542"}],"version-history":[{"count":6,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/20542\/revisions"}],"predecessor-version":[{"id":94234,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/20542\/revisions\/94234"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/20621"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=20542"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=20542"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=20542"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}