#### 原生service方案 负载均衡,缺乏熔断、限流、灰度 #### service mesh(istio) pod中运行一个从container叫做istio-proxy a、从其他container发送的流量会被pod中的iptables拦截给istio-proxy进程 b、istio进程,解析http的请求,获取Header的host字段 c、istio-proxy了解到host应该转发给那些pod,直接把流量转发给随机目标pod #### 原生service方案 源pod -> service(ip) -> 目标pod #### service mesh(istio) 源pod -> 解析service ip -> iptables redirect流量拦截 -> istio proxy -> pod #### istio怎么到pod中 1、修改deployment yaml,把istio-proxy container、init container配置进去 通过istio-injector命令行修改yaml 2、istio通过webhook自动修改yaml