I want to track inventory state. We are using redis currently in stack. At present we do this using Postgres. Whenever inventory is in we increment the count and whenever inventory is out we reduce the count. For efficiency purpose I want to try redis HIncrBy. Is this operation atomic? Are there any pitfalls I should be aware of?
Since Redis is single-threaded, everything is atomic.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With