GithubHelp home page GithubHelp logo

zookeeper_mini_lab_java's Introduction

Zookeeper_mini_lab_Java

Setup of Cluster :

  1. We created 5 server machines on EC2 and connected them using ssh connection and installed Zookeeper on each one of them. Snapshot of zookeeper extraction and directory creation.Snapshot ODF Installation Steps Snapshot of configuration file. We created zoo.cfg that consist of configuration of all the other servers connected to the the zookeeper and port configuration on which they were listening.Snapshot of the directories created :- Data, Logs, Conf Snaphot of Myid file .Snapshot of Starting the server and checking the status of the node. Snapshot of follower machine in zookeeper.Snapshot of Leader machine in zookeeper.Snapshots of failed server scenario. New Server elected as leader after the leader fails.We stopped the Leader manually to check if zookeeper elect the new leader automatically. So based on algorithm like PAXOS it elects for new leader. Client connected to zookeeper to get configuration details Our understanding of Zookeeper-: Apache ZooKeeper - It is a tool to manage, discover and register different services working on different machines on the distributed enviorment. It is one of the most widely used member in technology stack when we have to deal with distributed system. Its architecture supports HA through services that are redundant. The clients can thus ask another master or elected leader if the first fails to answer. Nodes store their data in a hierarchical name space, much like a tree data structure. Clients can read and write from/to the nodes and in this way have a shared configuration service.PART 2
  2. Data Service: (1) Data service DB1 (MySQL) (2) Data service DB2 (MySQL)(3) Data service DB3 (MySQL) (a) Data service client(b) Data service output (c) Data service output on command line2) Service Discovery and dynamic configuration: (1) Ephemeral creation (2) Ephemeral Appeared and then disappeared (both shown in pic)(a) Read Client (b) Write Client(c) Output Useful Notes: Zookeeper Nodes ec2-54-164-197-186.compute-1.amazonaws.com ec2-54-174-194-67.compute-1.amazonaws.com ec2-54-174-194-81.compute-1.amazonaws.com ec2-54-174-194-48.compute-1.amazonaws.com ec2-54-174-194-76.compute-1.amazonaws.com DB/MySql Nodes 54.174.194.67 DB=test 54.174.194.81 DB=test 54.174.194.48 DB=test Lessons Learnt:  Zookeeper works on the idea of PAXOS algorithm for leader election and load distribution. The consensus algorithm it uses is a process where all the interconnected nodes in zookeeper agree on one result among the group of participants. Zookeeper allows distributed processes to co-ordinate with each other through a shared hierarchal name space of data registers.  Learned about zookeeper architecture and its API’s. Learned how to handle data service and application service layer using zookeeper API’s .

zookeeper_mini_lab_java's People

Contributors

eshan-haval avatar

Watchers

 avatar

Forkers

purval

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.