Eureka
Consul vs. Eureka
Eureka is a service discovery tool. The architecture is primarily client/server, with a set of Eureka servers per datacenter, usually one per availability zone. Typically clients of Eureka use an embedded SDK to register and discover services. For clients that are not natively integrated, a sidecar such as Ribbon is used to transparently discover services via Eureka.
Eureka provides a weakly consistent view of services, using best effort replication. When a client registers with a server, that server will make an attempt to replicate to the other servers but provides no guarantee. Service registrations have a short Time-To-Live (TTL), requiring clients to heartbeat with the servers. Unhealthy services or nodes will stop heartbeating, causing them to timeout and be removed from the registry. Discovery requests can route to any service, which can serve stale or missing data due to the best effort replication. This simplified model allows for easy cluster administration and high scalability.
Consul provides a super set of features, including richer health checking, key/value store, and multi-datacenter awareness. Consul requires a set of servers in each datacenter, along with an agent on each client, similar to using a sidecar like Ribbon. The Consul agent allows most applications to be Consul unaware, performing the service registration via configuration files and discovery via DNS or load balancer sidecars.
Consul provides a strong consistency guarantee, since servers replicate state using the Raft protocol. Consul supports a rich set of health checks including TCP, HTTP, Nagios/Sensu compatible scripts, or TTL based like Eureka. Client nodes participate in a gossip based health check, which distributes the work of health checking, unlike centralized heartbeating which becomes a scalability challenge. Discovery requests are routed to the elected Consul leader which allows them to be strongly consistent by default. Clients that allow for stale reads enable any server to process their request allowing for linear scalability like Eureka.
The strongly consistent nature of Consul means it can be used as a locking service for leader elections and cluster coordination. Eureka does not provide similar guarantees, and typically requires running ZooKeeper for services that need to perform coordination or have stronger consistency needs.
Consul provides a toolkit of features needed to support a service oriented architecture. This includes service discovery, but also rich health checking, locking, Key/Value, multi-datacenter federation, an event system, and ACLs. Both Consul and the ecosystem of tools like consul-template and envconsul try to minimize application changes required to integration, to avoid needing native integration via SDKs. Eureka is part of a larger Netflix OSS suite, which expects applications to be relatively homogeneous and tightly integrated. As a result, Eureka only solves a limited subset of problems, expecting other tools such as ZooKeeper to be used alongside.
Eureka的更多相关文章
- 建立eureka服务和客户端(客户端获取已经注册服务)
1. 新建sping boot eureka server 新建立spring starter project 修改pom.xml文件 在parent后追加 <dependencyManage ...
- Spring-cloud & Netflix 源码解析:Eureka 服务注册发现接口 ****
http://www.idouba.net/spring-cloud-source-eureka-client-api/?utm_source=tuicool&utm_medium=refer ...
- springcloud(第三篇)springcloud eureka 服务注册与发现 *****
http://blog.csdn.net/liaokailin/article/details/51314001 ******************************************* ...
- 微服务架构:Eureka集群搭建
版权声明:本文为博主原创文章,转载请注明出处,欢迎交流学习! 服务注册.发现是微服务架构的关键原理之一,由于微服务架构是由一系列职责单一的细粒度服务构成的网状结构,服务之间通过轻量机制进行通信,这就必 ...
- Eureka的故事,专注能让你看到别人看不到的事情
有这么一句古老的箴言: 如果你手里有一把锤子,所有东西看上去都像钉子. 其实这句话已经是老调中的老调重弹了,我们程序员有很多锤子:OO.设计模式.语言(C, C++, Java, Python, Ru ...
- Spring Cloud Eureka Server 启停状态监控
目前发现如下的api: 当时没有找到文档 http://localhost:8761/eureka/apps 参考文章:(此文中api带有v2我自己试验不需要v2) http://blog.csdn. ...
- Spring Cloud Eureka Server例子程序
Spring-Cloud-Eureka-Server 及Client 例子程序 参考源代码:https://github.com/spring-cloud-samples/eureka 可以启动成功, ...
- Eureka Web UI URL(eureka显示主界面路径设定)
http://stackoverflow.com/questions/30200988/spring-cloud-with-eureka-eureka-web-ui-url ************* ...
- Eureka 的 Application Client client的执行演示样例
上篇以一个 demo 演示样例介绍了 Eureka 的 Application Service 客户端角色.今天我们继续了解 Eureka 的 Application Client 客 ...
- Ribbon 和 Eureka 积分
Ribbon 这是 Netflix 云服务的中间层宣布开放源代码项目,它的主要功能是提供客户机端软件的负载均衡算法,将 Netflix 中间层服务一起. Eureka 是 RESTfu ...
随机推荐
- Java8 Lambda和Stream的用法
package com.zhangxueliang.demo; import java.util.ArrayList; import java.util.List; import java.util. ...
- 运行pip报错:Fatal error in launcher: Unable to create process using '"'
参考: https://blog.csdn.net/cjeric/article/details/73518782
- MySQL 单个表锁死 对查询语句无响应
这个时候应该怀疑读取都被加锁,应该尝试使用 show processlist 查看每一个正在运行的进程. 可以看到这样一个列表,里面有使用者即用户,正在使用数据库的 host, 使用的 db 目前的 ...
- pip 安装 MySQL-python 报错
报错一:EnvironmentError: mysql_config not found 解决:yum install mysql-devel 报错二:Python.h No such file or ...
- Python——Menu控件
一.参数说明: tearoff :分窗,0为在原窗,1为点击分为两个窗口 bg,fg : 背景,前景 borderwidth: 边框宽度 font : 字体 activebackgound ...
- 为WebRTC 应用部署Turn Server
部署WebRTC 或 SIP p2p 方案时经常会遇到p2p 无法穿透的环境, 这时就是TunServer 的用武之地了. 这里我们使用turnserver-0.7.3 下载confuse依赖库 wg ...
- Clover file list
/Volumes/EFI//EFI: total 4 drwxrwxrwx 1 jianweiliu staff 512 Apr 20 12:17 APPLE drwxrwxrwx@ 1 jianwe ...
- BZOJ2219数论之神——BSGS+中国剩余定理+原根与指标+欧拉定理+exgcd
题目描述 在ACM_DIY群中,有一位叫做“傻崽”的同学由于在数论方面造诣很高,被称为数轮之神!对于任何数论问题,他都能瞬间秒杀!一天他在群里面问了一个神题: 对于给定的3个非负整数 A,B,K 求出 ...
- Java大数练习
大数阶乘 题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=28 import java.io.*; import java.util.*; ...
- Odoo
doc 文档 Technical Memento(pdf)是一个简短的参考,有点过时,但仍然不能错过. 目前的官方文档由研发团队积极维护. Nicolas Bessi撰写的新API指南可以提供官方文档 ...