当前位置:网站首页>Eureka protects itself
Eureka protects itself
2022-08-10 00:55:00 【a breezy】
Overview
Protected Mode is mainly used for a set of clients and Eureka ServerThere is protection in network partition scenarios.Once in protected mode,
Eureka Server will try to protect the information in its service registry and will not delete the data in the service registry, that is, it will not log out of any microservices.
如果在Eureka Server的首页看到以下这段提示,则说明Eureka进入了保护模式:
EMERGENCY! EUREKA MAY BE INCORRECTLY CLAIMING INSTANCES ARE UP WHEN THEY'RE NOT.
RENEWALS ARE LESSER THAN THRESHOLD AND HENCE THE INSTANCES ARE NOT BEING EXPIRED JUST TO BE SAFE
Why does the Eureka self-protection mechanism occur?
In order to prevent EurekaClient from running normally, but in case of network failure with EurekaServer, EurekaServer will not immediately remove the EurekaClient service
What is Self Protection Mode?
By default, if EurekaServer does not receive a heartbeat from a microservice instance within a certain period of time, EurekaServer will log out the instance (default90 seconds).However, when a network partition failure occurs (delay, freeze, congestion), the microservice and EurekaServer cannot communicate normally, and the above behavior may become very dangerous-because the microservice itself is actually healthy, it is not at this time.This microservice should be logged out.Eureka solves this problem with "self-protection mode" - when the EurekaServer node loses too many clients in a short period of time (A network partition failure may have occurred), then the node will enter self-protection mode.
Configuration code modification instructions
By default, the self-protection mechanism is enabled
eureka.server.enable-self-preservation=true
Use eureka.server.enable-self-preservation=false to disable self-preservation mode
Turn off effects:
server:#Close the self-protection mechanism to ensure that unavailable services are kicked out in timeenable-self-preservation: falseeviction-interval-timer-in-ms: 2000
instance:#The time interval between the Eureka client sending the heartbeat to the server, in seconds (the default is 30 seconds)lease-renewal-interval-in-seconds: 1#The upper limit of the waiting time for the Eureka server after receiving the last heartbeat, in seconds (the default is 90 seconds), the timeout will eliminate the servicelease-expiration-duration-in-seconds: 2
边栏推荐
猜你喜欢
【SSL集训DAY2】有趣的数【数位DP】
Travel with Shengteng: See all the AI attractions in Jinling City in one day
Mysql/stonedb - slow SQL - 2022-08-09 Q16 analysis
2020年度SaaS TOP100企业名单
带着昇腾去旅行:一日看尽金陵城里的AI胜景
ES6 从入门到精通 # 15:生成器 Generator 的用法
多商户商城系统功能拆解24讲-平台端分销会员
【集训DAY3】中位数
多商户商城系统功能拆解25讲-平台端分销申请
SRv6 performance measurement
随机推荐
国内十大活跃报表 BI 产品深度对比及点评
外包的水有多深?腾讯15k的外包测试岗能去吗?
Filament - Material basic graphics drawing
【诗歌】爱你就像爱生命
如何正则匹配乱码?
AirFlow介绍
领跑政务云,连续五年中国第一
【云原生】Kubernetes编排工具精讲
conda新建环境时报错NotWritableError: The current user does not have write permissions
SRv6 performance measurement
Cmake 用法记录
【mysql】查询今天9点
2022-08-09 mysql/stonedb-subquery performance improvement-introduction
781. 森林中的兔子
How to match garbled characters regularly?
什么是平面文件数据库? 如何导入多种格式的文件:DSV、JSON、XML?
A Shanghai technology company was fined 220,000 for brushing orders, exposing the gray industry chain of online brushing
【SSL集训DAY3】控制棋盘【二分图匹配】
【JZOF】82二叉树中和为某一值的路径(一)
tiup cluster stop