RANDOMKEYReturn a random key from the keyspace.
| Syntax | RANDOMKEY |
| Group | scan |
| Arity | 1 |
| Since | 1.0.0 |
| Flags | readonly |
| Complexity | O(1) expected — each shard probes a random slot, and the origin folds the candidates through a reservoir weighted by shard key counts, so every key is equally likely |
| Redis compatibility | full |