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!

已提问 7 个月前50 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则