I know this question has been asked multiple number of times in the past. However, my situation is a bit unique. The problem I am facing is the UI is making 5-10 requests
for a single button click in a span for few milliseconds
(There are 10 events fired in a 5 milliseconds in some cases) and the Rails API calls are being processed in separate parallel threads. How can we hand the duplicates
in this case? The options I explored are to place a Unique
key in Redis
and refer to the same on every API call and see if this has already been processed.
↧
Handle Duplicate API calls gracefully in Rails
↧