Inconsistent response time over fastly

Hello,

I have an HTTP server in the AWS us-east-1 region which has ALB and Fastly in front and I’m checking the response time from Japan. I’m using Fastly just for routing optimization so not caching contents.

I ran a curl command like the following and noticed that response time (time_starttransfer) varies widely; between 200ms - 700ms. While the x-runtime stays slow.

Also, I confirmed that, in the AWS internal network (VPC peered network between ap-northeast-1 and us-east-1), the response time is much more consistent at around 200-300ms. So the backend is not an issue. Just FYI I used a different non nternet-facing ALB for this experiment.

> curl -i -w "@format.txt" -X GET https://aaa.com https://aaa.com https://aaa.com https://aaa.com https://aaa.com https://aaa.com

time_starttransfer: 0.590913
HTTP/2 200 
content-type: text/plain
server: nginx
etag: W/"2d1376a8e46c47c9e089aef304d11b32"
cache-control: max-age=0, private, must-revalidate
x-request-id: 18280207-1aea-4637-a44e-09008a74fa54
x-runtime: 0.002155
fastly-restarts: 1
accept-ranges: bytes
date: Wed, 03 Jul 2024 09:52:31 GMT
via: 1.1 varnish
x-served-by: cache-tyo11931-TYO
x-cache: MISS
x-cache-hits: 0
vary: Accept-Encoding

time_starttransfer: 0.682622
HTTP/2 200 
content-type: text/plain
server: nginx
etag: W/"2d1376a8e46c47c9e089aef304d11b32"
cache-control: max-age=0, private, must-revalidate
x-request-id: 88d4383f-5b7d-4036-a1b4-999cb4daf8af
x-runtime: 0.001561
fastly-restarts: 1
accept-ranges: bytes
date: Wed, 03 Jul 2024 09:52:31 GMT
via: 1.1 varnish
x-served-by: cache-tyo11931-TYO
x-cache: MISS
x-cache-hits: 0
vary: Accept-Encoding

time_starttransfer: 0.191158
HTTP/2 200 
content-type: text/plain
server: nginx
etag: W/"2d1376a8e46c47c9e089aef304d11b32"
cache-control: max-age=0, private, must-revalidate
x-request-id: f8550550-da0c-47c7-95e9-10c91efa0190
x-runtime: 0.001639
fastly-restarts: 1
accept-ranges: bytes
date: Wed, 03 Jul 2024 09:52:31 GMT
via: 1.1 varnish
x-served-by: cache-tyo11931-TYO
x-cache: MISS
x-cache-hits: 0
vary: Accept-Encoding

time_starttransfer: 0.189648
HTTP/2 200 
content-type: text/plain
server: nginx
etag: W/"2d1376a8e46c47c9e089aef304d11b32"
cache-control: max-age=0, private, must-revalidate
x-request-id: 6f8e1901-206d-4abf-b06e-c92d8a4a5596
x-runtime: 0.001484
fastly-restarts: 1
accept-ranges: bytes
date: Wed, 03 Jul 2024 09:52:32 GMT
via: 1.1 varnish
x-served-by: cache-tyo11931-TYO
x-cache: MISS
x-cache-hits: 0
vary: Accept-Encoding

time_starttransfer: 0.712120
HTTP/2 200 
content-type: text/plain
server: nginx
etag: W/"2d1376a8e46c47c9e089aef304d11b32"
cache-control: max-age=0, private, must-revalidate
x-request-id: 5c98c580-6f3c-4020-bfd0-00d44f3fd57e
x-runtime: 0.001483
fastly-restarts: 1
accept-ranges: bytes
date: Wed, 03 Jul 2024 09:52:32 GMT
via: 1.1 varnish
x-served-by: cache-tyo11931-TYO
x-cache: MISS
x-cache-hits: 0
vary: Accept-Encoding

time_starttransfer: 0.188305
HTTP/2 200 
content-type: text/plain
server: nginx
etag: W/"2d1376a8e46c47c9e089aef304d11b32"
cache-control: max-age=0, private, must-revalidate
x-request-id: 2f324228-b662-4c83-a213-7cf6fa4b26be
x-runtime: 0.001355
fastly-restarts: 1
accept-ranges: bytes
date: Wed, 03 Jul 2024 09:52:32 GMT
via: 1.1 varnish
x-served-by: cache-tyo11931-TYO
x-cache: MISS
x-cache-hits: 0
vary: Accept-Encoding

I’m wondering why I’m getting the inconsistent response time over Fastly and how could I improve the situation.

I tried enabling shielding with the shielding pop of iad-va-us, but it seems shielding is not working for some reason. The above response headers are “with shielding enabled” but it seems that shielding is not working as I can only see one “MISS” in x-cache header.

Edit: Note that the service is not publicly available yet. So traffic volume is quite small like less than 100s per hour.

Hi @shimpeko can you go to https://www.fastly-debug.com/ and send back the generated block with your performance outputs?