Latency of upload a file and download it from s3

0

Hey team we are building a service where we are consuming a step function which have 3 apis. We have to pass json files to other apis but the file might be large and there is a limit of 256KB in step function. So we were thinking of two approaches:

  1. Upload it to S3 and download it via S3. In this can we know what are the latency we are talking about in uploading and downloading in context of file size?
  2. Using an ElastiCache that will store the data until the step function runs and what will be the latency in this case in context to the file size? Also is there any standard way to handle these use case if the limit of input and output size is more than 256kb?
1개 답변
0

For S3, if your comparison is ElastiCache, you will want to consider S3 Express One Zone, which provides the lowest latency option in S3. In discussing latency, you want to think about transmission time and server time.

Server Time can be tracked by FirstByteLatency. The best way to track full round trip latency will be through client side metrics. S3 provides a metric TotalRequestLatency that tracks this from the server side, but realize some aspects of this aren't tracked, like establishing a TCP connection, any client side queuing, etc.

Transmission time for 256KB will be a low number, but the exact details will depend upon your networking, but a reasonable expectation might be single digit ms. In S3 Standard a single connection can deliver 85-90MBs which is about 2.5ms for 256KB.

For the overall requests, with S3 Standard you should budget more than 10ms, with S3 Express One Zone you may be able to budget less than 10ms per request. S3 Express One Zone provides consistent single digit FirstByteLatency, but for your application, you'll need to consider that transmission time, any network latency, and any effect your own code introduces. I'd suggest testing to validate all aspects of your design, but those are some rough starting points. Another advantage of S3 Express One Zone is that latency is also more predictable, as in tail latencies are lower.

If you're looking to dive deeper here I'd suggest this presentation from re:Invent 2023, Deep dive on Amazon S3 Express One Zone storage class (STG230).

profile pictureAWS
답변함 5달 전
profile picture
전문가
검토됨 5달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠