PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/System Design/Stripe

Design a local activity counter service

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's skills in designing large-scale distributed systems, focusing on near-real-time ingestion and aggregation, idempotency/deduplication, time-windowed (tumbling and sliding) analytics, hot-key sharding, storage and backfill strategies, and operational concerns including monitoring and privacy.

  • hard
  • Stripe
  • System Design
  • Software Engineer

Design a local activity counter service

Company: Stripe

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Technical Screen

Design a system that counts local application activities and operations per user, device, and region with high write throughput and near-real-time reads. Define APIs such as increment(key, timestamp), getCount(key), getCount(key, timeWindow), and getUniqueActors(key, window). Address idempotency and deduplication, exactly-once vs at-least-once tradeoffs, time-windowed aggregations (sliding and tumbling), hot-key sharding, storage choices (e.g., write-optimized store plus aggregation layers), offline client buffering and sync, retention and TTL, backfill and reprocessing, privacy considerations, and monitoring and alerting. Provide a capacity estimate and describe failure modes and mitigations.

Quick Answer: This question evaluates a candidate's skills in designing large-scale distributed systems, focusing on near-real-time ingestion and aggregation, idempotency/deduplication, time-windowed (tumbling and sliding) analytics, hot-key sharding, storage and backfill strategies, and operational concerns including monitoring and privacy.

Related Interview Questions

  • Design a Superhero Dispatch System - Stripe (medium)
  • Design a Distributed Metrics Counter - Stripe (hard)
  • Design a superhero incident dispatch system - Stripe (medium)
  • Design a Merchant Ledger Service - Stripe (medium)
  • Design ledger and bikemap integration - Stripe (hard)
|Home/System Design/Stripe

Design a local activity counter service

Stripe logo
Stripe
Sep 6, 2025, 12:00 AM
hardSoftware EngineerTechnical ScreenSystem Design
8
0

System Design: Near-Real-Time Activity Counting Service

Context

Build a service that ingests high-throughput client events and provides near-real-time aggregations of activity counts per user, device, and region. The system must support time-windowed queries (tumbling and sliding), deduplication/idempotency, hot-key sharding, and privacy-by-design. It should be resilient, observable, and support backfill/reprocessing.

Assume the service is multi-tenant and globally deployed with regional data residency. Reads should be near-real-time (seconds), writes are very high-throughput, and clients may be offline and sync later.

Requirements

  1. APIs
    • increment(key, timestamp)
    • getCount(key)
    • getCount(key, timeWindow)
    • getUniqueActors(key, timeWindow)
  2. System properties
    • High write throughput with near-real-time reads
    • Idempotency and deduplication for retries/replays
    • Discuss exactly-once vs at-least-once delivery tradeoffs
    • Time-windowed aggregations: tumbling and sliding
    • Hot-key sharding to avoid partition hotspots
    • Storage choices (e.g., write-optimized store + aggregation layers)
    • Offline client buffering and sync
    • Retention and TTL policies
    • Backfill and reprocessing strategy
    • Privacy considerations
    • Monitoring and alerting
    • Capacity estimate (state assumptions) and failure modes with mitigations

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Stripe•More Software Engineer•Stripe Software Engineer•Stripe System Design•Software Engineer System Design

Your design canvas — auto-saved

PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.