Envoy
2020-02-17 本文已影响0人
clive0x

Envoy包括Listeners和Clusters两部分。Listeners类似于Tomcat监听器,用于监听连接,one process multiple workers模型,类似于nginx。
Clusters为upstream cluster。
Listeners又包括filter chains,filter chains下配置listener filters和network filters,前者在accept连接后connection建立前起作用,后者为L3/4层 filter,proxy 主要实现filter 为TCP Filter。
http connection manager也是network filter,用于把raw bytes转为http协议格式,可以给其配置http filters,用于做更多http 处理配置,如gzip /CORS/CSRF等。
Envoy的proxy能力主要体现在route 的action,可以route,ridirection,direct_response。
总结起来,Envoy proxy可以工作在L3/4层,支撑TCP/UDP,另外可以工作在L7层,由http connection manager及其http filters处理。
与Haproxy差异:Envoy支持的协议更丰富http2/http1.1/grpc/tcp/udp。支持正反两方向代理。Haproxy支持tcp/udp, L7层不如Envoy丰富。