1 / 13

Service Discovery

Service Discovery. Presented By: Abhishek Anand Amralkar. Who Am I?. Currently DevOps Engineer at Talentica and Clojure beginner * I write at www.abhishekamralkar.com * My Github: http://github.com/abhishekamralkar * Twitter Handle: aamralkar. Service Discovery?.

ji
Download Presentation

Service Discovery

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Service Discovery Presented By: Abhishek Anand Amralkar

  2. Who Am I? Currently DevOps Engineer at Talentica and Clojure beginner * I write at www.abhishekamralkar.com * My Github: http://github.com/abhishekamralkar * Twitter Handle: aamralkar Presenter Name

  3. Service Discovery? 0. How to know which service running? 1. On which port it is running? 2. How Application will connect to services • Which IP address? • Which Port? Presenter Name

  4. Traditional Method 0 . Hardcoded Paths/address/ports in Application configuration. 1 . Use of hostnames in `/etc/hosts` or may be DNS server. Worked well before the Micro service Architecture Era. Abhishek Anand Amralkar

  5. Solution? 0. Consul 1. SkyDNS 2. Zookeeper 3. ETCD Presenter Name

  6. What is Consul? 0. Service Discovery • DNS • HTTP (JSON) • Health Checking • Key/Value Store • Multi Datacenter Aware • Service Registration Presenter Name

  7. Install Consul 0. Single binary can run as server as well as agent. • Consul can run on individual machine • Consul is recommended to run in Cluster moder (N+1). • Consul servers are responsible for running the cluster in Consensus protocol and store client state. • Consul agents are stateless. • Consul works on Consensus protocol. Presenter Name

  8. Consensus Protocol 0. To provide consistency as defined in CAP theorem • Based on RAFT protocol .. http://thesecretlivesofdata.com/raft/ • Raft nodes are always in one of three states: follower, candidate, or leader. • All nodes initially start out as a follower. In this state, nodes can accept log entries from a leader and cast votes. I • f no entries are received for some time, nodes self-promote to the candidate state. • In the candidate state, nodes request votes from their peers. If a candidate receives a quorum of votes, then it is promoted to a leader. • The leader must accept new log entries and replicate to all the other followers. Presenter Name

  9. RESTful HTTP API • The API can be used to perform CRUD operations on nodes, services, checks, configuration, and more. The endpoints are versioned to enable changes without breaking backwards compatibility. • Each endpoint manages a different aspect of Consul: • acl - Access Control Lists • agent - Consul Agent • catalog - Nodes and Services • coordinate - Network Coordinates • event - User Events Presenter Name

  10. RESTful HTTP API • health - Health Checks • kv - Key/Value Store • query - Prepared Queries • session - Sessions • status - Consul System Status Presenter Name

  11. Questions & Answers

  12. Thank You

More Related