-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with concurrent requests on AWS Fargate #22
Comments
Concurrency and asynchronous call is natively supportted by FastAPI, I did a quick test with 2 concurrency requests (with long response) and I can see both are streaming in parallel, I didn't test via code though. You can probably try below:
|
Hi @daixba, I forgot to mention that I'm not streaming the response But without streaming, the API is waiting for each request to finish before being able to handle other requests
I agree; This is why I think the problem with boto3 |
所以这个能解决吗,我的大并发请求一遇到非流式就没办法 |
Describe the Bug
I am encountering an issue where concurrent requests are being processed sequentially rather than simultaneously when deployed on AWS Fargate.
I suspect the problem is that boto3 runs synchronously, and its calls are blocking.
API Details
To Reproduce
Steps to reproduce the behavior:
Expected Behavior
I expected that when sending multiple concurrent requests to the API, all requests would be handled simultaneously or at least as many as the server can handle
The text was updated successfully, but these errors were encountered: