 Envoy原理介绍及线上问题踩坑reserved. Page 11 Envoy网络及线程模型 主线程 初始化 日 志 线 程 读 取 配 置 x D S 监 听 网络事件 启 动 工 作 线 程 定时器事件 a d m i n 请 求 X D S 更 新 合 并 s t a t 刷 新 D N S 调度器 工作线程 网络事件 定时器事件 监 听 器 监 听 过 滤 器 释 放 内 存 记 录 s t 进行连接负载均衡处理后,选择最终的业务监听器处理新连接。 • 之后对于此连接的所有处理都在此线程进行,包括下游数据集解码,路由选择、上游数据编 码发送等。 • 同时此工作线程还要处理定期观测信息与主线程同步(通过异步加回调)、线程内配置及集 群管理器状态更新等工作。 • 请求完成后延迟释放内存,解决本次事件处理中回调所引用对象可以被安全访问,并在下次 事件处理中安全删除。 admin连接 数据面连接 主 onNewConnection,onData数据接收。 • 对于HTTP协议,将继续经过L7层编解码处理后向上游发 送请求。 • 当请求处理完毕后,将调用deferredDelete删除请求对象 并记录统计观测数据。 • 使用异步I/O方式发送网络数据,降低对线程内其他操作 的阻塞。 Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 150 码力 | 30 页 | 2.67 MB | 1 年前3 Envoy原理介绍及线上问题踩坑reserved. Page 11 Envoy网络及线程模型 主线程 初始化 日 志 线 程 读 取 配 置 x D S 监 听 网络事件 启 动 工 作 线 程 定时器事件 a d m i n 请 求 X D S 更 新 合 并 s t a t 刷 新 D N S 调度器 工作线程 网络事件 定时器事件 监 听 器 监 听 过 滤 器 释 放 内 存 记 录 s t 进行连接负载均衡处理后,选择最终的业务监听器处理新连接。 • 之后对于此连接的所有处理都在此线程进行,包括下游数据集解码,路由选择、上游数据编 码发送等。 • 同时此工作线程还要处理定期观测信息与主线程同步(通过异步加回调)、线程内配置及集 群管理器状态更新等工作。 • 请求完成后延迟释放内存,解决本次事件处理中回调所引用对象可以被安全访问,并在下次 事件处理中安全删除。 admin连接 数据面连接 主 onNewConnection,onData数据接收。 • 对于HTTP协议,将继续经过L7层编解码处理后向上游发 送请求。 • 当请求处理完毕后,将调用deferredDelete删除请求对象 并记录统计观测数据。 • 使用异步I/O方式发送网络数据,降低对线程内其他操作 的阻塞。 Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 150 码力 | 30 页 | 2.67 MB | 1 年前3
 Istio控制平面组件原理解析V2通过GRPC双向流,主动推送配置给envoy: ü事件触发 • 当配置有增/删/改事件 ü定时触发 • 可配置环境变量 V2_REFRESH,定时推送配置Mixer——遥测报告 u上报的原始数据 u异步Flush给Adapter u转换成属性词汇 u问题讨论属性词汇 Name Type Description Kubernetes Example source.id string Platform-specific "bc1f172f-b8e3-4ec0-a070-f2f6de38a24f","718"]转换成属性词汇异步Flush到Adapter ü通过Template润色数据 ü使用Go的协程异步Flush到Adapter üAdapter展示数据 ü响应envoy数据处理完成问题讨论 Report流程回顾 üEnvoy异步批量发送数据给Mixer üMixer使用协程池处理Adapter ü处理完成所有Adapter才响应Envoy0 码力 | 30 页 | 9.28 MB | 6 月前3 Istio控制平面组件原理解析V2通过GRPC双向流,主动推送配置给envoy: ü事件触发 • 当配置有增/删/改事件 ü定时触发 • 可配置环境变量 V2_REFRESH,定时推送配置Mixer——遥测报告 u上报的原始数据 u异步Flush给Adapter u转换成属性词汇 u问题讨论属性词汇 Name Type Description Kubernetes Example source.id string Platform-specific "bc1f172f-b8e3-4ec0-a070-f2f6de38a24f","718"]转换成属性词汇异步Flush到Adapter ü通过Template润色数据 ü使用Go的协程异步Flush到Adapter üAdapter展示数据 ü响应envoy数据处理完成问题讨论 Report流程回顾 üEnvoy异步批量发送数据给Mixer üMixer使用协程池处理Adapter ü处理完成所有Adapter才响应Envoy0 码力 | 30 页 | 9.28 MB | 6 月前3
 SolarMesh 基于Istio构建的流量监管平台问题的源头 服务间交互的复杂性: Ø 难以可视化 Ø 难以全面测试 Ø 多服务联动时问题难以察觉 Ø ... 服务间通信的复杂性: Ø 网络延迟 Ø 消息序列化 Ø 不可靠的网络 Ø 异步机制 Ø ... 开发难 排错难 测试难 运维难 Ø 服务变得非常多 Ø 版本变得非常复杂 Ø 上线十分痛苦 Ø 排查问题更难 Ø 解决手段更复杂 Ø 学的东西更多 Copyright0 码力 | 20 页 | 1.29 MB | 1 年前3 SolarMesh 基于Istio构建的流量监管平台问题的源头 服务间交互的复杂性: Ø 难以可视化 Ø 难以全面测试 Ø 多服务联动时问题难以察觉 Ø ... 服务间通信的复杂性: Ø 网络延迟 Ø 消息序列化 Ø 不可靠的网络 Ø 异步机制 Ø ... 开发难 排错难 测试难 运维难 Ø 服务变得非常多 Ø 版本变得非常复杂 Ø 上线十分痛苦 Ø 排查问题更难 Ø 解决手段更复杂 Ø 学的东西更多 Copyright0 码力 | 20 页 | 1.29 MB | 1 年前3
 Istio audit report - ADA Logics - 2023-01-30 - v1.0infrastructure layer applicable to so�ware applications. Istio is platform and language agnostic, but is o�en used on top of Kubernetes. It offers users easy access to features such as observability, traffic into the source tree of dependencies of Istio to subsequently exploit it. Untrusted users Istio will o�en be deployed with the purpose of accepting untrusted input into the service mesh. Untrusted users os.Stat(dir); os.IsNotExist(err) { err := os.Mkdir(dir, 0o755) if err != nil { return "", err } } if err := os.WriteFile(destFile, data, 0o644); err != nil { return destFile, err } return destFile0 码力 | 55 页 | 703.94 KB | 1 年前3 Istio audit report - ADA Logics - 2023-01-30 - v1.0infrastructure layer applicable to so�ware applications. Istio is platform and language agnostic, but is o�en used on top of Kubernetes. It offers users easy access to features such as observability, traffic into the source tree of dependencies of Istio to subsequently exploit it. Untrusted users Istio will o�en be deployed with the purpose of accepting untrusted input into the service mesh. Untrusted users os.Stat(dir); os.IsNotExist(err) { err := os.Mkdir(dir, 0o755) if err != nil { return "", err } } if err := os.WriteFile(destFile, data, 0o644); err != nil { return destFile, err } return destFile0 码力 | 55 页 | 703.94 KB | 1 年前3
 Is Your Virtual Machine Really Ready-to-go with Istio?Service Entry object combined the lifecycles of both the service and the workloads implementing it, w/o giving a first-class representation for the workloads themselves #IstioCon V1.6-1.8 Better VM Automate provisioning a VM's mesh identity (certificate) ■ based on a platform-specific identity ■ w/o a platform-specific identity ● using a short-lived K8s service account token ● Automatic certificate through the gateway to the service ● The data plane traffic ■ Single network ● direct communication w/o requiring intermediate Gateway ■ Multiple networks ● all goes though the Gateway ● via L3 networking0 码力 | 50 页 | 2.19 MB | 1 年前3 Is Your Virtual Machine Really Ready-to-go with Istio?Service Entry object combined the lifecycles of both the service and the workloads implementing it, w/o giving a first-class representation for the workloads themselves #IstioCon V1.6-1.8 Better VM Automate provisioning a VM's mesh identity (certificate) ■ based on a platform-specific identity ■ w/o a platform-specific identity ● using a short-lived K8s service account token ● Automatic certificate through the gateway to the service ● The data plane traffic ■ Single network ● direct communication w/o requiring intermediate Gateway ■ Multiple networks ● all goes though the Gateway ● via L3 networking0 码力 | 50 页 | 2.19 MB | 1 年前3
 Istio Security Assessmentideal Kubernetes cluster with Istio running within it. Instead, NCC Group used various hosting options (i.e. Minikube, GKE, KOPS) to build reference clusters and test various configurations. These reference security expectations of control plane traffic • Disabling default services exposed in the cluster (i.e. Envoy admin interface, Pilot admin interface) • Istio hardening best practices Recommendation At and use it below in place of $GATEWAY kubectl -n istio-system get service istio-ingressgateway \ -o jsonpath='{.status.loadBalancer.ingress[0].ip}' 3. In a separate namespace, "test" with sidecar auto-injection0 码力 | 51 页 | 849.66 KB | 1 年前3 Istio Security Assessmentideal Kubernetes cluster with Istio running within it. Instead, NCC Group used various hosting options (i.e. Minikube, GKE, KOPS) to build reference clusters and test various configurations. These reference security expectations of control plane traffic • Disabling default services exposed in the cluster (i.e. Envoy admin interface, Pilot admin interface) • Istio hardening best practices Recommendation At and use it below in place of $GATEWAY kubectl -n istio-system get service istio-ingressgateway \ -o jsonpath='{.status.loadBalancer.ingress[0].ip}' 3. In a separate namespace, "test" with sidecar auto-injection0 码力 | 51 页 | 849.66 KB | 1 年前3
 探讨和实践基于Istio的微服务治理事件监控宏观下的监控需求 链路总体展示 展示整个服务调用过程中链路上 每一个节点的服务状况,包括延 时、吞吐量等基本信息。 服务器总体展示 展示当前所有服务器的运行状况, 包括CPU、内存、网络、I/O读写 等信息 业务总体展示 展示当前业务相关数据的 从宏观上快速定位问题,在微观上找到问题根因的 监控方案问题二:现有的系统能否完全满足需求 现有系统如何满足运维需求Istio现有的监控体系 何时调用一个特定的 Handler插件编译和镜像打包 插件的编译 CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build - a -installsuffix cgo -o eventadapter 镜像制作的dockerfile FROM scratch ADD eventadapter /usr/bin/eventadapter ENTRYPOINT ['./ev0 码力 | 29 页 | 8.37 MB | 6 月前3 探讨和实践基于Istio的微服务治理事件监控宏观下的监控需求 链路总体展示 展示整个服务调用过程中链路上 每一个节点的服务状况,包括延 时、吞吐量等基本信息。 服务器总体展示 展示当前所有服务器的运行状况, 包括CPU、内存、网络、I/O读写 等信息 业务总体展示 展示当前业务相关数据的 从宏观上快速定位问题,在微观上找到问题根因的 监控方案问题二:现有的系统能否完全满足需求 现有系统如何满足运维需求Istio现有的监控体系 何时调用一个特定的 Handler插件编译和镜像打包 插件的编译 CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build - a -installsuffix cgo -o eventadapter 镜像制作的dockerfile FROM scratch ADD eventadapter /usr/bin/eventadapter ENTRYPOINT ['./ev0 码力 | 29 页 | 8.37 MB | 6 月前3
 Using ECC Workload
Certificates
(pilot-agent environmental variables)that workloads within your cluster are using ECC $ istioctl proxy-config secret Using ECC Workload
Certificates
(pilot-agent environmental variables)that workloads within your cluster are using ECC $ istioctl proxy-config secret- . - -o json | \ jq'.dynamicActiveSecrets[0].secret.tlsCertificate.certificateChain.inlineBytes' | \ sed 's/"//g' plugged in custom CA certificates aren’t specified #IstioCon MeshConfig support In Istio 1.10 I am currently working on having ECC be supported in meshConfig for Istio 1.10 as an Alpha feature ○ 0 码力 | 9 页 | 376.10 KB | 1 年前3
 Secure your microservices with istio step by stepsa/ Secure your microservices with istio step by stepsa/- ” ● istioctl proxy-config secret - -o json | jq '.dynamicActiveSecrets[0].secret.tlsCertificate.certificateChain.i nlineBytes' -r | base64 -d | openssl x509 -noout -text -in - 0 码力 | 34 页 | 67.93 MB | 1 年前3
 Performance tuning and best practices in a Knative based, large-scale serverless platform with Istioworkload and provides aggregated data of Knative Service ready duration. o Knative Performance Testing Framework 2 Design #IstioCon o Ingress gateway MEM has linear growth, and it consumes ~=750k for 1 Knative Knative Service (#25145). The envoy mem release fix included in Istio 1.6.0+ resolved this issue. o Istiod MEM bumped with large numbers of Knative Services (#25532) Mem usage optimization of pilot resolved Istio scalability issue o Ingress_lb_ready is the duration from Knative Ingress and istio VirtualService are created to Knative probe thinks the configuration works. o [Istio 1.5.4] Istio is picking0 码力 | 23 页 | 2.51 MB | 1 年前3 Performance tuning and best practices in a Knative based, large-scale serverless platform with Istioworkload and provides aggregated data of Knative Service ready duration. o Knative Performance Testing Framework 2 Design #IstioCon o Ingress gateway MEM has linear growth, and it consumes ~=750k for 1 Knative Knative Service (#25145). The envoy mem release fix included in Istio 1.6.0+ resolved this issue. o Istiod MEM bumped with large numbers of Knative Services (#25532) Mem usage optimization of pilot resolved Istio scalability issue o Ingress_lb_ready is the duration from Knative Ingress and istio VirtualService are created to Knative probe thinks the configuration works. o [Istio 1.5.4] Istio is picking0 码力 | 23 页 | 2.51 MB | 1 年前3
共 21 条
- 1
- 2
- 3













