PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/System Design/DoorDash

Design a donations service with 3-day rolling totals

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's competency in designing scalable, low-latency streaming data systems, covering event-time windowing, rolling-window aggregation, idempotency for duplicate events, late/out-of-order handling, and auditability.

  • medium
  • DoorDash
  • System Design
  • Software Engineer

Design a donations service with 3-day rolling totals

Company: DoorDash

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Onsite

Design a service that ingests donations and serves **rolling 3-day donation totals**. ## Requirements ### Core features 1. **Ingest donation** events: - Each donation has: `donation_id` (unique), `user_id`, `campaign_id`, `amount`, `currency`, `created_at` (event time). 2. Query APIs: - `GET /campaigns/{id}/total?window=72h` → total donated to that campaign in the last 72 hours (rolling window). - `GET /leaderboard?window=72h&k=100` → top-K campaigns by donated amount in the last 72 hours. ### Correctness and scale expectations - Must handle **duplicate submissions** (retries) safely (idempotency). - Donations may arrive **late/out of order** (e.g., mobile offline, retries). - Support high write throughput (assume 5k–50k donations/sec) and high read QPS for totals/leaderboard. - Windowing is based on **event time** (`created_at`), not ingestion time. ### Non-functional - Low latency reads (p95 < 200ms for totals and leaderboard). - Strong auditability (ability to reconcile totals from raw events). ## Deliverables - High-level architecture - Data model and storage choices - Windowed aggregation approach - Handling idempotency, late events, and consistency - Scaling, caching, and failure modes

Quick Answer: This question evaluates a candidate's competency in designing scalable, low-latency streaming data systems, covering event-time windowing, rolling-window aggregation, idempotency for duplicate events, late/out-of-order handling, and auditability.

Related Interview Questions

  • Design a Food Rating System - DoorDash (medium)
  • Design a resilient bootstrap API - DoorDash (medium)
  • Design Real-Time Driver Pay Aggregation - DoorDash (hard)
  • Design Food Ratings and Driver Payouts - DoorDash (medium)
  • Design personalized restaurant search and recommendations - DoorDash (medium)
DoorDash logo
DoorDash
Dec 16, 2025, 12:00 AM
Software Engineer
Onsite
System Design
20
0

Design a service that ingests donations and serves rolling 3-day donation totals.

Requirements

Core features

  1. Ingest donation events:
    • Each donation has: donation_id (unique), user_id , campaign_id , amount , currency , created_at (event time).
  2. Query APIs:
    • GET /campaigns/{id}/total?window=72h → total donated to that campaign in the last 72 hours (rolling window).
    • GET /leaderboard?window=72h&k=100 → top-K campaigns by donated amount in the last 72 hours.

Correctness and scale expectations

  • Must handle duplicate submissions (retries) safely (idempotency).
  • Donations may arrive late/out of order (e.g., mobile offline, retries).
  • Support high write throughput (assume 5k–50k donations/sec) and high read QPS for totals/leaderboard.
  • Windowing is based on event time ( created_at ), not ingestion time.

Non-functional

  • Low latency reads (p95 < 200ms for totals and leaderboard).
  • Strong auditability (ability to reconcile totals from raw events).

Deliverables

  • High-level architecture
  • Data model and storage choices
  • Windowed aggregation approach
  • Handling idempotency, late events, and consistency
  • Scaling, caching, and failure modes

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More DoorDash•More Software Engineer•DoorDash Software Engineer•DoorDash System Design•Software Engineer System Design
PracHub

Master your tech interviews with 8,000+ 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
  • Compare Platforms
  • Discord Community

Support

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

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.