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ビュー
回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ