一. 對比常用的注冊中心
Consul、zookeeper、etcd、eureka、Nacos
Feature |
Consul |
Zookeeper |
Etcd |
Eureka |
Nacos |
服務(wù)健康檢查 |
?服務(wù)狀態(tài),內(nèi)存,硬盤等 |
?(弱)長連接,keepalive |
?連接心跳 |
?可配支持 |
傳輸層?(PING?或?TCP)和應(yīng)用層?(如?HTTP、MySQL、用戶自定義)的健康檢查 |
多數(shù)據(jù)中心 |
?支持 |
?— |
?— |
?— |
支持 |
kv存儲(chǔ)服務(wù) |
?支持 |
?支持 |
?支持 |
?— |
?支持 |
一致性 |
? Raft |
?Paxos |
? Raft |
?— |
Raft |
CAP定理 |
?CP |
?CP |
?CP |
?AP |
CP: 配置中心 AP: 注冊中心 |
使用接口 (多語言能力) |
?支持http和dns |
?客戶端 |
?http/grpc |
?http(sidecar) |
Nacos?支持基于?DNS?和基于?RPC?的服務(wù)發(fā)現(xiàn)。服務(wù)提供者使用?原生SDK、OpenAPI、或一個(gè)獨(dú)立的Agent |
watch支持 |
?全量/支持long polling |
?支持 |
?支持?long polling |
支持?long polling/大部分增量 |
支持?long polling/大部分增量 |
自身監(jiān)控 |
?metrics |
?— |
?metrics |
?metrics |
|
安全 |
?acl /https |
?acl |
?https支持(弱) |
?— |
acl |
Spring Cloud集成 |
?已支持 |
?已支持 |
?已支持 |
?已支持 |
?已支持 |
備注 |
可以作為eureka的替代使用 |
2.0不在更新 |
1. 支持dubbo?文章來源:http://www.zghlxwxcb.cn/news/detail-418516.html 2. spring-cloud-alibaba支持文章來源地址http://www.zghlxwxcb.cn/news/detail-418516.html |
到了這里,關(guān)于微服務(wù)-服務(wù)的注冊與發(fā)現(xiàn)(Consul、zookeeper、etcd、eureka、Nacos)的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!