开源微服务框架,你知道几个?
è¯çäº 2014 å¹´ç“å¾®æå¡æ¶æ”ï¼å¶ææ³ç»ç± Martin Fowler éè¿°åï¼å¨è¿å å¹´æç»åå°éè§ï¼ç论ä¸ç¸å³å®è·µé½ä¸æåå±ï¼ç®åå®å·²ç»æ为äºä¸»æµè½¯ä»¶æ¶æ模å¼ã
å³äºå¾®æå¡æ¶ææ¯ä»ä¹ï¼æ²¡æä¸ä¸ªæç¡®çå®ä¹ï¼æ¯ä¸ªå®è·µèæèªå·±çç解ï¼ä½æ¯æ人ç»åºçä¸ä¸ªå¬å¼å¼å¾æèï¼
å¾®æå¡æ¶æ = 80% ç SOA æå¡æ¶æææ³ + 100% çç»ä»¶åæ¶æææ³ + 80% çé¢å建模ææ³
å¾®æå¡æ¶æçä¼ç¹å¾å¤ï¼æ¯å¦å®è§£è¦ä¸å¡ï¼æä¾æ´é«ççµæ´»æ§ï¼å许å¨æå¡é¢ç¹åççåæ¶ä¿æç³»ç»å¶å®é¨åçå¯ç¨æ§ä¸ç¨³å®æ§;解è¦ç¼ç¨è¯è¨ï¼é对ä¸åä¸å¡å¯ä»¥ä½¿ç¨æ´å åéçè¯è¨è¿è¡å¼å;解è¦å¼åå¢éï¼ä¸åå¢éåèªè´è´£ä¸ä¸ªå¾®æå¡ï¼äºä¸å½±åï¼å é交ä»ã
å³äºå¾®æå¡æ¶æï¼ç½ä¸èµæç¸å½å¤(å 为ç°å¨å¾ç«ï¼å家é½æå®è·µæ¡ä¾å享)ï¼è¯»èå¯ä»¥å¦è¡æ¥éï¼è¿éä¸èµè¿°ã
ä¸è¾¹ä¸ºå¤§å®¶å举äºå½åæ为ç«çï¼æ常被人æåçå¼æºå¾®æå¡å¼åæ¡æ¶ï¼å¸æ对å¼åèæä¸å®ç帮å©(ç¹å»é¡¹ç®åï¼å¯ä»¥ç´æ¥è·³è½¬ä»ç»é¡µ)ï¼
Spring Cloud
Spring Cloud 为å¼åèæä¾äºåå¸å¼ç³»ç»é置管çãæå¡åç°ãæè·¯å¨ãæºè½è·¯ç±ã微代çãæ§å¶æ»çº¿ãä¸æ¬¡æ§ Tokenãå¨å±éãå³çç«éãåå¸å¼ä¼è¯ä¸é群ç¶æççå¼åå·¥å·ãä½¿ç¨ Spring Cloud å¼åèå¯ä»¥å¿«éå®ç°ä¸è¿°è¿äºæ¨¡å¼ã
Eclipse MicroProfile
Eclipse MicroProfile æ¯ä¸ä¸ª Java å¾®æå¡å¼åçåºç¡ç¼ç¨æ¨¡åï¼å®è´åäºå®ä¹ä¼ä¸ Java å¾®æå¡è§èï¼MicroProfile æä¾ææ ãAPI ææ¡£ãè¿è¡ç¶åµæ£æ¥ã容éä¸åå¸å¼è·è¸ªçè½åï¼ä½¿ç¨å®å建çäºåçå¾®æå¡å¯ä»¥èªç±å°é¨ç½²å¨ä»»ä½å°æ¹ï¼åæ¬ Service Mesh æ¶æï¼å¦ Istioã
Dubbo
Dubbo æ¯é¿éå¼æºçä¸æ¬¾é«æ§è½ RPC æ¡æ¶ï¼ç¹æ§åæ¬åºäºéææ¥å£ç RPCãæºè½è´è½½åè¡¡ãèªå¨æå¡æ³¨åååç°ãå¯æ©å±æ§é«ãè¿è¡æ¶æµéè·¯ç±ä¸å¯è§åçæå¡æ²»çã
Tars
Tars æ¯è¾è®¯å°å¶åé¨ä½¿ç¨çå¾®æå¡æ¡æ¶ TAF(Total Application Framework)å¤å¹´çå®è·µæææ»ç»èæçå¼æºé¡¹ç®ï¼å¨è¾è®¯åé¨æä¸ç¾ä¸ªäº§å使ç¨ï¼æå¡åé¨æ°åå C++ãJavaãGolangãNode.Js ä¸ PHP å¼åèãå¶åå«ä¸æ´å¥å¼åæ¡æ¶ä¸ç®¡çå¹³å°ï¼å¼é¡¾å¤è¯è¨ãæç¨æ§ãé«æ§è½ä¸æå¡æ²»çï¼ç念æ¯è®©å¼åæ´èç¦ä¸å¡é»è¾ï¼è®©è¿è¥æ´é«æã
Helidon
Helidon æ¯ç²éª¨æå¼æºçä¸ä¸ªå¾®æå¡æ¡æ¶ï¼ç¼åçå¾®æå¡è¿è¡å¨ç± Netty æä¾æ¯æçå¿«é Web åæ ¸ä¸ã
SOFAStack
SOFAStack™(Scalable Open Financial Architecture Stack)æ¯ç±èèéæå¼æºçä¸å¥ç¨äºå¿«éæ建éè级åå¸å¼æ¶æçä¸é´ä»¶ï¼ä¹æ¯å¨éèåºæ¯éé¤ç¼åºæ¥çæä½³å®è·µã
gRPC
gRPC æ¯è°·æå¼æºçé«æ§è½éç¨ RPC æ¡æ¶ãgRPC åºäº HTTP/2 æ å设计ï¼å¸¦æ¥è¯¸å¦ååæµãæµæ§ã头é¨å缩ä¸å TCP è¿æ¥ä¸çå¤è·¯å¤ç¨è¯·æ±çç¹æ§ï¼è¿äºç¹æ§ä½¿å¾å¶å¨ç§»å¨è®¾å¤ä¸è¡¨ç°æ´å¥½ï¼æ´ççµåèç空é´å ç¨ã
Thrift
Thrift æ¯ä¸ä¸ª RPC æ¡æ¶ï¼ç¨æ¥å¼åå¯æ©å±ä¸è·¨è¯è¨çæå¡ãå®ç»åäºåè½å¼ºå¤§ç软件å æ å代ç çæå¼æï¼ä»¥æ建å¯ä»¥å¨ C++ãJavaãPythonãPHPãRubyãErlangãPerlãHaskellãC#ãCocoaãJavaScriptãNode.jsãSmalltalk ä¸ OCaml çè¯è¨é´æ ç¼ç»åçãé«æçæå¡ã
brpc
brpc æ¯ç¾åº¦åé¨æ常使ç¨çå·¥ä¸çº§ RPC æ¡æ¶ï¼æ 1000 000+ 个å®ä¾(ä¸åå« client)åä¸åç§æå¡ï¼å¨ç¾åº¦åå«å“baidu-rpc”ï¼ç®ååªå¼æºäº C++ çæ¬ã
ä¸è¾¹ååºç主è¦æ¯ä¸äºå¾®æå¡æ¶æçå¼åæ¡æ¶æèä¸å¾®æå¡æ¶æè³å³éè¦ç RPC æ¡æ¶ï¼èå¶å®å¾®æå¡åæ¶åå°åå¸å¼ï¼è¿åä¼æ¶åå°åç§åæ ·çä¸é´ä»¶ï¼æ°é太è¿äºåºå¤§ï¼ä¸ååè®®å§ã
ä½æ¯æä¸ä¸ªæ¹é¢æ¯ä¸å®è¦å¨è¿éæåºæ¥çï¼é£å°±æ¯ Service Meshãç°å¨æå°å¾®æå¡æ¶æï¼ä¸è¬é½ä¼æ¶åå° Service Mesh çç¸å³å容ï¼Service Mesh 被èªä¸º“ä¸ä¸ä»£å¾®æå¡æ¶æ”ï¼å®æºäºå¯¹æ©æçæå¡ä»£çæ¨¡å¼ Sidecar çæ©å±ï¼å¶ç念è½ç¶ç±æ¥å·²ä¹ï¼ä½æ¯ç´å°è¿ä¸¤å¹´éçå¾®æå¡çç«éå´èµ·å Buoyant å建 Linkerd 并å°å¶éæ°æ¼ç»ï¼æéæ¸ä»¥å´æ°ç姿æåç°ç»ä¸äººã
Service Mesh éç¹å¨ Meshï¼å®å¨ Sidecar çåºç¡ä¸ï¼å¼ºè°äºå个代çä¹é´å½¢æçææºç½ç»ã以éç¨ç»ä»¶çå½¢å¼ç®¡æ§ç³»ç»ä¸æææå¡éä¿¡æµéï¼åæ¶ä¸æ²äºå¾®æå¡å¼åçææ¯æ ï¼å¯ä»¥åå°è¯è¨æ å³ãåè½å¯æ©å±ã
éè¿ä¸ä¸ªç½æ ¼ï¼Service Mesh å¯ä»¥å°æå¡æ²»ççå个é¨åãå¾®æå¡æ¶æ建设ä¸çå个ç¯èé½ä¸æ延ç³ï¼æç»æ为ä¸å¥å¾®æå¡å¼åå®å¨è§£å³æ¹æ¡ã
è¿éä¹ååºå 个ç®åå¨ Service Mesh é¢å稳å主æµå°ä½çå¼æºé¡¹ç®ï¼
Linkerd
Linkerd æ¯ä¸ä¸ªæä¾å¼¹æ§äºç«¯åçåºç¨ Service Mesh çå¼æºé¡¹ç®ï¼ä¹æ¯é¢åå¾®æå¡çå¼æº RPC 代çï¼å®çæ ¸å¿æ¯ä¸ä¸ªéæ代çã
Envoy
Envoy æ¯å¼æºçè¾¹ç¼åæå¡ä»£çï¼ç¨äºäºåçåºç¨ï¼å¶æåæ¯å¨ Lyft æ建çï¼å®æ¯ä¸ºåä¸æå¡ååºç¨ç¨åºè®¾è®¡çé«æ§è½ C++ åå¸å¼ä»£çï¼ä»¥å为大åå¾®æå¡ Service Mesh æ¶æ设计çéä¿¡æ»çº¿åéç¨æ°æ®å¹³é¢ã
Istio
Istio 项ç®è½å¤ä¸ºå¾®æå¡æ¶ææä¾æµé管çæºå¶ï¼åæ¶äº¦ä¸ºå¶å®å¢å¼åè½(åæ¬å®å¨æ§ãçæ§ãè·¯ç±ãè¿æ¥ç®¡çä¸çç¥ç)åé äºåºç¡ãè¿æ¬¾è½¯ä»¶å©ç¨ä¹ç»èéªç Lyft Envoy 代çè¿è¡æ建ï¼å¯å¨æ é对åºç¨ç¨åºä»£ç ä½åºä»»ä½åå¨çåæä¸å®ç°å¯è§æ§ä¸æ§å¶è½åã
Conduit
Conduit æ¯ä¸ä¸ª Kubernetes çè¶è½»é级 Service Meshï¼å¶ç®æ æ¯æ为æå¿«ãæè½»ãæç®å并ä¸æå®å¨ç Service Meshãå®ä½¿ç¨ Rust æ建äºå¿«éãå®å¨çæ°æ®å¹³é¢ï¼ç¨ Go å¼åäºç®å强大çæ§å¶å¹³é¢ï¼æ»ä½è®¾è®¡å´ç»çæ§è½ãå®å¨æ§åå¯ç¨æ§è¿è¡ãå®è½éæå°ç®¡çæå¡ä¹é´çéä¿¡ï¼æä¾å¯æµæ§ãå¯é æ§ãå®å¨æ§åå¼¹æ§çæ¯æãè½ç¶ä¸ Linkerd ç¸ä»¿ï¼æ°æ®å¹³é¢æ¯å¨åºç¨ä»£ç ä¹å¤è¿è¡çè½»é级代çï¼æ§å¶å¹³é¢æ¯ä¸ä¸ªé«å¯ç¨çæ§å¶å¨ï¼ç¶èä¸ Linkerd ä¸åçæ¯ï¼Conduit ç设计æ´å å¾åäº Kubernetes ä¸çä½èµæºé¨ç½²ã
注ï¼å¨åå¸ 0.5 çæ¬åï¼åç» Conduit å·²ç»æ´åå°äº Linkerd 2ï¼è¯¦ææ¥çï¼
Conduit 0.5 æ为ç»æ²ï¼åç»å¹¶å¥ Linkerd 2.0
对 Service Mesh ç建设å¶å®å·²ç»æ为å½åçä¸åå±è¯ï¼ä»ä¸è¾¹è¿äºé¡¹ç®é½å¨å¾è¿ä¸ªæ¹åä¸æ¼è¿å°±å¯ä»¥å¤§è´ææä½ä¼ï¼
WeiboMesh
Motan æ¯æ°æµªå¾®åå¼æºçæ¯ä¸å¥é«æ§è½ãæäºä½¿ç¨çåå¸å¼ RPC æ¡æ¶ï¼åæ¥å¨ Motan Agent çåºç¡ä¸æ¼ååºäº WeiboMeshãWeiboMesh ååæå¡æ²»çæ¹åï¼åæ¶æä¾æå¡çå¨æ管çè½åï¼å¦æå¡é级ãå¨æéç½®ãæé管çãæ°æ®ééä¸æå¡æ令å¤ççã
Dubbo Mesh
Dubbo å¨ v3 ä¸åå± Service Meshï¼å®æ¹å¸æ Dubbo Mesh è¿å¥ Envoy 社åºï¼ç®å Dubbo å议已ç»è¢« Envoy æ¯æï¼æ°æ®å±éåãè´è½½åè¡¡åæå¡æ²»çæ¹é¢çå·¥ä½è¿å¨ç»§ç»ï¼æ§å¶å±ç®åå¨ä¸°å¯ Istio/Pilot-discoveryã
SOFAMOSN
MOSN æ¯ SOFAStack çç»ä»¶ï¼å®ä¸æ¬¾éç¨ Go è¯è¨å¼åç Service Mesh æ°æ®å¹³é¢ä»£çï¼åè½åå®ä½ç±»ä¼¼ Envoy ï¼æ¨å¨æä¾åå¸å¼ï¼æ¨¡ååï¼å¯è§å¯ï¼æºè½åç代çè½åãMOSN æ¯æ Envoy å Istio ç API ï¼å¯ä»¥å Istio éæã
nginMesh
nginMesh æ¯ NGINX å¼æºç Service Mesh æ¹æ¡ï¼å®æä¾åºäº NGINX ç Service Mesh å®ç°ãnginMesh ä¸ Istio å¼å®¹ï¼å©ç¨ NGINX å®ç° Sidecar 代çï¼éæå¨ Istio ä¸ï¼å¯ä»¥æ åãå¯é åå®å¨çæ¹å¼ä¿è¿æå¡ä¹é´çéä¿¡ã
注ï¼nginMesh 项ç®ç®åå·²ç»ä¸å积æå¼åã
MicroProfile Service Mesh
MicroProfile Service Mesh æ¯ MicroProfile ç Service Mesh è§èãMicroProfile å®ä¹äºç¨äºå¼åäºåçå¾®æå¡çä¸ç³»åè§èï¼æ¬è´¨ä¸å®ä¹æ¯ä¸º Istio èççå¾®æå¡ç¼ç¨æ¨¡åï¼è Istio æ¬èº«å°±æ¯ Service Mesh ç代åè¯ãæ¤è§èå³æ³¨ Service Meshï¼å¹¶ä¸æ´å¤å°èç¦äº Istioã
Ambassador
Ambassador æ¯ä¸ä¸ªåºäº Envoy æ建ç Kubernetes åç API ç½å³ï¼ä¸ä¸ºå¾®æå¡è设计ï¼å®æ¬è´¨ä¸æ¯ä¸ä¸ª Envoy å¥å£æ§å¶å¨ï¼ä½å·ææ´å¤åè½ï¼åæ¬æ¯æ gRPCãHTTP/2 ä¸ WebSocketsï¼æ¯æ CORSãè¶æ¶ãå æ轮询è°åº¦ãç²æ§ä¼è¯ä¸éçéå¶çã
Gloo
Gloo æ¯ä¸ä¸ªåºäº Envoy ç Kubernetes åçå¥å£æ§å¶å¨åä¸ä¸ä»£ API ç½å³ãGloo å¨å½æ°çº§è·¯ç±æ¹é¢è¡¨ç°åè¶ï¼å®æ¯æä¼ ç»åºç¨ç¨åºãå¾®æå¡ä¸ ServerlessãGloo 设计ç¬ç¹ï¼å¯æ¯ææ··ååºç¨ï¼å¶ä¸çå¤ç§ææ¯ãæ¶æãåè®®åäºå¯ä»¥å±åã
Kong
Kong å¨ 1.0 GA çæ¶å带æ¥äº Service Mesh è½åï¼ç¨æ·ä¸ä»å¯ä»¥å° Kong é¨ç½²ä¸º API ç½å³ï¼è¿å¯ä»¥å°å¶é¨ç½²ä¸ºç¬ç«ç Service Mesh 代çãKong æ件è½ä¸º Service Mesh æä¾å¼ç®±å³ç¨çå³é®åè½ï¼å¹¶è½ä¸å¶å®äºåçææ¯éæï¼åæ¬ PrometheusãZipkinãå¥åº·æ£æ¥ãcanary æµè¯ä¸è绿æµè¯çã
Consul Connect
Connect æ¯ Consul ä¸ç Service Mesh æ¹æ¡ï¼å®å¯ä»¥èªå¨å°ä»»ä½ç°æç Consul 群é转æ¢ä¸º Service Mesh 解å³æ¹æ¡ãConnect éè¿èªå¨ TLS å å¯ååºäºèº«ä»½ç认è¯å®ç°å®å¨çæå¡å°æå¡éä¿¡ã