Question: what are keys in redis?
Answer: The keys in Redis themselves are stored in a dictionary (aka a hash table). The KEYS command works by iterating over this dictionary and sending everything that matches the pattern out as a single Array reply. The other commands work similarly.