DEV Community

William Rodriguez
William Rodriguez

Posted on

Sub-millisecond user tracking: Redis Bitmaps with wpipe-steps

Tracking millions of daily active users shouldn't require gigabytes of database storage and slow SQL queries. wpipe-steps brings high-performance Redis Bitmap steps straight to your pipelines.

Here is how you use Redis Bitmaps (Sync & Async) in a production pipeline with wpipe-steps:

from wpipe import Pipeline
from wpipe_steps.database.redis.bitmaps import (
    redis_bitmap_set_bit_sync,
    redis_bitmap_count_bits_sync
)

pipeline = Pipeline(pipeline_name="daily_active_users")

pipeline.set_steps([
    # Record user #4096 logged in today
    redis_bitmap_set_bit_sync.as_step(
        name="mark_user_active",
        key="active_users:2026-09-19",
        offset=4096,
        value=1
    ),
    # Count total active users in sub-millisecond time
    redis_bitmap_count_bits_sync.as_step(
        name="count_active_users",
        key="active_users:2026-09-19",
        response_key="total_dau"
    )
])

result = pipeline.run({})
print(f"Total DAU: {result['total_dau']}")
Enter fullscreen mode Exit fullscreen mode

Why developers love wpipe-steps:

  • 196 cataloged steps covering Redis, ClickHouse, MySQL, WAF, S3, Docker, and local HuggingFace AI.
  • Lazy-loading imports for instant sub-100ms startup times.
  • Clean .as_step() factory interface.

Installation & Repository

pip install wpipe-steps
Enter fullscreen mode Exit fullscreen mode

Author: William Steve Rodríguez Villamizar (Wisrovi)

Top comments (0)