apache / trafficserver

Apache Traffic Server™ is a fast, scalable and extensible HTTP/1.1 and HTTP/2 compliant caching proxy server.
https://trafficserver.apache.org/
Apache License 2.0
1.8k stars 796 forks source link

H3 delay when using http/3 on docs #9889

Open bryancall opened 1 year ago

bryancall commented 1 year ago

Normally docs will respond around 350ms. However, there are times when it will respond in 30 seconds. Here is a a curl command demonstrating taking 30 seconds:

08:49:14 zeus:~$ time /opt/bin/curl -vvv --http3-only -o /dev/null -s https://docs.trafficserver.apache.org/en/latest
*   Trying 72.167.42.180:443...
*   Trying [::]:443...
* ngtcp2: connection to :: port 443 refused
* QUIC connect to :: port 443 failed: Couldn't connect to server
* Skipped certificate verification
* Connected to docs.trafficserver.apache.org (72.167.42.180) port 443 (#0)
* using HTTP/3
* h2h3 [:method: GET]
* h2h3 [:path: /en/latest]
* h2h3 [:scheme: https]
* h2h3 [:authority: docs.trafficserver.apache.org]
* h2h3 [user-agent: curl/7.88.1-DEV]
* h2h3 [accept: */*]
* Using HTTP/3 Stream ID: 0 (easy handle 0xaf0350)
> GET /en/latest HTTP/3
> Host: docs.trafficserver.apache.org
> user-agent: curl/7.88.1-DEV
> accept: */*
>
< HTTP/3 200
< date: Tue, 20 Jun 2023 15:14:01 GMT
< server: ATS/10.0.0
< last-modified: Tue, 20 Jun 2023 05:11:44 GMT
< accept-ranges: bytes
< content-length: 14346
< content-type: text/html
< etag: "380a-5fe88afeb6400"
< age: 2127
< strict-transport-security: max-age=17280000
< via: http/1.1 traffic_server (ApacheTrafficServer/10.0.0 [cRs f ])
< alt-svc: h3=":443"; ma=3600
< cache-control: max-age=300, private
<
{ [14346 bytes data]
* Connection #0 to host docs.trafficserver.apache.org left intact

real    0m30.106s
user    0m0.006s
sys 0m0.002s
duke8253 commented 10 months ago

Seems like this has been fixed

$ time ./curl -vvv --http3-only -o /dev/null -s https://docs.trafficserver.apache.org/en/latest
* processing: https://docs.trafficserver.apache.org/en/latest
*   Trying 72.167.35.147:443...
*  CAfile: /etc/pki/tls/certs/ca-bundle.crt
*  CApath: none
*  subjectAltName: host "docs.trafficserver.apache.org" matched cert's "docs.trafficserver.apache.org"
* Verified certificate just fine
* Connected to docs.trafficserver.apache.org (72.167.35.147) port 443
* using HTTP/3
* Using HTTP/3 Stream ID: 0
> GET /en/latest HTTP/3
> Host: docs.trafficserver.apache.org
> User-Agent: curl/8.2.1-DEV
> Accept: */*
>
< HTTP/3 200
< date: Thu, 26 Oct 2023 20:43:00 GMT
< server: ATS/10.0.0
< last-modified: Wed, 18 Oct 2023 21:17:53 GMT
< accept-ranges: bytes
< content-length: 14335
< content-type: text/html
< etag: "37ff-608042c192240"
< age: 63860
< strict-transport-security: max-age=17280000
< via: http/1.1 traffic_server (ApacheTrafficServer/10.0.0 [cRs f ])
< cache-control: max-age=300, private
<
{ [14335 bytes data]
* Connection #0 to host docs.trafficserver.apache.org left intact

real    0m0.331s
user    0m0.019s
sys 0m0.007s