Eureka knowledge of the learning process a little note

Eureka failure culling and self-protection


Excluding fail

When our service for any reason (out of memory, network failure, etc.) was not working properly, the service center has not received a registration request service off the assembly line. Equivalent to service providers 'service contract' operations, service registry will create a scheduled task at startup, the default time to time there will be no renewal of the current list of Super Service removed, this operation is called fail culling

Self-protection

When the renewal of a service fails, Eureka recent strength will be statistical service ratio is less than 15 minutes to renew 85%. In a production environment, because the network delay and other reasons, the proportion of heart failure is likely to be exceeded example, but this time put the service list is not removed properly, because the service could not have downtime. Eureka during this time will not eliminate any service instance, until the network returned to normal. This is effective in a production environment to ensure that most services are still available, but it is also possible to obtain a service instance failed, so the service the caller must be prepared to fail fault tolerant services.

To protect themselves by shutting down the following configuration:

eureka:
    server:
        enable-self-preservation: false #关闭自我保护模式(缺省为打开)
复制代码

Guess you like

Origin juejin.im/post/5d551d91518825168d37afca