2 ms·
Redis should be able to handle tens of thousands of reads/writes without much issue on contemporary hardware. Every request that comes in contains a random "id
by Nextgrid 3y ago
Redis should be able to handle tens of thousands of reads/writes without much issue on contemporary hardware.
Every request that comes in contains a random "idempotency token" (can be in a hidden form field) and upon reception the server checks the previous value & sets the key if it's not there (GETSET command on Redis should do it?)
The presence of the previous value indicates whether this token was handled already (if so it means duplicate request and return an error/etc), and setting the value will ensure any subsequent duplicate request will get rejected.