A.Guha
A.Guha

Reputation: 30

How to handle Multiple Requests from Django App?

I have a requirement, where only one instance of the Django application is supposed to be running on a remote server.

The user will make a request to the service and the application will process batch data and return back output. In this particular scenario, I have been asked to handle multiple requests in a queue from inside the Django application which is slightly odd.

If I have to move forward with this approach, what would be the best way to implement the queue. Also if there is an option to use some kind of a queue outside the application, what would be the best and fastest approach for it?

Thanks in advance

Upvotes: 0

Views: 1262

Answers (1)

fannik
fannik

Reputation: 1153

Django 3.1+ supports async views. So inside an async view, you could make dozens of async requests, await the results, and send back a needed payload. Docs: Asynchronous support

Upvotes: 2

Related Questions