当前位置:网站首页>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
边栏推荐
猜你喜欢
FreeRTOS任务基础
[Cloud Native] This article explains how to add Tencent Crane to Kubevela addon
《GB5084-2021》PDF下载
【SSL集训DAY2】Sort【树状数组】
中国SaaS企业排名,龙头企业Top10梳理
数据库优化 | 干货
金仓数据库 KingbaseGIS 使用手册(6.4. 几何对象存取函数)
complete knapsack theory
KingbaseGIS Jin Cang database using manual (6.3. Geometric object creation function)
探索TiDB Lightning源码来解决发现的bug
随机推荐
金仓数据库 KingbaseGIS 使用手册(6.2. 管理函数)
国内十大活跃报表 BI 产品深度对比及点评
技术盛宴!华云数据携六大议题亮相OpenInfra Days China
How to know the computer boot record?
深圳堡垒机厂家有哪些?重点推荐哪家?
高手这样看现货白银走势图
全面解析FPGA基础知识
In-depth understanding of multithreading (Part 1)
FreeRTOS任务基础
CAD 绘制圆角处理
Sqlserver restricts the ip under which accounts can access the database
【诗歌】爱你就像爱生命
2021年国内外五大BI厂商——优秀的商业智能工具推荐
力扣:377. 组合总和 Ⅳ
防火墙之系统防护
ES6 从入门到精通 # 14:迭代器 Iterator 的用法
Force Buckle: 474. Ones and zeros
【mysql】查询今天9点
Sqlserver限制账户在哪些ip下才可以访问数据库
CMake使用记录