Back to blog

// OSSeva Blog

Operations

Consul vs Eureka (and ZooKeeper) for Service Discovery in Spring Cloud

Matt Reynolds8 min read

The short answer

Eureka is a service registry; Consul is a service networking platform. Eureka does one job: Java services register over REST, send heartbeats, and fetch the registry into a local cache, while Eureka servers replicate the registry to each other and keep it in memory with no back-end store. Consul keeps its catalogue in a Raft-replicated store on a set of server nodes, runs health checks, answers DNS lookups so applications need no client library, and adds a key/value store, multi-datacenter support and a service mesh. Choose Eureka when every service is a Spring Boot application and you want the simplest registry that works. Choose Consul when services are written in several languages, when you want DNS-based discovery, configuration and discovery in one system, or a service mesh. Before choosing Consul, check the licence: releases from 1.17.0 are under the Business Source License, not MPL 2.0. If you run on Kubernetes, you may not need either.

Consul vs Eureka vs ZooKeeper at a glance

Netflix EurekaHashiCorp ConsulApache ZooKeeper
What it isREST-based service registryService networking: discovery, health checks, KV, meshGeneral coordination service
How state is keptIn memory; servers replicate to peers; no back-end storeRaft log on server nodes, with quorumReplicated ensemble with quorum
LivenessClient heartbeats, every 30 seconds by defaultHealth checks reported by Consul agentsEphemeral nodes tied to client sessions
Discovery interfaceREST API and Java clientHTTP API and DNSClient library (Apache Curator in Spring Cloud)
Configuration storeNoneKey/value storeZnodes
Spring Cloud moduleSpring Cloud Netflix (5.0.2)Spring Cloud Consul (5.0.3)Spring Cloud Zookeeper (5.0.2)
LicenceApache 2.0MPL 2.0 to 1.16.3; BSL 1.1 from 1.17.0Apache 2.0

How Eureka works

Netflix describes Eureka as a RESTful service used mainly in AWS for discovery, load balancing and failover of middle-tier servers. A Spring Boot application with the Eureka client starter registers itself with metadata such as host, port and health URL, and then sends a heartbeat, by default every 30 seconds. If heartbeats stop, the instance is normally removed from the registry. Clients fetch the registry and keep it in an in-memory cache, so a lookup does not need a call to the server each time. The Spring Cloud documentation is explicit that the Eureka server has no back-end store: registrations live in memory and are rebuilt from heartbeats, and servers configured as peers replicate registry state to each other. That design keeps Eureka simple and keeps clients working when a server is briefly unavailable, at the cost of a registry that can be briefly out of date.

Eureka itself lives in the Netflix GitHub repository under Apache 2.0, with the 2.0.x line current (2.0.6, March 2026), and the README describes support as "community-driven mostly". In Spring, Eureka is used through Spring Cloud Netflix, which today lists service discovery as its feature set: the Eureka client and an embedded Eureka server you start with @EnableEurekaServer.

How Consul works

Consul servers form a Raft peer set in each datacenter, and every change, from a service registration to a key/value update, is a log entry agreed by a quorum. Services register with the Consul agent, client agents report node and service health to the servers, and the catalogue answers queries over HTTP or DNS. HashiCorp recommends DNS for discovery because the application does not need to change at all. On top of discovery, Consul provides a key/value store, multi-datacenter operation and a service mesh with proxies. That breadth is the reason to choose it, and also the reason it takes more to run than Eureka.

Spring Cloud Consul connects Spring Boot applications to a local Consul agent for service discovery, uses the key/value store for distributed configuration, and offers a control bus over Consul events. One Consul cluster can therefore serve both discovery and configuration.

The Consul licence and support dates

HashiCorp moved Consul from MPL 2.0 to the Business Source License 1.1 with 1.17.0; releases up to 1.16.3 remain MPL 2.0, and each BSL version converts to MPL 2.0 four years after it is published. Since 18 March 2026 the licence names IBM as licensor. Support windows are short: 1.18 LTS ended on 30 April 2026, 1.22 ends on 31 October 2026, 1.21 LTS runs to 30 April 2027 and 2.0.x to 30 April 2028. If your policy rules out BSL software, your Consul options are the MPL lines up to 1.16.3, which no longer receive upstream fixes, or a different registry. Our post on Consul end of life under the BSL and IBM covers this in detail.

Where ZooKeeper fits

ZooKeeper is a general coordination service rather than a service registry, but Spring Cloud Zookeeper uses it for both service discovery and distributed configuration through Apache Curator. It makes sense when you already run a ZooKeeper ensemble, for example for older Kafka, Solr, HBase or Hadoop clusters, and want to avoid adding another system. It has no DNS interface, and liveness comes from ephemeral znodes that disappear when the client session ends rather than from health checks. ZooKeeper 3.8 and 3.9 are maintained upstream; 3.7 and older are end of life. For a comparison of coordination stores, see ZooKeeper vs etcd vs Consul vs KRaft.

Consul vs Eureka for Spring Cloud

Both plug into the same Spring Cloud abstraction. With @EnableDiscoveryClient and the matching starter, application code that looks up services through Spring Cloud's DiscoveryClient and Spring Cloud LoadBalancer works with either, so switching is mostly a dependency and configuration change. Spring Cloud Netflix 5.0.x and Spring Cloud Consul 5.0.x both ship with the 2025.1 release train, which spring.io lists in open source support until 31 July 2027; the 4.3.x lines left open source support on 30 June 2026. On Kubernetes, Spring Cloud Kubernetes implements the same interfaces on top of Kubernetes services, and spring.io notes that you do not need it at all to run Spring Boot on Kubernetes.

Which should you choose?

  • Choose Eureka when all services are Spring Boot applications, you want a registry with nothing else attached, and short windows of stale registry data are acceptable.
  • Choose Consul when services span several languages, you want DNS-based discovery, agent-based health checks, configuration in the same system, multiple datacenters or a service mesh, and your licence policy accepts BSL 1.1 or you plan for it.
  • Choose ZooKeeper when you already operate an ensemble and want Spring Cloud discovery and configuration without another component.
  • Choose Kubernetes service discovery when everything already runs on Kubernetes; a separate registry may add nothing.

Where OSSeva fits

OSSeva does not support Netflix Eureka or Spring Cloud Netflix. For Consul, OSSeva for HashiCorp Consul ships patched, signed builds of the MPL 2.0 releases, 1.16.3 and earlier, so a cluster on those lines is secured without an upgrade. OSSeva does not redistribute modified BSL code: for 1.17 and later, OSSeva plans and runs a supported upgrade to a maintained release, or a migration of coordination to etcd or Kubernetes where that fits better; see Consul extended support. OSSeva for Apache ZooKeeper patches 3.4 through 3.7 and covers 3.8 and 3.9, and OSSeva for Spring Boot covers the applications that use any of these registries. Everything is priced per cluster. Book a discovery call for a quote. For other options, see Consul support providers.

Frequently asked questions

What is the difference between Consul and Eureka?

Eureka is a service registry: services register over REST and send heartbeats, and servers keep the registry in memory and replicate it to peers. Consul is a wider service networking tool with a Raft-replicated catalogue, agent-based health checks, DNS lookups, a key/value store and a service mesh.

Consul vs Eureka in Spring Cloud: which should I use?

Use Spring Cloud Netflix with Eureka if every service is Spring Boot and you only need discovery. Use Spring Cloud Consul if you also want distributed configuration, DNS-based discovery for non-Java services, or a service mesh. Both implement the same DiscoveryClient interface, so the application code barely changes.

Consul vs Eureka vs ZooKeeper: how do they compare?

Eureka is the simplest, a Java registry with in-memory state. Consul is the broadest, with a quorum-backed catalogue, health checks, DNS, key/value and mesh, under BSL from 1.17.0. ZooKeeper is a general coordination service that Spring Cloud Zookeeper can use for discovery and configuration, which suits teams that already run it.

Is Eureka still maintained?

Yes. Netflix publishes Eureka on GitHub, with 2.0.6 released in March 2026, and describes support as mostly community-driven. Spring Cloud Netflix 5.0.x, which provides Eureka for Spring Boot, has open source support until 31 July 2027 according to spring.io.

Is Consul still open source?

Consul releases up to 1.16.3 are MPL 2.0. From 1.17.0 Consul is under the Business Source License 1.1 instead, and each BSL release converts to MPL 2.0 four years after publication.

Does OSSeva support Eureka?

No. OSSeva supports Consul, ZooKeeper, etcd and Spring Boot, but not Eureka or Spring Cloud Netflix.

Tags

ConsulEurekaZooKeeperSpring CloudComparisonService Discovery

Ready to get your open source under control?

Talk to an OSSeva engineer about CVE coverage, compliance, and migration support for your stack.