S3 High Latency Spikes

Diagnose S3 request latency spikes and design prefix strategies to avoid throughput limits.

Overview

Overview

S3 latency spikes have several distinct root causes, each with a different fix. Before optimizing, separate the two latency components that S3 CloudWatch reports: FirstByteLatency and TotalRequestLatency.

The two metrics cover different stretches of the same request. FirstByteLatency runs from the moment S3 receives the request to the first byte of its response, so it measures server-side processing. TotalRequestLatency covers the full round trip, including the network transfer, up to the last byte at the client. A gap between the two is time spent moving data, not time spent inside S3.

Key concepts

  • FirstByteLatency
  • Prefix Throughput Limit
  • Multipart Upload
  • S3 Transfer Acceleration
  • S3 Express One Zone

Interview questions

  • Your S3-based log storage pipeline starts returning 503 SlowDown errors when log volume triples. The key structure is logs/YYYY-MM-DD/server-id/filename. How do you fix this without changing the data model significantly?

Sign up free to read the full topic

More Troubleshooting topics

Start free on Cariara · Coding problems · System design studio