Hi there, I am using traefik as ingress controller on kubernetes.
I have got a small problem.
My helm is this
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: {{ .Values.Ingress.name }}
{{- if .Values.Ingress.middlewares }}
{{- $middlewares := list }}
{{- range $middleware := .Values.Ingress.middlewares }}
{{- $middleware := print $.Values.Namespace.name "-" $middleware "@kubernetescrd" }}
{{- $middlewares = append $middlewares $middleware }}
{{- end}}
annotations:
"traefik.ingress.kubernetes.io/router.middlewares": {{ $middlewares | join ", " }}
{{- end}}
spec:
tls:
{{- if .Values.Ingress.tls_secret }}
{{- range .Values.Ingress.hosts }}
- hosts:
- {{ .hostname }}
secretName: {{ $.Values.Ingress.tls_secret }}
{{- end}} {{- end}}
rules:
{{- range .Values.Ingress.hosts }}
- host: {{ .hostname }}
http:
paths:
- backend:
service:
name: {{ .forwardhost }}
port:
number: {{ .forwardport }}
path: /
pathType: Prefix
{{- end}}
However there is a problem.
Configuring this way does not properly handle http/2 requests to http/1.1 backend.
Because it does not distribute the traffic(http/2 uses multiple requests in one TCP/TLS connection while http/1.1 uses multiple connections for multiple requests).
The problem is that the traefik makes one http/1.1 connection and passes from http/2 to http/1.1.
This method works but it is extremely slow.
Let me show you like this:
HTTP1.1
Using HTTP/2
In this case, when client uses http/1.1, it makes multiple connections.
But http/2 does not do that at all.
Could you help me solve this?
Thank you