why to use batch? When we have to send a lot of command to redis Redis server have to process commands and replies about them. In request - response mechanism, there’s also ‘Round Trip Time’. Ro...
Lock in redis
Locking we could use lock for overcoming optimistic lock solution Example of locking solution Bid system example refer previous post
Concurrency in redis
In many cases, concurrency could be ignored. It depends on your business requirement. Problem Race condition depends on sequence of commands. Result differ according to it. Why this happened? Th...
List of redis
When to use Append only or prepend only data Time series data ex) temperature readings, stock values Non-stop overtime! Need to only fetch last or first element is reuiqred only. But this ...
HyperLogLog
HyperLogLog HyperLogLog is an algorithm for the count distinct problem. Redis provides HyperLogLog algorithm string data It only uses 12 KB. When to use? Guarantee approximate uniqueness when ha...
Loading relational data
There’s two solution for getting loading relational data (1) RANGE based query + GET query Let me show you example code. export async function itemsByEndingTime( order: 'DESC' | 'ASC' = 'DESC',...
Redis sorted set
When to use Enforce uniqueness of elements Enforce sort Needs range based query Tabulating a collection in order Creating relationships between entities sorted by some criteria Ran...