I've a use case where I've to store something in a redis database after the response has been sent. I'm trying to understand as much as possible, the difference between these three approaches —
( work = write in redis )
I can do the work in a promise, after it has been resolved, such that the resolved data has helped me send response back to the browser without blocking, while work could happen in the promise after resolving, as if in background.
I can bring all the data that I need to store in redis in an express route handler, and do the work after response has been sent ( this could potentially queue incoming requests ? )
Use nodejs workers (child process as well?) to do the same job.
Thanks.
No responses yet.