Spring Cloud: High Availability for Eureka
Published in
6 min readFeb 17, 2020
In my previous post, I explained the fundamentals of Service Discovery and Netflix’s Eureka. We implemented a stand-alone Eureka server and a client to understand how Eureka enables service discovery. Having a stand-alone Eureka server is not good enough for a production grade deployment. This piece is aimed at exploring how to make Eureka server highly available and resilient.
Throughout this article, I’m planning to cover the below topics.
- How Eureka Achieves High Availability
- Implementing an Eureka Server with High Availability
- Implementing an Eureka Client
- Starting Up Eureka Server Cluster and Client on Local Machine
How Eureka Achieves High Availability
Eureka achieves high availability at two levels.
- Server Cluster: Eureka can be deployed as a cluster of servers. In case, one of these Eureka servers crash, clients can still connect to the remaining Eureka servers and discover other services.
- Client Side Caching: Clients retrieve and cache registry information from Eureka server. In case all Eureka servers crash, clients still posses the last healthy snapshot of the registry. This is the default behavior of Eureka clients and you don’t have…