SlideShare a Scribd company logo
Service
Discovery In
Distributed
Systems
#OpsInit
@lihas5
@knolspeak
By:
sahil.sawhney@knoldus.in
Sahil Sawhney
Agenda
➔ Why need a distributed environment
➔ What is service discovery
➔ Why do we need service discovery
➔ Service Discovery in DCOS
➔ Service discovery in Kubernetes
➔ Conclusions and observations
Why Need A Distributed Environment
➔ ELK stack
➔ Prometheus
➔ Pager Duty
➔ Web Servers
➔ Backend Servers
➔ Databases
◆ Sql
◆ NoSql
➔ Streaming Jobs
➔ Kafka Queues
➔ Zookeeper
And Many More….
But What About …..
There Need to be a way ….
We need to answer following :
➔ What mechanism allows services to be called even with constantly
changing hosts in a distributed environment.
➔ How are these services (like microservices) communicating with
each other internally
➔ How the external request/response mechanism works in a
distributed environment
Service Discovery To The Rescue
All the questions we just raised could be answered by having a proper
service discovery mechanism.
Service discovery could be defined as a process of finding the network
location of a running service.
In case of distributed systems, the host alloted to a service are dynamic
and keeps on changing. Service discovery make sures that the dynamic
nature of application deployment does not effects the
reachability/availability of the application.
Types Of Service Discovery
Service discovery is broadly of 2 types
➔ Client Side Service Discovery
➔ Server Side Service Discovery
Client Side Service Discovery
Concluding
Advantages
➔ Except for the service registry, there are no other moving parts
➔ Intelligent custom application‑specific load‑balancing decisions
Disadvantages
➔ It couples the client with the service registry
➔ Need to implement discovery logic for each programming
language and framework used by the service clients.
Server Side Service Discovery
Concluding
Advantages
➔ Details of discovery are abstracted away from the client
➔ Clients simply make requests to the load balancer.
Disadvantages
➔ Unless the load balancer is provided by the deployment
environment, it is yet another highly available system component
that you need to set up and manage.
What is DCOS / Kubernetes All About ?
DEFINITION
A distributed system is a network that consists of autonomous computers that are
connected using a distribution middleware. They help in sharing different
resources and capabilities to provide users with a single and integrated coherent
network.
DCOS(Marathon) and Kubernetes are the the leading distributed orchestration
platforms.
Service Discovery In Kubernetes and DCOS
➔ Deployment environments such as Kubernetes and Marathon uses
server side service discovery and run a proxy on each host in the
cluster.
➔ The proxy plays the role of a server‑side discovery load balancer.
➔ In order to make a request to a service, a client routes the request via
the proxy using the host’s IP (public/master node) address and the
service’s assigned port.
➔ The proxy then transparently forwards the request to an available
service instance running somewhere in the cluster.
Implementing Service Discovery In DCOS
In DCOS service discovery / load balancing could be implemented in
following ways
DNS based Service Discovery (Used Internally in distributed cluster)
➔ Mesos DNS
➔ DCOS DNS
Load Balancing based Service Discovery
➔ External and Internal Marathon-LB
➔ Virtual IP Addresses (VIPs)
➔ Edge-LB (Enterprise)
Demo Time
Mesos DNS VS DCOS DNS
Mesos DNS
➔ All the fully qualified domain name (FQDNs) have the top level
domain (TLD) of .mesos
➔ Only master have the information about all FQDNs
➔ Not a recommended choice.
DCOS DNS
➔ All the fully qualified domain name (FQDNs) have the top level
domain (TLD) of .directory
➔ All the nodes have the information about all FQDNs
➔ Highly Available.
VIP Addresses VS External Marathon-LB
Virtual IP Addresses
➔ Used to load balance services inside the DCOS VPN
➔ Services cannot be accessed from outside the DCOS cluster
➔ Generally TCP service ports are accessed
➔ Specified via labels like VIP_0, VIP_1, etc.
External Marathon-LB
➔ Used to load balance services Outside the DCOS VPN
➔ Used to route the traffic like clients REST requests.
➔ Http and Https ports are accessed.
➔ Specified via HAPROXY_GROUP
Thank You

More Related Content

PPTX
Microservices made easy JavaCro 2021
PPTX
Cloud native java workshop
PPTX
Open Source In The World Of Java
PPTX
Codecamp 2020 microservices made easy workshop
PDF
Finally, easy integration testing with Testcontainers
PPSX
Docker Kubernetes Istio
PPTX
Jenkins 1
PDF
Docker container basics and efficiency of Kubernetes
Microservices made easy JavaCro 2021
Cloud native java workshop
Open Source In The World Of Java
Codecamp 2020 microservices made easy workshop
Finally, easy integration testing with Testcontainers
Docker Kubernetes Istio
Jenkins 1
Docker container basics and efficiency of Kubernetes

What's hot (20)

PDF
Implementing Microservices with Jakarta EE and MicroProfile
PPTX
Develop and deploy Kubernetes applications with Docker - IBM Index 2018
PDF
KubeCon NA 2017: Ambassador and Envoy (Envoy Salon)
PPTX
Simple tweaks to get the most out of your JVM
PPTX
Service Discovery In Kubernetes
PPTX
Continuous deployment of polyglot microservices: A practical approach
PDF
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
PDF
DockerCon SF 2015: DHE/DTR
PDF
Docker Datacenter - CaaS
PPTX
Docker Meetup 08 03-2016
PPTX
Docker Roadshow 2016
PPTX
Jenkins advance topic
PDF
Troubleshooting tips from docker support engineers
PPTX
Intro to kubernetes
PPTX
What is Docker?
PPTX
Docker Datacenter Overview and Production Setup Slides
PDF
Microservices, Kubernetes and Istio - A Great Fit!
PDF
Practical Design Patterns in Docker Networking
PPTX
Dockers and containers basics
PPTX
Docker SF Meetup January 2016
Implementing Microservices with Jakarta EE and MicroProfile
Develop and deploy Kubernetes applications with Docker - IBM Index 2018
KubeCon NA 2017: Ambassador and Envoy (Envoy Salon)
Simple tweaks to get the most out of your JVM
Service Discovery In Kubernetes
Continuous deployment of polyglot microservices: A practical approach
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
DockerCon SF 2015: DHE/DTR
Docker Datacenter - CaaS
Docker Meetup 08 03-2016
Docker Roadshow 2016
Jenkins advance topic
Troubleshooting tips from docker support engineers
Intro to kubernetes
What is Docker?
Docker Datacenter Overview and Production Setup Slides
Microservices, Kubernetes and Istio - A Great Fit!
Practical Design Patterns in Docker Networking
Dockers and containers basics
Docker SF Meetup January 2016
Ad

Similar to Service Discovery in Distributed System with DCOS & Kubernettes. - Sahil Sawhney (20)

PDF
Service discovery in mesos miguel, Angel Guillen
PDF
Service discovery in mesos
PDF
Service Discovery in Distributed Systems
PDF
Micro-services meetup
PDF
Kubernetes Webinar Series - Understanding Service Discovery
PDF
Service Discovery in MicroServices
PDF
Service Discovery 101
PDF
Service Discovery & Load-Balancing under Docker 1.12.0 @ Docker Meetup #22
PPTX
Service_discovery- presentation about service discovery
PDF
Services discovery in Docker
PDF
Weaving Through the Mesh: Making Sense of Istio and Overlapping Technologies
PPTX
Deployment, Performance, Agility and Flexibility using Trisotech Digital Dist...
PDF
Service Discovery. Spring Cloud Internals
PPTX
03 spring cloud eureka service discovery
ODP
DC/OS: Datacenter Operating System
PDF
Energy efficient cluster-based service discovery in wireless sensor networks
PDF
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
PPTX
Service Discovery using etcd, Consul and Kubernetes
PPTX
Docker-N-Beyond
PDF
Service Discovery or Why each micro service should believe it's the only one ...
Service discovery in mesos miguel, Angel Guillen
Service discovery in mesos
Service Discovery in Distributed Systems
Micro-services meetup
Kubernetes Webinar Series - Understanding Service Discovery
Service Discovery in MicroServices
Service Discovery 101
Service Discovery & Load-Balancing under Docker 1.12.0 @ Docker Meetup #22
Service_discovery- presentation about service discovery
Services discovery in Docker
Weaving Through the Mesh: Making Sense of Istio and Overlapping Technologies
Deployment, Performance, Agility and Flexibility using Trisotech Digital Dist...
Service Discovery. Spring Cloud Internals
03 spring cloud eureka service discovery
DC/OS: Datacenter Operating System
Energy efficient cluster-based service discovery in wireless sensor networks
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Service Discovery using etcd, Consul and Kubernetes
Docker-N-Beyond
Service Discovery or Why each micro service should believe it's the only one ...
Ad

More from Knoldus Inc. (20)

PPTX
Angular Hydration Presentation (FrontEnd)
PPTX
Optimizing Test Execution: Heuristic Algorithm for Self-Healing
PPTX
Self-Healing Test Automation Framework - Healenium
PPTX
Kanban Metrics Presentation (Project Management)
PPTX
Java 17 features and implementation.pptx
PPTX
Chaos Mesh Introducing Chaos in Kubernetes
PPTX
GraalVM - A Step Ahead of JVM Presentation
PPTX
Nomad by HashiCorp Presentation (DevOps)
PPTX
Nomad by HashiCorp Presentation (DevOps)
PPTX
DAPR - Distributed Application Runtime Presentation
PPTX
Introduction to Azure Virtual WAN Presentation
PPTX
Introduction to Argo Rollouts Presentation
PPTX
Intro to Azure Container App Presentation
PPTX
Insights Unveiled Test Reporting and Observability Excellence
PPTX
Introduction to Splunk Presentation (DevOps)
PPTX
Code Camp - Data Profiling and Quality Analysis Framework
PPTX
AWS: Messaging Services in AWS Presentation
PPTX
Amazon Cognito: A Primer on Authentication and Authorization
PPTX
ZIO Http A Functional Approach to Scalable and Type-Safe Web Development
PPTX
Managing State & HTTP Requests In Ionic.
Angular Hydration Presentation (FrontEnd)
Optimizing Test Execution: Heuristic Algorithm for Self-Healing
Self-Healing Test Automation Framework - Healenium
Kanban Metrics Presentation (Project Management)
Java 17 features and implementation.pptx
Chaos Mesh Introducing Chaos in Kubernetes
GraalVM - A Step Ahead of JVM Presentation
Nomad by HashiCorp Presentation (DevOps)
Nomad by HashiCorp Presentation (DevOps)
DAPR - Distributed Application Runtime Presentation
Introduction to Azure Virtual WAN Presentation
Introduction to Argo Rollouts Presentation
Intro to Azure Container App Presentation
Insights Unveiled Test Reporting and Observability Excellence
Introduction to Splunk Presentation (DevOps)
Code Camp - Data Profiling and Quality Analysis Framework
AWS: Messaging Services in AWS Presentation
Amazon Cognito: A Primer on Authentication and Authorization
ZIO Http A Functional Approach to Scalable and Type-Safe Web Development
Managing State & HTTP Requests In Ionic.

Recently uploaded (20)

PDF
Approach and Philosophy of On baking technology
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Enhancing emotion recognition model for a student engagement use case through...
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPTX
A Presentation on Touch Screen Technology
PDF
Getting Started with Data Integration: FME Form 101
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
Tartificialntelligence_presentation.pptx
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
project resource management chapter-09.pdf
Approach and Philosophy of On baking technology
Zenith AI: Advanced Artificial Intelligence
Enhancing emotion recognition model for a student engagement use case through...
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
A Presentation on Touch Screen Technology
Getting Started with Data Integration: FME Form 101
Chapter 5: Probability Theory and Statistics
Univ-Connecticut-ChatGPT-Presentaion.pdf
Hindi spoken digit analysis for native and non-native speakers
Group 1 Presentation -Planning and Decision Making .pptx
A comparative study of natural language inference in Swahili using monolingua...
Building Integrated photovoltaic BIPV_UPV.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
NewMind AI Weekly Chronicles - August'25-Week II
A comparative analysis of optical character recognition models for extracting...
Tartificialntelligence_presentation.pptx
cloud_computing_Infrastucture_as_cloud_p
project resource management chapter-09.pdf

Service Discovery in Distributed System with DCOS & Kubernettes. - Sahil Sawhney

  • 2. Agenda ➔ Why need a distributed environment ➔ What is service discovery ➔ Why do we need service discovery ➔ Service Discovery in DCOS ➔ Service discovery in Kubernetes ➔ Conclusions and observations
  • 3. Why Need A Distributed Environment ➔ ELK stack ➔ Prometheus ➔ Pager Duty ➔ Web Servers ➔ Backend Servers ➔ Databases ◆ Sql ◆ NoSql ➔ Streaming Jobs ➔ Kafka Queues ➔ Zookeeper And Many More….
  • 5. There Need to be a way …. We need to answer following : ➔ What mechanism allows services to be called even with constantly changing hosts in a distributed environment. ➔ How are these services (like microservices) communicating with each other internally ➔ How the external request/response mechanism works in a distributed environment
  • 6. Service Discovery To The Rescue All the questions we just raised could be answered by having a proper service discovery mechanism. Service discovery could be defined as a process of finding the network location of a running service. In case of distributed systems, the host alloted to a service are dynamic and keeps on changing. Service discovery make sures that the dynamic nature of application deployment does not effects the reachability/availability of the application.
  • 7. Types Of Service Discovery Service discovery is broadly of 2 types ➔ Client Side Service Discovery ➔ Server Side Service Discovery
  • 9. Concluding Advantages ➔ Except for the service registry, there are no other moving parts ➔ Intelligent custom application‑specific load‑balancing decisions Disadvantages ➔ It couples the client with the service registry ➔ Need to implement discovery logic for each programming language and framework used by the service clients.
  • 10. Server Side Service Discovery
  • 11. Concluding Advantages ➔ Details of discovery are abstracted away from the client ➔ Clients simply make requests to the load balancer. Disadvantages ➔ Unless the load balancer is provided by the deployment environment, it is yet another highly available system component that you need to set up and manage.
  • 12. What is DCOS / Kubernetes All About ? DEFINITION A distributed system is a network that consists of autonomous computers that are connected using a distribution middleware. They help in sharing different resources and capabilities to provide users with a single and integrated coherent network. DCOS(Marathon) and Kubernetes are the the leading distributed orchestration platforms.
  • 13. Service Discovery In Kubernetes and DCOS ➔ Deployment environments such as Kubernetes and Marathon uses server side service discovery and run a proxy on each host in the cluster. ➔ The proxy plays the role of a server‑side discovery load balancer. ➔ In order to make a request to a service, a client routes the request via the proxy using the host’s IP (public/master node) address and the service’s assigned port. ➔ The proxy then transparently forwards the request to an available service instance running somewhere in the cluster.
  • 14. Implementing Service Discovery In DCOS In DCOS service discovery / load balancing could be implemented in following ways DNS based Service Discovery (Used Internally in distributed cluster) ➔ Mesos DNS ➔ DCOS DNS Load Balancing based Service Discovery ➔ External and Internal Marathon-LB ➔ Virtual IP Addresses (VIPs) ➔ Edge-LB (Enterprise)
  • 16. Mesos DNS VS DCOS DNS Mesos DNS ➔ All the fully qualified domain name (FQDNs) have the top level domain (TLD) of .mesos ➔ Only master have the information about all FQDNs ➔ Not a recommended choice. DCOS DNS ➔ All the fully qualified domain name (FQDNs) have the top level domain (TLD) of .directory ➔ All the nodes have the information about all FQDNs ➔ Highly Available.
  • 17. VIP Addresses VS External Marathon-LB Virtual IP Addresses ➔ Used to load balance services inside the DCOS VPN ➔ Services cannot be accessed from outside the DCOS cluster ➔ Generally TCP service ports are accessed ➔ Specified via labels like VIP_0, VIP_1, etc. External Marathon-LB ➔ Used to load balance services Outside the DCOS VPN ➔ Used to route the traffic like clients REST requests. ➔ Http and Https ports are accessed. ➔ Specified via HAPROXY_GROUP