Introduction :-
Not every backend operation should be executed as part of an HTTP request.
Some operations require additional computation, may take unpredictable amounts of time, or need to run independently of the API layer. Executing all of them synchronously can tie request handling to processing time and make it harder to control how work is scheduled.
A common solution is to separate task submission from task execution.
In this article, I will walk through a task-processing system I built using Python, FastAPI, Redis, PostgreSQL, and a C++ processing service powered by OpenSSL. The system accepts operations through a REST API, organizes tasks into priority queues, and processes them asynchronously.
The goal is not to introduce another queue implementation.…