Bitmaps, HyperLogLog, Geo, and Scripting
Choose a specialized Redis structure when it directly fits the application task.
| Task | Structure | Reference |
|---|---|---|
| Track compact boolean flags | Bitmaps | Bitmap commands |
| Estimate distinct visitors | HyperLogLog | Cardinality commands |
| Find nearby indexed locations | Geospatial sorted-set operations | Geo commands |
| Group operations inside the server | Lua scripts or functions | Scripting commands |
HyperLogLog estimates a count; it does not retain an exact set of members. Scripting compatibility depends on available Lua libraries and supported commands. Review scripting differences before moving an existing script.
Shared keys retain their topology costs regardless of the structure. Measure the actual operation and data size when sizing the sidecar.