https://highops.com/insights/service-discovery-6-questions-to-4-experts/

What’s Service Discovery? Its benefits and challenges?

05/07/15 by ABS

The successful format of ‘Immutable Infrastructure: 6 questions to 6 experts’ is back.

The topic of Service Discovery is not new (just think DNS!) but it’s been moving fast over the last few years thanks in part to the explosion of services and microservices architectures and, of course, Docker.

As it often happens in these cases, we see a lot of different interpretations of its meaning, benefits, challenges, and adoption paths. We asked 4 experts who have been thinking, writing and implementing Service Discovery to share their experience by answering the following questions on the topic:

1) What does Service Discovery mean to you?
2) What are the key aspects Service Discovery should have and why?
3) What are the main benefits you see/care about?
4) What are the most solid options out there today?
5) Biggest adoption challenges that are not there yet in your opinion?
6) Starting from scratch is (relatively) easy. What about those with existing systems? any hints on how people could get started introducing Service Discovery in existing systems?

The experts

  • Sam Newman, a techie at ThoughtWorks. Aside from other things I’ve committed sporadically to open source projects, spoke at more than a few conferences, and wrote some things including the book Building Microservices for O’Reilly.
  • Nitesh Kant is an engineer in the Cloud & Platform engineering team at Netflix, where he has been leading the evolution of the Inter Process Communication (IPC) stack to follow the reactive programming paradigm. He is the core contributor of the reactive IPC library RxNetty which forms the heart of this new stack. He’s also a contributor to eureka: Netflix’s Service Discovery system and has ideated and designed the 2.0 version. Eureka is the backbone of Netflix’s microservices architecture handling thousands of application instances in the Netflix ecosystem.
  • Jeff Lindsay is the author of Dokku and many Docker related open source projects. He is the co-founder and principal of Glider Labs, a DevOps consultancy specializing in modern, Docker-oriented system architectures. Jeff was involved in the early stages of Docker development, and has worked with many other organizations such as Twilio, Digital Ocean, and NASA Ames on distributed systems and developer platforms.
  • Eberhard Wolff works as a Fellow for innoQ. His technological focus is on modern architectures – often involving Cloud, Continuous Delivery, DevOps, Microservices and NoSQL Eberhard is a regular speaker at international conferences and author of over 100 articles and several books – most in German.

Highlights

The full transcript of all answers is at the end and we recommend you read them all since they cover a lot of ground. Here are just some highlights:

1) What does Service Discovery mean to you?

It keeps track of all the services in a (large scale) distributed system so that they can be found by both people and other services. Think of DNS as a simple example but on steroids: complex systems need features like storing metadata about a service, health monitoring, varying query capabilities, realtime updates, etc.

It differs depending on the context, e.g. network device discovery, rendezvous discovery, SOA discovery but in all cases it’s a coordination mechanism for services to announce themselves and find others without configuration.

2) What are the key aspects Service Discovery should have and why?

As the backbone of any large-scale service oriented architecture Service Discovery needs the be highly available and cover 3 main aspects: Registration, Directory and Lookup. Having just the Directory is not enough.

As mentioned the ability to store metadata is key since complex services provide multiple service interfaces and ports and often require non-trivial deployment environments. And once you have lots of metadata you need powerful querying capabilities, including health/status.

3) What are the main benefits you see/care about?

The main benefit is what in network discovery referred to as “zero configuration”: rather than hardcode addresses we specify a service name (and sometimes not even that!). In modern architectures nodes come and go and you need to decouple individual service instances from the knowledge of the deployment topology of your architecture.

Having a way to get insights into the deployment status of all the services and to control the available instances from a centralized place becomes key, especially in complex system s which warrant something more than just DNS.

4) What are the most solid options out there today?

Service Discovery solutions are a plenty today in the industry.

As mentioned DNS has been used for a long time and is probably the largest Service Discovery system out there. For small-scale setups start with DNS but once you start provisioning nodes more dynamically, DNS starts becoming problematic due to the propagation time.

Arguably, Zookeeper is the most mature of the config stores used for discovery since it has been around for quite some time and is a comprehensive solution including configuration management, leader election, distributed locking etc. This makes it a very compelling general-purpose solution although it’s often more complex than it could be.

etcd & doozerd are the new age cousins of Zookeeper, built with similar architectures and features sets and hence can be used interchangeably in place of Zookeeper

Consul is a newer solution in this space that provides configuration management and a generic key-value store apart from Service Discovery. It also has killer features of health checking of nodes and supporting DNS SRV for improved interop with other systems. A big differentiator from Zookeeper is the HTTP & DNS APIs that can be used to interact with consul vis-à-vis a Zookeeper client.

If you lean more towards AP systems Eureka is a great choice and is battle tested in Netflix and it prefers Availability over Consistency in the wake of network partitions.

5) Biggest adoption challenges that are not there yet in your opinion?

It’s more complicated than you realize: it’s an extension of the distributed systems problem.

You might roll out configuration files with service names, IPs and ports but when the system becomes very dynamic you need to migrate to a “real” Service Discovery solution and that migration is usually not as easy as you think. One of the biggest challenges is the inability to understand how intrusive the choice of a Service Discovery system is: once chosen it is very difficult to change it and hence it is critical to do it right.

Most systems implement some form of distributed consensus algorithms, designed to be resilient in the face of node outages, but these algorithms are notoriously hard to get right and understanding failure modes is both key and difficult and failing to analyse them correctly usually takes you to make the wrong choices.

6) Starting from scratch is (relatively) easy. What about those with existing systems? Any hints on how people could get started introducing Service Discovery in existing systems?

The first step of starting to use a Service Discovery system is for clients to stop baking knowledge about the dependent service deployment environments. Once the clients stop baking that knowledge in code they are forced to store that knowledge externally. Starting as simple as storing this knowledge in properties, they can slowly graduate to looking up this knowledge dynamically from an external Service Discovery system.

Once you pick a mechanism (network or service) and understand what you need to optimize for (and that’s maybe the hardest part), it’s just a matter of introducing integration points for registration and lookup.

【转帖】Service Discovery: 6 questions to 4 experts的更多相关文章

  1. Service Discovery with Apache Curator

    Curator的介绍 Curator就是Zookeeper的一个客户端工具(不知道Zookeeper的同学可以到http://www.ibm.com/developerworks/cn/opensou ...

  2. Android WiFiDirect 学习(二)——Service Discovery

    Service Discovery 简介 在Android WifiDirect学习(一 )中,简单介绍了如何使用WifiDirect进行搜索——连接——传输. 这样会有一个问题,那就是你会搜索到到附 ...

  3. Open-Source Service Discovery

    Service discovery is a key component of most distributed systems and service oriented architectures. ...

  4. [译]Ocelot - Service Discovery

    原文 你可以指定一个service discovery provider,ocelot将使用它来找下游的host和port. Consul 下面的配置要放在GlobalConfiguration中.如 ...

  5. Service Discovery And Health Checks In ASP.NET Core With Consul

    在这篇文章中,我们将快速了解一下服务发现是什么,使用Consul在ASP.NET Core MVC框架中,并结合DnsClient.NET实现基于Dns的客户端服务发现 这篇文章的所有源代码都可以在G ...

  6. ZooKeeper之service discovery

    Zookeeper整体介绍 ZooKeeper is a centralized service for maintaining configuration information, naming, ...

  7. Service discovery

    https://www.cnblogs.com/dirt2/p/5987067.html Use Assigned Numbers in the Service Discovery Protocol ...

  8. Service Discovery in WCF 4.0 – Part 2 z

    Service Discovery in WCF 4.0 – Part 2 In the previous post I discussed about the basic usage of WCF ...

  9. Service Discovery in WCF 4.0 – Part 1 z

    Service Discovery in WCF 4.0 – Part 1 When designing a service oriented architecture (SOA) system, t ...

随机推荐

  1. 配置nginx虚拟目录配置文件支持tp的pathinfo

    lnmp自带的包不好用, 经测试,在相应的conf文件加入这句话即可: location / { if (!-e $request_filename) { rewrite ^(.*)$ /index. ...

  2. 原生javascript知识点

    JAVASCRIPT 1.变量 1.1概念 变量源于数学,是计算机语言中存储计算结果或表示值抽象概念 计算机有个地方叫内存,变量都会将值存入到内存中,变量就是指向这个值的名字 1.2命名规则 1. 由 ...

  3. Android TextView 显示HTML加图片

    TextView显示网络图片,我用android2.3的系统,可以显示图片出来,并且如果图片比较大,应用会卡的现象,肯定是因为使用主线程去获取网络图片造成的,但如果我用android4.0以上的系统运 ...

  4. python接口自动化16-multipart/form-data上传图片

    前言 在提交表单操作的时候,经常会遇到图片上传的操作,图片上传是一个单独的接口,本篇以禅道为例,介绍如何上传图片 上传接口 1.以禅道上提交bug为例,在选择图片时,点确定按钮,就是上传图片了 2.用 ...

  5. U3D内存优化

    原创文章如需转载请注明:转载自风宇冲Unity3D教程学院                                                U3D内存优化   读了Hog关于内存管理文章 ...

  6. Oracle sql"NOT IN"语句优化,查询A表有、B表没有的数据

    记录量大的情况下,采用NOT IN查询,那肯定会慢的无法接受.比如: SELECT A.* FROM TABLE_A WHERE A.USER_ID NOT IN (SELECT B.USER_ID ...

  7. Android中各级目录的作用

    Android中各级目录的作用 一.目录结构  src目录---存放源代码文件   gen目录---ADT插件生成的文件,(自动生成) R.java文件  drawable类---给图片生产的ID  ...

  8. mysql下float类型使用一些误差详解

    单精度浮点数用4字节(32bit)表示浮点数采用IEEE754标准的计算机浮点数,在内部是用二进制表示的如:7.22用32位二进制是表示不下的.所以就不精确了. mysql中float数据类型的问题总 ...

  9. A4纸的象素分辨率计算[转]

    在公制长度单位与屏幕分辨率进行换算时,必须用到一个DPI(Dots Per Inch)指标.在Windows系统的网页打印中默认采用的是96dpi,Mac系统中默认的是72dpi. A4纸张的尺寸是2 ...

  10. OpenCV学习(14) 细化算法(2)

          前面一篇教程中,我们实现了Zhang的快速并行细化算法,从算法原理上,我们可以知道,算法是基于像素8邻域的形状来决定是否删除当前像素.还有很多与此算法相似的细化算法,只是判断的条件不一样. ...