DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Evicting Instances From Eureka

Evicting Instances From Eureka

Spring Cloud Eureka's self-preservation tool is great for network problems, but it could keep your instances around when you don't want to. Fortunately, you can fix that.

Ryan Baxter user avatar by
Ryan Baxter
·
Jan. 10, 17 · Tutorial
Like (2)
Save
Tweet
Share
7.97K Views

Join the DZone community and get the full member experience.

Join For Free

Typically, when you are using Spring Cloud Eureka for service discovery and you shut down an instance that is registered with the server, that instance is removed from the registry. However, in some cases, that might not happen, and instead, the instance is just marked as being DOWN. If you look at your Eureka dashboard, you will see something like this.

Eureka Dashboard

Notice one of the RACES services is marked as down and the big red text above the table. You might run into this because, by default, if 85% of instances in Eureka are not sending heartbeats to the Eureka server, then the server will not evict them. When you see this, Eureka has entered what is called “self-preservation mode.”

The good news is you should not be alarmed by this. It is actually Eureka trying to be helpful and by not evicting instances that are not actually down. For example, there could be some network issues preventing instances from sending heartbeat information. Everything is still functioning correctly, so do you really want Eureka to start evicting instances? Probably not. With any luck, the network issues will resolve themselves and heartbeat information will eventually be received by the server.

If for whatever reason you want to turn off self-preservation mode, you can set eureka.server.enableSelfPreservation to false.

Spring Cloud Service discovery Heartbeat (computing) Network News Database Spring Framework Dashboard (Mac OS)

Published at DZone with permission of Ryan Baxter, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How To Build a Spring Boot GraalVM Image
  • The Path From APIs to Containers
  • Best CI/CD Tools for DevOps: A Review of the Top 10
  • 5 Steps for Getting Started in Deep Learning

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: