Eureka Eureka articles [three] self-protection mechanism (3)

1. Self-protection mechanisms demo

eureka frequently modified micro service name, it can occur following phenomenon:

2. What is a self-protection mode?

By default, if a heartbeat is not received EurekaServer a widget service instance within a certain time, the cancellation will EurekaServer instance (default 90 seconds). But when the network partition failure, between micro and EurekaServer service can not communicate, above behaviors may become very dangerous - because micro service itself is actually healthy, then this should not be written off this micro-services. Eureka to solve this problem through the "limp home mode" - when EurekaServer node losing too much in a short time a client (network partition failure may have occurred), then the node goes into self-preservation mode. Once in this mode, EurekaServer will protect the information service in the registry, delete data no longer service registry (which is not written off any micro-services). When the network fault recovery, the Eureka Server node will automatically exit the self-protection mode.

In the self-protection mode, Eureka Server service will protect the information in the registry, no cancellation of any service instance. When it receives the heart rate restored to above the threshold, the Eureka Server node will automatically exit the self-protection mode. Its design philosophy is rather reserved the wrong service registration information, do not blindly write off any possible health service instance. Sentence to explain: Live Is Better Than To Die

In summary, the self-protection mode is a security measure to respond to network anomalies. Its architecture is rather philosophy while retaining all micro-services (health services and unhealthy micro-micro services will be kept), nor blindly cancellation of any healthy micro-services. Use self-protection mode, allowing Eureka clusters more robust and stable.

 Bottom line: a certain time a service is not available the micro, eureka not clean up immediately, will still save the information service of the micro.

 

Guess you like

Origin www.cnblogs.com/myitnews/p/11620471.html