Netflix Eureka
By Netflix
Eureka is an open-source service discovery server originally built by Netflix to let microservices in a distributed system find and communicate with each other without hardcoded network locations. Services register themselves with a Eureka…
Definition
Eureka is an open-source service discovery server originally built by Netflix to let microservices in a distributed system find and communicate with each other without hardcoded network locations. Services register themselves with a Eureka server on startup and periodically send heartbeats to confirm they are alive, while client services query Eureka to look up the current network addresses of the services they need to call, allowing instances to be added, removed, or relocated without breaking callers.
Overview
In a system built from many independently deployed microservices running on dynamically assigned hosts and ports, especially in cloud environments where instances scale up and down or get replaced frequently, hardcoding a service's address into every caller becomes impossible to maintain. Eureka was built inside Netflix to solve this specific problem as part of its broader move to microservices on AWS, and was later open-sourced as part of the Netflix OSS suite of tools. Eureka operates on a client-server model: a Eureka server maintains a registry of currently available service instances, and each service instance runs a Eureka client that registers its own location on startup and sends periodic heartbeat pings to keep its registration current. If heartbeats stop arriving within a configured window, the server evicts that instance from the registry. Client services also run a Eureka client that periodically fetches and caches the registry locally, so lookups for a service's location are typically served from a local cache rather than requiring a network call to the Eureka server on every request, which improves resilience if the Eureka server itself is temporarily unavailable. Eureka predates and differs from Kubernetes-native service discovery, where DNS-based discovery and the kube-proxy or a service mesh handle this problem transparently at the platform level rather than requiring an application-level client library. It is often deployed alongside other pieces of the Netflix OSS stack, such as Ribbon for client-side load balancing and Hystrix for fault tolerance, forming a full pattern for resilient service-to-service calls in a non-Kubernetes environment, most commonly within Spring Cloud applications via Spring Cloud Netflix. Eureka is used heavily in Java-based microservice architectures built with Spring Boot and Spring Cloud, where the Spring Cloud Netflix project provides straightforward integration through annotations and auto-configuration, letting a service register with Eureka and discover its dependencies with minimal boilerplate code. As the industry moved toward container orchestration platforms like Kubernetes, which provide equivalent service discovery through built-in DNS and service objects, Eureka's role has narrowed to organizations running non-Kubernetes or hybrid deployments, or existing Spring Cloud codebases that have not migrated. Netflix's own OSS stack around Eureka, including Ribbon and Hystrix, is in maintenance mode rather than active feature development, so new projects generally evaluate Kubernetes-native discovery or a service mesh first. Teams maintaining older Spring Cloud systems built around Eureka typically weigh the cost of migrating to Kubernetes-native discovery against simply continuing to operate an already-stable Eureka deployment, since a working registry with no active development need is not automatically worth replacing.
Key Features
- Client-server model with service registration and periodic heartbeats
- Evicts unresponsive instances automatically after missed heartbeats
- Clients cache the registry locally for resilience against server outages
- Deep integration with Spring Boot and Spring Cloud via Spring Cloud Netflix
- Commonly paired with Ribbon for client-side load balancing
- Originated from Netflix's own microservices infrastructure on AWS