Is ZooKeeper mandatory for Cloud

  •        0
  

Cloud is nothing but more than one system or application distributed across the network, across the globe. It may have couple of application servers, database server, shared data storage, backup server and lot more. The resources in the distributed environment must have information about each other so that they could co-ordinate and share without any issues. ZooKeeper helps to do that.

ZooKeeper is basically a coordinating service. It has information about all the resources. The name space provided by ZooKeeper is much like that of a standard file system. A name is a sequence of path elements separated by a slash (/). A watcher could be created on any node and whenever any changes happens to the node its subscribers are notified. It has support for barriers and distributed queue. ACL could be applied to each node to control its access.

Download and unpack ZooKeeper. Create a config file named zoo.cfg under conf folder with below contents and start the ZooKeeper server. tickTime=2000 initLimit=10 syncLimit=5 dataDir=zoodata clientPort=2181
To start the server, type the below command in command prompt.
CMD> cd
CMD> bin\zkServer
ZooKeeper server could be accessed using its API. It has CLI support, which is capable of executing some basic commands. In this article we will access the server using CLI. To start the CLI, type the below command in command prompt.
CMD> cd
CMD> bin\zkCli -server 127.0.0.1:2181
Consider in a cloud there are three database servers and one shared data storage. More than one application is running in the cloud and they need to know which database to connect. Type the below commands and add the database nodes using CLI.
CMD> create /dbserver Database server
CMD> create /dbserver/dbserver1 192.168.144.100
CMD> create /dbserver/dbserver2 192.168.144.101
CMD> create /dbserver/dbserver3 192.168.144.102
Now the application wants to access the database IP address. It may do using API but i will explain using CLI as it will be easy to understand. Type the below commands in CLI.
CMD> ls /dbserver
[dbserver1, dbserver2, dbserver3]

CMD> get /dbserver/dbserver1
192.168.144.100
If server is failed to get access the application will try to connect to server2. This is just an example.

Applications and Resources in the cloud need to access the ZooKeeper to get the information at runtime. An existing database is moved to different IP then this change has to be reflected in all applications in the cloud. If all of them maintain their own settings (XML store) of the resources then it would difficult to change. With ZooKeeper it will be easier as application picks it as and when need. If any application created a watcher on the database node then it will be notified the changes so that it could handle it in better way.


   

comments powered by Disqus


Related Articles

Whats new in Lucene / Solr 4.0

  • lucene solr new-release

The release 4.0 is one of the important milestone for Lucene and Solr. It has lot of new features and performance important. Few important ones are highliggted in this article.

Read More


Solr vs Elastic Search

  • full-text-search search-engine lucene solr elastic-search

Solr and Elastic Search are built on top of Lucene. Both are open source and both have extra features which makes programmer life easy. This article explains the difference and the best situation to choose between them.

Read More


8 Best Open Source Searchengines built on top of Lucene

  • lucene solr searchengine elasticsearch

Lucene is most powerful and widely used Search engine. Here is the list of 7 search engines which is built on top of Lucene. You could imagine how powerful they are.

Read More


Scale up vs Scale out. First decision to make before moving to cloud

  • cloud scale-up scale-out scalability

Before moving to cloud, First decision to make is whether Scale up the hardware or Scale out with multiple systems. Both has its pros and cons.

Read More


10 Free services for your Website / Blog. Just plug it.

  • free website blog free-service free-resources

Each website / blog delivers useful content or service to its users. But website themselves requires some service to monitor and increase its presence. Here are few free services which could be used by Website / Blog. This will be very much helpful for small business owners.

Read More


LucidWorks Vs SearchBlox - Enterprise Search Solution

  • lucene solr searchblox lucidworks enterprise-search

Enterprise search software should be capable to search the data available in the entire organization or personnel desktop. The data could be in File system, Web or in Database. It should search contents of Emails, file formats like doc, xls, ppt, pdf and lot more. There are many commercial products available but LucidWorks and SearchBlox are best and free.

Read More


Git vs Subversion

  • version-control subversion git

Git and Subversion are most popular and widely used version control system. What is the best situation to choose them? It is important to know its pros and cons, evaluate your requirement and choose the right one.

Read More


10 sites to get the large data set or data corpus for free

  • search test-data large-data-set data-corpus dataset

You may require GBs of data to do performance or load testing. How your app behaves when there is loads of data. You need to know the capacity of your application. This is the frequently asked question from the sales team "The customer is having 100GB of data and he wants to know whether our product will handle this? If so how much RAM / Disk storage required?". This article has pointers to the large data corpus.

Read More


Lucene Vs Solr

  • searchengine lucene solr

Lucene is a search library built in Java. Solr is a web application built on top of Lucene. Certainly Solr = Lucene + Added features. Often there would a question, when to choose Solr and when to choose Lucene.

Read More


Open source is the backbone for Startups

  • opensource open-source startups

Many startups are entering in to the business due to open source. Open source acts as a back bone / pillar for their business. It reduces the cost of production, Generates revenue from consulting and support. This article describes about the startups which flourished because of open source. Sun acquired MySQL for $1Bn is the biggest achievement for open source startups.

Read More