开始一直报protocol error,由于使用http2协议,所以在envoy配置中clusters要配置以下内容
http2_protocol_options:
max_concurrent_streams: 100
最后的clusters配置如下所示,在envoy中upstream指的是server
clusters:
- name: my_custom_svc
http2_protocol_options:
max_concurrent_streams: 100
connect_timeout: 30s
type: static
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: service1
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 192.168.20.237
port_value: 8080
参考文章
HTTP Protocol Options (proto) — envoy 1.24.0-dev-6bba2d documentation (envoyproxy.io)