A list preserves b, a, b as three positions; a sorted set orders unique a and b by scores 10 and 20.

Positions versus scores: schematic.

A Redis list and a sorted set solve different problems

A Redis list stores an ordered sequence that permits repeated values. A sorted set stores unique members ordered by numeric scores. The useful distinction is not that one is universally faster or cheaper: it is whether the application needs positional sequence operations, unique membership, score ranges, or a combination requiring a different data model. ...

January 4, 2028 · 7 min · XB Field Notes
Two a,b,c rows compare RPUSH with LPOP at the opposite end for FIFO and RPOP at the same end for LIFO.

A Redis list is a queue, a stack, or both

A Redis list is an ordered sequence of byte values with operations at both ends. Choosing the push and pop ends determines whether it behaves as a queue or a stack. Blocking operations wait for data; they are not distributed locks, acknowledgements, or a complete message-processing protocol. ...

April 18, 2027 · 6 min · XB Field Notes