Envoy Cluster
来源:原创
时间:2019-11-16
作者:脚本小站
分类:云原生
Clusters配置:
clusters: - name: # 集群唯一的名称 alt_stat_name: 统计信息中使用的集群代名称 type: # 服务发现的类型,STATIC、STATIC_DNS、LOGICAL_DNS、ORIGINAL_DST、EDS lb_policy: # 负载均衡算法,ROUND_ROBIN、LEAST_REQUEST、RING_HASH、RANDOM、MAGLEV、CLUSTER_PROVIDED load_assignment: # 负载分配方式 cluster_name: 集群名称 endpoints: # 断点列表 - locality: {} # 标识上游主机的位置,region、zone lb_endpoints: - endpoint_name: endpoint: # 端点定义 socket_address: address: port_value: protocol:
示例:
clusters: - name: test_cluster connect_timeout: 0.25s type: STATIC lb_policy: ROUND_ROBIN load_assignment: cluster_name: test_cluster endpoints: - lb_endpoints: - endpoint: address: socket_address: { address: 172.20.0.2, value_port: 80 } - endpoint: address: socket_address: { address: 172.20.0.3, value_port: 80 }