Speed ​​up web service by writing redis first, drive after?

I have a web service that starts several database queries and takes about ~ 500 ms-1000 ms (depending on how much I / O EC2 decides to give me on this connection if the call is made). Users want things faster than 1000 ms, and that’s understandable. What I'm going to do is to execute the request parameters by typing them into the redis queue without writing to the disk, and then run the task in the asynchronous queue that writes the disk. Does something like this happen in practice? am i crazy to offer this?

+3
source share
1 answer

As long as your Redis constantly stays on disk, this should work. You want to limit the number of scenarios in which you can lose data. A fairly aggressive retention schedule for Redis should work in most cases.

Try to immediately inform the user that their action has been received and is being processed. Nothing is more confusing than a short delay before it appears, which may prompt people to try downloading again.

+3
source

All Articles