Designing Data-Intensive Applications
Case 10

Requirements and Constraints

Long-running forms need durable drafts, per-step validation, and async verification.

Mortgage, visa, and merchant onboarding forms are state machines measured in days, not milliseconds. Session cookies are insufficient — drafts live in the database.

Stripe at scale

Connect onboarding saves partial KYC progress. Merchants resume on a new device without re-entering verified fields.

Key Takeaways
  • Users pause for hours or days — progress must survive browser close and device switch.
  • Autosave on a timer dominates write traffic; final submit is rare.
  • Server-side validation is authoritative on every step and on submit.
  • Large attachments upload direct-to-S3; draft stores a pointer only.
  • Async vendor steps (credit check, identity) complete via webhook days later.
  • PII fields need encryption at rest; resume links must not leak secrets in URLs.
requirementsdraftautosavevalidationPIIwebhook