Skip to content

Adding HTTPRoutes causes Listener Drains #6579

@zhaohuabing

Description

@zhaohuabing

Description:
Adding an HTTPRoute with sessionPersistence caused the listener to drain which affects long running requests.

apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
  name: test
  namespace: default
spec:
  hostnames:
  - www.example.com
  parentRefs:
  - group: gateway.networking.k8s.io
    kind: Gateway
    name: ingress
  rules:
  - backendRefs:
    - name: backend
      port: 8000
    matches:
    - path:
        type: PathPrefix
        value: /
    sessionPersistence:
      sessionName: x-eg-sp
      type: Header
curl http://localhost:19000/stats |grep drain
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Handling connection for 19000
...
listener_manager.total_listeners_draining: 1

Repro steps:

Include sample requests, environment, etc. All data and inputs
required to reproduce the bug.

Add an HTTPRoute to a listener, or configure an exiting HTTPRoute with sessionPersistence.

Note: If there are privacy concerns, sanitize the data prior to
sharing.

Environment:

Include the environment like gateway version, envoy version and so on.
EG 1.4.2

Logs:

Include the access logs and the Envoy logs.

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions