|
|
|
|
|
by gane5h
4508 days ago
|
|
Two ways you can do this: 1. Long polling: It’s definitely possible to have thousands of long-lived requests with something like gunicorn/tornado. Remember to turn-off buffering in your front-end nginx proxy if you want to use long-polling. 2. Async with web hooks. Gather the request payload, push it to a job queue, and return the response. Process the job queue at your leisure and then call the web hook when complete. You can use celery, beanstalk or my personal choice rq (and django-rq.) |
|