首页 > 其他分享 >What is service discovery?

What is service discovery?

时间:2023-09-19 20:25:44浏览次数:50  
标签:What Service service Consul catalog services discovery

Service discovery helps you discovery,track and monitor the health of services within a network.

Service discovery registers and maintains a record of all your services in a service catalog.This service catalog acts as a single source of truth that allows your services to query and communicate with each other.

Benifits of service discovery

Service discovery provides benefits for all organizations, ranging from simplified scalability to imporve application resiliency. Some of the benefits of service discovery include:

  • Dynamic IP address and Port discovery
  • Simplified horizontal service scaling
  • Abstract discovery logic away from applications
  • Reliable service communication ensured by health checks
  • Load balance requests across healthy service instances.
  • Faster deployment times achieved by high-speed discovery.
  • Automated service registration and de-registration

The service catalog is dynamically updated as new instance of the service are added and legacy or unhealthy service instances are removed. Removed services will no longer participate in the load balancing pool for handling service consumer requests.

What is service discovery in microservices?

In a microservices application, the set of active service instances changes frequently across a large, dynamic environment.These service instances rely on a service catalog to retrieve the most up-to-date access information from the respective services. A reliable service catalog is especially important for service discovery in microservices to ensure healthy, scalable, and highly responsive application operation.

What are the two main types of service discovery?

There are two main service-discovery partterns: client-side discovery and server-side discovery.

In systems that use client-side discovery, the service consumer is reponsible for determinig the access information of available service instances and load balancing requests between them.

  1. The service consumer queries the service catalog
  2. The service catalog retrieves and returns all access informatlion
  3. The service discovery consumer selects a healthy downstream service and makes request directly ot it.

 

In systems that use server-side discovery, the service consumer uses an intermediary to query the service catalog and make requests to them.

  1. The service consumer queries an intermediary(Consul)
  2. The intermediary queries the service catalog and routes requests to the available service instances.

 For modern applications, this discovery method is advantageous because developers can make their applications fater and more lightweight by decoupling and centrailizing service discovery logic.

Service discovery vs load balancing

Service discovery and load balancing share as similarity in distributing requests to back end services. but differ in many important ways.

Traditional load balancing are not designed for rapid registration and de-registration of services, nor are they designed for high-availbility. By contrast, service discovery system use multiple nodes that maintain the service registry state and a peer -to-peer state management system for increased resilience acoss any type of infrastructure.

For modern, clound-based application, serfvice discovery is the preffered method for directing traffic to the right service provider due to its ability to scale and remain resilient, independent of infrastructure.

How do you implement service discovery?

You can implement service discovery systems across any type of infrastructure, whether it is on-premise or in the cloud. Service discovery is a native feature of many container orchestrators such as Kubernetes or Nomad. There are also platform-agnostic service discovery methods available for non-container workloads such as VMs and serverless technologies. Implementing a resilient service discovery system involves creating a set of servers that maintain and facilitate service registry operations. You can achieve this by installing a service discovery system or using a managed service discovery service.

What is Consul?

Consul is a service networking solution that lets you automate network configurations, discover services,and enable secure connectity across any clound or runtime. With these features, Consul helps you solve the complex netowkring and security challenges of operating microservices and clound infrastructure(mult-cloud and hybrid cloud),You can use these features independently or together to achive zero trust security.

Consul's service discovery capabilities help you discover ,track, and monitor the health of serfvices within a network. Consul acts a single source of truth htat allows your services to query and communicate with each other.

You can use Consul with virtual machine(VMs) , containers, serverless  technolegies , or with container orchestration platforms, such as Nomad and Kubernates, Consul is platform agnostic which makes it a great fit for all environments,including legacy platforms.

Consul is available as a self-managed project or as a fully managed service mesh solution (HCP Consul), HCP Consul enables users to discover and securely connect services without the added operational burden of maintaing a service mesh on their own.

标签:What,Service,service,Consul,catalog,services,discovery
From: https://www.cnblogs.com/qindy/p/17715695.html

相关文章

  • Azamon Web Services 题解
    AzamonWebServices看到目前题解都是\(O(n^2)\)的复杂度,来一发\(O(nlogn)\)的贪心题解。思路很简单,先求经过至多一次的交换后,最小的字符串\(S\)。再和\(T\)比较,如果小于就输出,否则无解。问题转化成了两个子问题:求经过至多一次的交换后,最小的字符串\(S\)。和\(T\)......
  • mysql连接不上Job for mysqld.service failed because the control process exited wi
    问题:mysql服务器链接不上我们是自己买的服务器搭建的,查看mysql的服务器能不能连的上,看服务是否正常查看进程:top-c;查看磁盘:df-h;linux环境有很多大小,只需要看最大的一个存储就行了,发现可使用的没了,我这图片是清理过后的问题解决先要排查是哪些文件堆满了磁盘,极大的......
  • The POM for com.xubo:service_base:jar:0.0.1-SNAPSHOT is missing, no dependency i
    报错信息[INFO]Scanningforprojects...[INFO][INFO]------------------------<com.xubo:service_edu>------------------------[INFO]Buildingservice_edu0.0.1-SNAPSHOT[INFO]--------------------------------[jar]---------------------------------[......
  • JAX-WS开发webservice示例详解
    目录:概述实验环境服务端的实现客户端的实现[一]、概述JavaAPIforXMLWebServices(JAX-WS)是Java程序设计语言一个用来创建Web服务的API。在服务器端,用户只需要通过Java语言定义远程调用所需要实现的接口SEI(serviceendpointinterface),并提供相关的实现,通过调用JAX-WS的服务发......
  • Azure Data Factory(八)数据集验证之服务主体(Service Principal)
    一,引言如下图所示,今天我们接着上一篇内容,继续讲解AzureDataFactory中的数据集连接服务的认证方式:ServicePrincipal关于ServicePrincipal的创建可以参考:AzureAD(四)知识补充-服务主体至于需要给ServicePrincipal分配什么样的角色和权限,大家可以自行参考实际项目......
  • Spring框架开发WebService的环境搭建
    如题。这里只介绍基本的运行环境搭建。所需IDE或编辑器,自行准备。笔者所有的职业开发者朋友都建议使用IDEA旗舰版(收费)。建议次选VsCode。eclipse、myeclipse这些再次。环境:1、JDK20。javaer都清楚的东西,不赘述。2、maven。很流行的依赖管理工具,在学习开发中顺手拿来编译运行也......
  • The server is temporarily unable to service your request due to maintenance
    访问不了就是这个路径没有通 有几下几点最重要的就是看一下你的路径有没有错主要就是看一下你服务器的端口号是不是变更了或者就是你的ip、第二点就是看一下你的服务器有没有启动这两点是最主要的 ......
  • What's the difference between Industrial Maxon Wireless 802.11ac AP and router
    ThemaindifferencebetweenindustrialAPsandroutersistheirintendeduse.IndustrialAPsaredesignedforuseinharshenvironments,suchasfactories,warehouses,andoutdoorlocations.Theyaretypicallymoreruggedandhaveawidertemperaturerang......
  • ExecutorService VS Timer
    IhavecodewhereIscheduletaskusingjava.util.timer.IwaslookingaroundandsawExecutorServicecandothesame.Sothisquestionhere,haveyouusedTimerandExectuorServicetoscheduletasks,whatisthebenefitofoneusing......
  • [Microsoft Azure] Azure App Service 如何查看实时日志
    本文将介绍如何在AzureAppService中查看实时日志,以便实时监控应用程序的运行状况和性能。在处理AzureAppService上运行的应用程序时,查看实时日志对于监控应用程序性能和诊断问题非常重要。实时日志可以帮助我们快速发现并解决潜在问题。步骤1:登录到Azure门户首先,......