Combining multiple rate limiters atomically 
I want to implement an API rate limiter using Redis. On receiving a request, I call rate limiter.consume(), and then await `ratelimiter.get()` to check if limits have crossed or not. While using this in a distributed system, is it possible 2 commands get executed simultaneously for `consume`, and even though the counters are incremented atomically for both, both threads get the updated value of the counter? for example, if the limit is 100, and the current count is 99, and 2 requests come in, where both the `consume` functions are executed simultaneously, and the counter becomes 101. now both `get` functions receive 101 as counter value, and therefore reject both the requests, but 1 of them should have been allowed. Am I missing something? 

Also, I wanted to create rate limiter having limits for per sec, per minute, per hour, and per day. Currently, I implemented this by creating 4 instances of `RateLimiterRedis` with different duration and prefix parameters. when a request come in, I call `.consume()` on all the 4 instances and then call `.get()` to get the current status and check if rate limits have crossed or not. But in this I am basically making 4 consume calls and 4 get calls, which is taking the whole time of ~250 ms. Can this be somehow reduced by doing the increment of 4 counters in a single call to redis using redis scripts? 