Is there a way to impose a hard limit of 1 actively running request per user id (or any identifier)

Is there a way to impose a hard limit of 1 actively running request per user id (or any identifier) per location. I'm currently using a simple KV with a bool, but it's not quite fast enough if you make two requests at the same time. Would a queue be a good fit for this or is there a simpler solution?
Was this page helpful?