我已经读了一整天的文档,我似乎无法让它起作用。
我有一个不受约束的应用程序,它为每个HTTP请求打开一个连接。我希望通过强制HTTP多路复用来提高性能,通过长期存在的TCP连接。
我试着做了一个ServiceEntry和一个DestinationRule,但我没有看到有任何效果。我仍然看到了大量的TCP连接。
我想Istio会通过maxRequestsPerConnection从DestinationRule汇集连接。这样做不对吗?
我想象我需要:
不过,总的来说,我只希望特使侧车能将这项服务的所有出口连接,无论目的地如何,都要集中和多路使用。
目的地规则
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: api
spec:
host: google.com
trafficPolicy:
connectionPool:
tcp:
maxConnections: 100
connectTimeout: 30ms
tcpKeepalive:
time: 7200s
interval: 75s服务条目
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: api
spec:
hosts:
- google.com
location: MESH_EXTERNAL
ports:
- number: 443
name: https
protocol: TLS
resolution: DNSistioctl -i istio proxy-config cluster api.namespace
...
google.com 443 - outbound STRICT_DNS api.namespace
...istioctl -i istio proxy-config cluster api.namespace --fqdn google.com -o json
"circuitBreakers": {
"thresholds": [
{
"maxConnections": 100,
"maxPendingRequests": 4294967295,
"maxRequests": 4294967295,
"maxRetries": 4294967295,
"trackRemaining": true
}
]
},
"upstreamConnectionOptions": {
"tcpKeepalive": {
"keepaliveTime": 7200,
"keepaliveInterval": 75
}
},发布于 2022-08-01 20:44:47
好的,所以我想我在上面的问题中发现的是,maxConnections不会导致特使代理创建一个包含100个连接的池。相反,这设置了一个电路中断规则,防止应用程序打开更多的连接。
也许我需要使用HTTP连接池?
https://stackoverflow.com/questions/73199210
复制相似问题