Design a scheduled payment system
Company: Roblox
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Onsite
Design a scheduled payment system that lets users schedule a future-dated payment and cancel a pending payment before execution. Specify REST/gRPC APIs to schedule, query status, and cancel; the data model and indexing; how jobs are scheduled and executed (e.g., scheduler, message queue, worker fleet); idempotency and deduplication; ordering and time accuracy (time zones, daylight saving, clock drift); failure handling with retries, backoff, and dead-letter queues; consistency and transactional guarantees with the payment gateway; security and compliance (PCI, encryption, PII); scaling, partitioning, and high availability; monitoring, auditing, and alerting; disaster recovery; and SLAs and capacity estimates.
Quick Answer: This question evaluates proficiency in designing a reliable, scalable scheduled payment service, testing competencies in distributed systems, API design, scheduling and execution workflows, idempotency and deduplication, time semantics, transactional consistency, security and compliance, and operational monitoring.