Istio envoy 504 gateway timeouts after 15 seconds for outbound connections

前端 未结 2 1866
清酒与你
清酒与你 2020-12-18 16:44

Background:

I am using istio 1.2.5

I have deployed istio using helm default profile from the istio documentation by enablin

2条回答
  •  旧巷少年郎
    2020-12-18 17:11

    After lot of hit and trial we got this working.

    Reference: https://github.com/istio/istio/issues/16915#issuecomment-529210672

    So for any outbound traffic no matter if you have egress gateway or not default timeout is 15 seconds. So, if you want to increase that you need to have a ServiceEntry and a VirtualService that defines the timeout.

    ServiceEntry

    apiVersion: networking.istio.io/v1alpha3
    kind: ServiceEntry
    metadata:
      name: external-se-test
    spec:
      hosts:
      - slowwly.robertomurray.co.uk
      location: MESH_EXTERNAL
      ports:
      - number: 80
        name: example-http
        protocol: HTTP
      resolution: DNS
    

    VirtualService

    apiVersion: networking.istio.io/v1alpha3
    kind: VirtualService
    metadata:
      name: slow-ext
    spec:
      hosts:
        - slowwly.robertomurray.co.uk
      http:
      - timeout: 30s
        route:
          - destination:
              host: slowwly.robertomurray.co.uk
            weight: 100
    

提交回复
热议问题