Istio、Kubernetes和Spring Cloud中服务的比对

k8s vs. istio #

特性 k8s-服务编排,资源调度 istio-流量管理
定义 Service
Deployment
Endpoint
Service
服务版本
服务实例
入口 NodePort
LoadBalance
Ingress
Gateway(LoadBalance Service)
出口 Egress ServiceEntry
服务发现 DNS(CoreDNS)
apiserver + kube-proxy

Pilot + Envoy
服务路由 VirtualService
熔断&监控检查 容器:存活探针
服务:就绪探针
DestinationRule
负载均衡 DestinationRule
生命周期管理
故障迁移,自愈
伸缩
原生 基于k8s
有状态调度 StatefulSet Operator(CRD+Controller)
配置管理 ConfigMap & Secrets
灰度 Deployment:滚动升级
最佳实践:两个Deployment
VirtualService
多集群 Federation 1. 多控制面
2.集群感知单控制面(Split Horizon EDS)

spring Cloud vs. spring Cloud alibaba vs. istio #

特性 spring Cloud-服务治理
(Chassis模式)
spring Cloud alibaba-Paas全栈 istio组件-流量管理
(SideCar模式)
治理-Resilience & Fault Tolerance Hystrix
白盒,代码有侵入
熔断(有半开状态)
隔离仓
sentinel Envoy
黑盒,代码无侵入
异常点检查(逐出,重试)(无半开状态)
连接池
监控-Distributed Tracing Sleuth/zipkin zipkin Mixer
监控-Centralized Metrics Spectator/Atlas Mixer
监控-Centralized Logging ELK Mixer
流量管理-API Gateway Gateway/Zuul gateway Gateway
流量管理-Load Balancing OpenFeign/Ribbon dubbo Pilot + Envoy
治理-Service Discovery Eureka,Consul dubbo Pilot + Envoy xDS
治理-Routing Zuul dubbo Pilot + Envoy xDS
治理-Service-to-service calls dubbo Pilot
治理-Configuration Management Config/Consul Nacos Calley
流量管理-故障注入 x iptables
流量管理-灰度发布 Nepxion Discovery等 非原生 原生支持
流量管理-异地容灾 x x 集群感知

Istio Gateway vs. 阿里云Ingress Controller vs. NGINX Ingress Controller[4] #

特性 Istio Gateway 阿里云Ingress Controller NGINX Ingress Controller
根据HTTP Header选择路由规则 支持 仅支持单个Header,不支持多个Header组合 不支持
Header规则支持正则表达式 支持 支持 不支持
服务之间设置权重拆分流量 支持 支持 不支持
Header和权重规则组合使用 支持 支持 不支持
路由规则检查 支持 不支持 不支持
路由规则粒度 service下的不同pod service service
支持的协议 HTTP1.1/HTTP2/gRPC/TCP
/Websockets/MongoDB
HTTP1.1/HTTP2/gRPC
/TCP/Websockets
HTTP1.1/HTTP2/gRPC
/TCP/Websockets

SpringCloud With Kubernetes[3] #

SpringCloud With Kubernetes

SpringCloud .vs Kubernetes[3] #

SpringCloud .vs Kubernetes

参考 #

  1. 《分布式系统的技术栈》 左耳听风
  2. 厉害了,Spring Cloud Alibaba 发布 GA 版本!
  3. 一篇囊括微服务服务拆分的一切:前提,时机,方法,规范,选型
  4. Istio Gateway与Kubernetes Ingress Controller对比 灰度例子
    1xx. Service Mesh 高可用在企业级生产中的实践 百度 罗广明 未
    Service Mesh与Spring Cloud的结合