当前位置:网站首页>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
边栏推荐
- 70. Stair Climbing Advanced Edition
- What are the Shenzhen fortress machine manufacturers?Which one do you recommend?
- 【mysql】查询今天9点
- Gartner's global integrated system market data tracking, hyperconverged market growth rate is the first
- ECCV 2022 | 微软开源TinyViT :搞定小模型的预训练能力
- ES6 从入门到精通 # 14:迭代器 Iterator 的用法
- AirFlow介绍
- MQTT X Web:在线的 MQTT 5.0 客户端工具
- In-depth understanding of multithreading (Part 1)
- LiveData : Transformations.map and Transformations.switchMap usage
猜你喜欢
随机推荐
A Shanghai technology company was fined 220,000 for brushing orders, exposing the gray industry chain of online brushing
金仓数据库 KingbaseGIS 使用手册(6.5. 几何对象编辑函数)
测试2年,当时身边一起入行的朋友已经月薪20k了,自己还没过万,到底差在了哪里?
【JZOF】77按之字形打印二叉树
基于 RocksDB 实现高可靠、低时延的 MQTT 数据持久化
MVC与MVVM模式的区别
781. 森林中的兔子
FreeRTOS任务基础
framework源码读后感
恭喜获奖得主 | 互动有礼获赠 Navicat Premium
In-depth understanding of multithreading (Part 1)
61.【快速排序法详解】
2022-08-09 mysql/stonedb-subquery performance improvement-introduction
68.qt quick-qml多级折叠下拉导航菜单 支持动态添加/卸载 支持qml/widget加载等
2020年度SaaS TOP100企业名单
tiup cluster scale-out
【C语言】指针和数组的深入理解(第四期)
【诗歌】枕上诗书
位图的基本原理以及应用
Has your phone ever been monitored?