当前位置:网站首页>Eureka基础知识
Eureka基础知识
2022-07-17 07:23:00 【幻清】
什么是服务治理
Spring Cloud封装了Netflix公司开发的Eureka模块来实现服务治理。
在传统的rpc远程调用框架中,管理每个服务与服务之间以来关系比较复杂,管理比较复杂,所以需要使用服务治理,管理服务与服务之间依赖关系,可以实现服务调用、负载均衡、容错等实现服务发现与注册。
什么是服务注册与发现
Eureka采用了CS的设计架构,Eureka Server作为服务注册功能的服务器,它是服务注册中心。而系统中的其他微服务,使用Eureka的客户端连接到Eureka Server并维持心跳连接。这样系统的维护人员就可以通过Eureka Server来监控系统中各个微服务是否正常运行。
在服务注册和发现中,有一个注册中心。当服务器启动的时候,会把当前自己服务器的信息,比如服务地址、通信地址等以别名方式注册到注册中心。另一方(消费者|服务提供者)以该别名的方式去注册中心上获取到实际的服务通信地址,然后再实现本地RPC,调用RPC远程调用框架核心设计思想:在于注册中心,因为使用注册中心管理每个服务与服务之间的一个依赖关系(服务治理概念),在任何RPC远程框架中,都会有一个注册中心(存放服务地址相关信息(接口地址))。
Eureka包含两个组件Eureka Server 和Eureka Client
Eureka Server提供服务注册服务
各个微服务节点通过配置启动后,会在Eureka Server中进行注册,这样Eureka Server中的服务注册表中将会存储所有可用服务节点的信息,服务节点的信息可以在界面中直观看到。
Eureka Client 通过注册中心进行访问
是一个JAVA客户端,用于简化Eureka Server的交互,客户端同时也具备一个内置的、使用轮询(round-robin)负载算法的负载均衡器。在启动应用后,将向Eureka Server发送心跳(默认周期为 30秒)。如果Eureka Server在多个心跳周期内没有接收到某个节点的心跳,Eureka Server将会从服务注册表中把这个服务节点移除(默认90秒)。
边栏推荐
- the max_ iter was reached which means the coef_ did not converge “the coef_ did not converge“
- Go language Bible
- Jira --- workflow call external api
- Look back at the paper after reading the code: yolov3 reread
- Will it be a little late to realize your "wonderful" 360?
- 真实案例:系统上线后Cpu使用率飙升如何排查?
- mySQL 2502 2503错误
- Visual studio production environment configuration scheme: slowcheetah
- Understanding of fast and slow pointer
- [C console] - C console class
猜你喜欢

ObjectARX--自定义圆的实现

Shenzhen Prudential written examination record

3D激光SLAM:ALOAM---帧间里程计代码解读

Yolov5 label and establish your own data set
[characteristic Engineering]

History and value of forked coins | eth, BCH, BSV 2020-03-08

The core problem of concurrent programming

【flask入门系列】异常处理

First experience of openvino machine learning

Detailed explanation of type, user-defined type, preliminary understanding of structure
随机推荐
真实案例:系统上线后Cpu使用率飙升如何排查?
超干货!彻底搞懂Golang内存管理和垃圾回收
MCU如何选型?
美联储降息,为何长期利好数字货币市场? 2020-03-05
如何将读取列表中的str转化为float
Array exercise 3
面试题:外边距折叠问题 (块级元素在普通文档流中的BUG)
LeetCode 每日一题 2021/7/11-2021/7/17
No module named ‘yaml‘ 解决办法
Redis transaction
812. Maximum triangle area
Jira --- workflow call external api
Application of SCA on devsecops platform
Viewing the technology stack of distributed system from the crash report of station B
[C# Console]-C# 控制台类
Ribbon负载均衡服务调用
Ruffian Heng embedded bimonthly issue 58
Dependency injection method
Classic general pbootcms flower website template source code, adaptive mobile terminal, with background management
如何在 Jenkins Pipeline 中使用curl 并处理响应结果