The response time for requests for simple redirection on HTTP/HTTPS using redirectregex and redirectscheme middlewares is damn slow. Multiple time outs are reported at the browser while browsing those Host sites, as well as while curling the links.
P.S. Have hosted around 480 routers with Hosts/Path values as testing for bulk redirection scenario.
You can try browsing this host and find the TAT for the request.
Env: Azure Kubernetes Service through Docker Container with 2 Pod serviced under a single deployment
Traefik Dynamic and Static configurations hosted using YAMLs ('file' provider)
These YAMLs containing around 480 routers scenarios are hosted over container using Azure File Share mounted over container as a volume.
Kubernetes service is exposed through a service pointing to an Azure Load Balancer with a public IP.
@vibhujain This is really weird and suspecting it could be a bug possible I gave it a go in a more controlled local environment, here are my results:
Timings in seconds:
With no middleware:
Connect: 0.004274 TTFB: 0.005965 Total time: 0.006092
With redirect-scheme, redirected from http:
Connect: 0.004199 TTFB: 0.014645 Total time: 0.020215
With redirect-regex, redirected from http:
Connect: 0.004205 TTFB: 0.012758 Total time: 0.018608
The runs just alternated from the commented out middleware in the router. In this case there is negligible differences between doing a direct redirect scheme or applying the regex redirect. Even from running without any middleware to adding a middleware doesn't adds up that much and in every case it was very far from the 1s mark.
We don't have your timings, other than it feeling as "creepy slow", could you provide some data on how you measured it?
No of course not!
The limit is 500M and the container uses 40M.
This is a test-container, so no traffic other than mine for those tests, is going through.
No entrypoints match the requested URL, this was a test how traefik handles early exit requests.
My traefik instance handles:
https://sub.domain.tld/shop*
I send a request to:
https://sub.domain.tld/
So also the config would not give you more insign, but let me post it here (censored):
the request therefore does not need to wait for the service/backend to reply
Why does this still take 4s to respond to for the first request after a 5min cooldown?
Also:
the service I am routing to is not on the same server, like mentioned above, it goes to my other server and serves an URL there. So no local docker forwards/resolves etc.
the domain/subdomain uses IPv4 and IPv6. While docker traefik container uses network_mode: host.