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 |
| Read, decide, and update atomically | SSI transactions in application code | Real transactions |
| Keep existing Redis scripts running | Lua scripts or functions, best effort | Scripting compatibility |
HyperLogLog estimates a count; it does not retain an exact set of members.
Lua is not required for transactional application logic in Swytch. With --ssi, commands inside MULTI return their
results immediately, so you can make decisions in your application’s language and commit with EXEC. Prefer
SSI transactions for new code.
Lua scripts and functions are provided on a best-effort basis for compatibility with existing Redis workloads. 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.