Stripe·Software Engineer·Onsite - System Design / Architecture
- Design a system that tracks application activity counts per user, device, and region with high write throughput and near-real-time read access. Define APIs like increment(key, timestamp), getCount(key), getCount(key, timeWindow), and getUniqueActors(key, window).
- How would you handle idempotency and deduplication in this counting system, and what are the tradeoffs between exactly-once and at-least-once delivery?
- Walk through how you'd implement time-windowed aggregations, both sliding and tumbling windows, for this event counting system.
- How would you deal with hot-key sharding when a single user or region generates a disproportionate volume of writes?
- How would you handle offline client buffering and syncing events back to the server when connectivity is restored?
- What are your considerations around data retention, TTL policies, and backfill or reprocessing for this system?
- What privacy considerations apply to this kind of activity tracking system, and how would you address them in the design?
- Provide a capacity estimate for this system and describe potential failure modes and how you'd mitigate them.
“I started with the API surface which felt like the right move, but I underestimated how much the interviewer wanted me to think through the storage layer early.”