r/FastAPI • u/International-Rub627 • Feb 26 '25
Hosting and deployment Reduce Latency
Require best practices to reduce Latency on my FASTAPI application which does data science inference.
9
Upvotes
View all comments
Show parent comment
7
u/Natural-Ad-9678 Feb 27 '25
The app I work on does this. User submits the required details (a zip file of logs) and I kick off a Celery job which stores at first a transactionID in Redis that I pass back in my response to the user. They can use that transactionID to check the status and get the results when Celery is finished.
Celery stores the result in Redis as well. The front end could be React or whatever else you want.
Works like a charm. We have completed over 150,000 jobs since July 2024 which may not seem like much but the applications is an internal tool that processes customers log files they submit to us.