What is the request retry upstream selection algorithm?
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: rtest
spec:
hosts:
- '*'
http:
- name: test
match:
- uri:
prefix: /
route:
- destination:
host: myapp
port:
number: 8000
retries:
attempts: 20
retryOn: 404,retriable-status-codes,connect-failure,reset
retryRemoteLocalities: true
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: myapp
spec:
host: myapp
trafficPolicy:
outlierDetection:
consecutive5xxErrors: 100
baseEjectionTime: 1s
loadBalancer:
simple: ROUND_ROBIN
I was sure that retry will try on every pod in RR manner. I was wrong, sometimes it is trying multiple times on the same pod ignoring RR balancing. How to force Istio to retry each time on the different pod?
Istio version 1.9.3
Changing the load balancing algorithm has no effect on the retry order. This is 50x retries with the 7 pods running on separate nodes:
s44sk
pgkp5
qdg58
5xjtp
5xjtp
5xjtp
blrl2
blrl2
blrl2
blrl2
blrl2
l74q4
l74q4
l74q4
l74q4
l74q4
l74q4
l74q4
l74q4
l74q4
l74q4
l74q4
l74q4
l74q4
l74q4
l74q4
l74q4
l74q4
blrl2
blrl2
s44sk
7jwdm
7jwdm
7jwdm
7jwdm
7jwdm
7jwdm
7jwdm
7jwdm
7jwdm
7jwdm
5xjtp
5xjtp
5xjtp
5xjtp
Not sure that the order is preserved but the retry ratio between pods is far from RR.
Locality load balancing is used, but I guess it should not affect the pod retry ratio using RR algorithm.