概述连接池限制并发与排队,熔断阈值保护后端,异常剔除移除错误端点。合理参数协同可在突发流量与下游抖动时保持网格稳定。关键实践与参数并发与排队: `http1MaxPendingRequests` `maxRequestsPerConnection`熔断: `maxConnections` `maxPendingRequests` `maxRequests`异常剔除: `consecutive5xxErrors` `baseEjectionTime` `maxEjectionPercent`重试与超时: 对幂等路径设定合理重试与超时示例/配置/实现apiVersion: networking.istio.io/v1beta1 kind: DestinationRule metadata: name: api-dr spec: host: api.svc.cluster.local trafficPolicy: connectionPool: http: http1MaxPendingRequests: 200 maxRequestsPerConnection: 100 circuitBreakers: thresholds: maxConnections: 1000 maxPendingRequests: 200 maxRequests: 500 outlierDetection: consecutive5xxErrors: 5 interval: 5s baseEjectionTime: 30s maxEjectionPercent: 50 验证压测限流: 并发超过阈值时排队与拒绝比例符合预期剔除生效: 注入5xx错误后异常端点被剔除并恢复稳定性: 高并发下错误率与延迟保持在目标区间观测: 指标与日志记录限流与熔断事件注意事项阈值需与下游容量评估匹配与VirtualService的重试与超时协同设置过于激进的剔除可能影响整体可用性定期复盘并优化参数

发表评论 取消回复