Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsMay 4, 2026·3 min de lectura

Netflix Eureka — Service Discovery for Cloud Microservices

Eureka is a REST-based service discovery server and client developed by Netflix for locating services in a mid-tier cloud environment for load balancing and failover.

Introduction

Netflix Eureka is a service registry and discovery solution designed for resilient mid-tier load balancing in cloud deployments. Originally built at Netflix to support their microservice architecture, Eureka is now widely used through Spring Cloud Netflix integration. Services register themselves with the Eureka server and discover other services by querying the registry.

What Netflix Eureka Does

  • Maintains a registry of available service instances with health status and metadata
  • Enables client-side service discovery so callers resolve service names to network locations dynamically
  • Supports self-preservation mode to prevent mass de-registration during network partitions
  • Provides a web dashboard showing registered services, their instances, and availability zones
  • Replicates registry state across multiple Eureka server peers for high availability

Architecture Overview

Eureka uses a peer-to-peer replication model where each Eureka server node replicates registrations to all configured peers. Clients fetch the full registry on startup and then receive delta updates every 30 seconds. Each service instance sends heartbeats every 30 seconds; if the server misses three consecutive heartbeats, the instance is evicted. In self-preservation mode, Eureka stops evicting instances when renewal rates drop below a threshold, preventing cascading failures during partial network outages.

Self-Hosting & Configuration

  • Embed Eureka Server in a Spring Boot application with the spring-cloud-starter-netflix-eureka-server dependency
  • Configure peer awareness by listing other Eureka nodes in eureka.client.serviceUrl.defaultZone
  • Set eureka.server.enableSelfPreservation=true in production to handle network partitions safely
  • Tune eureka.instance.leaseRenewalIntervalInSeconds and leaseExpirationDurationInSeconds for your SLA
  • Deploy multiple Eureka instances across availability zones for fault tolerance

Key Features

  • Battle-tested at Netflix scale serving thousands of microservice instances
  • Client-side caching means applications continue discovering services even if Eureka is temporarily unreachable
  • Zone-aware routing directs traffic to instances in the same availability zone for lower latency
  • REST API enables integration with non-Java services for registration and discovery
  • Seamless integration with Spring Cloud ecosystem including Ribbon, Feign, and Zuul

Comparison with Similar Tools

  • Consul — Provides service discovery plus KV store and service mesh, but adds operational complexity with the Raft consensus protocol
  • Apache ZooKeeper — Strong consistency with CP semantics, but harder to operate and less suited for service discovery workloads
  • Nacos — Combines service discovery with configuration management and supports both AP and CP modes
  • etcd — Low-level distributed KV store used by Kubernetes, but requires custom service discovery logic on top

FAQ

Q: Is Eureka still maintained? A: Eureka 1.x is in maintenance mode at Netflix. However, the Spring Cloud Netflix project continues to maintain and release the Eureka integration for Spring Boot applications.

Q: How does Eureka handle network partitions? A: Eureka activates self-preservation mode when heartbeat renewal rates drop below 85%. In this mode it stops evicting instances, preferring stale data over incorrect data, which prevents cascading outages.

Q: Can non-Java services use Eureka? A: Yes. Eureka provides a REST API for registration, de-registration, and querying. Sidecar patterns and community clients exist for Go, Python, and Node.js.

Q: How does Eureka differ from Kubernetes service discovery? A: Kubernetes uses DNS-based discovery tied to its networking model. Eureka provides application-level discovery with health checking and metadata that works outside Kubernetes environments.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados