Why is the perfromance so slow for reading & writing from\to S3 using boto3?

0

I have a FASTAPI python server hosted on EC2 instance. My server has a few endpoints to read & write data from\to from\to S3 using boto3. Sending the first few initial requests to read a single small file (~9kb) takes ~10 seconds. Then the performance gets better for the subsequent requests. If I wait ~10s before another request, the subsequent request takes the same ~10s. It seems to be related to some initial handshake, but I could not find any information online.

Could you please shed some light on why it takes so long for the first request or requests after some inactivity and how to improve this timing?

Thank you in advance!

asked 6 months ago46 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions