Comparison of Spring Cloud with Eureka
I feel Consul.io does better in the following area:
-
The focus on scriptable configuration allows for better container management.
Eureka requires either external Configuration Server or multiple configuration files. -
The options for securing communications is more advanced.
Eureka requires creating application with security settings desired. Default will allow HTTP only. Registration of end points assumes http but can be forced to https with code. -
Support for non-REST endpoints via DNS. This would allow database and other resource connections.
Eureka presumably would do this through ZUUL and/or Sidecar.
- AP (weak consistency), state is replicated with “best effort”
- Services are registered with one server, which attempts to replicate to other servers
- Service registrations have a TTL, and clients must heartbeat
- Reads are routed to any server, can be stale or missing data
- Scales well due to low coordination, especially when server failures relatively rare
- Fails if all servers down
- CP (strong consistency), state is replicated using Raft
- Services registered with any server, but written via Raft to a quorum
- Registrations have complex health checks, including gossip failure detection instead of heartbeating
- Reads routed to any server, consistent by default but stale reads can be requested
- Stale reads scale well, Consistent reads scale to tens of thousands per second
- Consistency offers locking and cluster coordination
- Lots more features (health checking, locking, KV, federation, ACLs)
- Fails if a majority of servers down