I need to restrict request limit . Requested should be restricted after certain number of time.
Things performed : ->
I have created service on knative & applied virtual service on it. As part of virtual service , i am creating destination rule as well.
Testing -> Service & virtual service is working fine , but destination rule to restrict number of http request is not working.
I have tried to send request 1 after another for 11 time , but still it accepts. It look like , http2MaxRequest is to limit concurrent request (at the same time) .
Destination rule code ->
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: route-policy
spec:
host: istio-ingressgateway.istio-system.svc.cluster.local
trafficPolicy:
connectionPool:
tcp:
maxConnections: 10
http:
http2MaxRequests: 10
maxRequestsPerConnection: 1
outlierDetection:
consecutiveErrors: 1
interval: 5m
baseEjectionTime: 15m
Let me know , if this is ok . or Is there any other way , i can restrict request