当前位置:网站首页>Introduction to Eureka
Introduction to Eureka
2022-06-12 15:12:00 【CXgeng】
Eureka brief introduction
List of articles
Preface
“Eureka From ancient Greek words , Meaning for " Found out ”, In the field of software ,Eureka yes Netflix An open source service registration and discovery component of online film company , And others Netflix The company's service components ( For example, load balancer , Fuse , Gateway, etc. ) Together , By SpringCloud Community integration as Spring Cloud Netflix modular
One 、Eureka brief introduction
and Zookeeper similar ,Eureka Is a component of service registration and discovery , At first, it was mainly used in Amazon's cloud computing service platform AWS,Eureka It is divided into Eureka Server and Eureka Client,Eureka Server by Eureka Service registry ,Eureka Client by Eureka client .
Service registration means : When each microservice starts , Register your network address and other information to Eureka, The service provider puts its own information, such as the service name , service ip Inform the service registry .
Two 、 Some of the concepts
Register — Service registration
When Eureka Client towards Eureka server Registration time ,Eureka Client Provide its own metadata , such as ip Address 、 port 、 Of health indicators URL, Home page Address information .Renew — Renewal of service
Eureka Client By default , Every time 30s Send a heartbeat renewal , Inform... Through service renewal Eureka Server The Eureka Client Still available , Under normal circumstances , If Eureka Server 90 s I didn't receive Eureka Client The heart of ,Eureka Server Will Eureka Client Remove... From the registration list , Be careful : It is recommended on the official website that you do not change the interval between service renewalsFetch Registries — Get service registration list information
Eureka Client from Eureka Server Get service registry information , And cache it locally .Eureka Client Will use the service registration list information to find other service information , To make a remote call , The registration list information timing ( every other 30s) Updated once , The registration list information returned each time may be related to Eureka Client Cache information is different ,Eureka Client Will retrieve the information of the whole registry .Eureka Server Cache all service registry information , And compressed .Eureka Server and Eureka Client have access to json and xml Data format for communication , Default ,Eureka Client Use JSON To get the information of the registration listCancel — Service offline
Eureka Client When the program is closed, you can turn to Eureka Server Send offline request , After sending the request , The instance information of this client will be from Eureka Server Delete... From the service registration list . The offline request will not be completed automatically , You need to call the following code when the program is closed :
DiscoveryManager.getInstance().shudownComponent();Eviction — Service to eliminate
By default ,Eureka Client continuity 90s Not to Eureka Server Send service renewal ( heartbeat ) when ,Eureka Server The service will be deleted from the service list , That is, service elimination
3、 ... and 、Eureka Self protection
When there is a new Eureka Server When it appears , He tried from the neighboring Peer The node obtains the registration information of all service instances . If from adjacent Peer Node failed to get information ,Eureka Server Will try something else Peer node . If Eureka Server Can successfully obtain all service instance information . Then set the service renewal threshold according to the configuration information . At any time , If Eureka Server Service renewal received is less than the percentage configured for this value ( Default 15 Less than in minutes 85%), Then the server starts the self-protection mode , That is, the information in the registration list is not deleted .
The advantage of doing so is , If Eureka Server Caused by their own network problems Eureka Client Can't renew ,Eureka Client Registration list information is no longer deleted , That is to say Eureka Client It can also be consumed by other services .
边栏推荐
- 结构体示例
- #include使用“文件名“和<文件名>引入头文件的区别及简述
- leetcode每日一题-公平的糖果棒交换
- 3D reconstruction system | L3 incremental motion recovery structure (incremental SFM)
- 函数递归示例
- ARM 64指令小记
- Notes on ARM 64 instructions
- [spark][core] what is an external shuffle service?
- How to write year-end summary
- Simple crawler framework: parsing 51job page position information
猜你喜欢
随机推荐
[wp][beginner level] attack and defense world game
粒子滤波学习记录
学习是一件逆人性的事情(成为高手的内功心法)
Scala download and idea installation of scala plug-ins (nanny level tutorial is super detailed)
odom坐标系的理解
3D reconstruction system | L3 incremental motion recovery structure (incremental SFM)
學習是一件逆人性的事情(成為高手的內功心法)
Rust小技巧 - 通过FFI编程运行tensorrt模型
Jetpack architecture component learning (3) -- activity results API usage
Phpstudy indicates that the hosts file may not exist or be blocked from being opened. How to resolve the failure of synchronizing hosts
Structure example
Left aligned, right aligned, random number, goto, compare output bool
C string
C data type
Seaborn Brief
Ankai microelectronics rushes to the scientific innovation board: the annual revenue of 500million Xiaomi industry fund is the shareholder
同花顺手机炒股开户安全吗
C escape character
Autofac (2)
Kinect2.0+ORBSLAM2_with_pointcloud_map









