SystemDesignDraw Logo
SystemDesignDraw

Architecture Whiteboard & Math

Growth & MessagingBeginner Difficulty6 min read

Design Customer Onboarding & Email Verification Workflow

A customer onboarding and verification pipeline that guarantees instant sub-3 second welcome emails, blocks throwaway fraud accounts, and protects sender domain reputation (SPF/DKIM/DMARC) without blocking registration response times.

Estimated Traffic2,000 Signups/sec • 10,000 Email Events/sec
5-Year Data Footprint6 Terabytes (User Profiles & Webhook Logs)
Target Latency< 15 milliseconds
Availability Target99.99% (4 Nines)
Need custom numbers for your interview?Calculate QPS & capacity in System Design Cheat Sheet →

Live Architecture Studio

Edit components, modify labels, add databases, or redraw connections directly on this canvas:

Browse Component Stencils & Icons →

1. Problem & Challenge

Sending emails synchronously inside the signup HTTP request creates slow page loads and causes registration failures if third-party email APIs hiccup. Furthermore, spam signups and invalid emails destroy email deliverability reputations.

2. Core Building Blocks & Responsibilities

👉 Swipe table horizontally to view roles and responsibilities
ComponentRolePlain-English Explanation
User Registration APISignup GatewayIngests email and password, hashes credentials with Argon2id, and responds in <25ms.
HMAC Token GeneratorStateless Token SignerProduces a tamper-proof 30-minute verification token containing user identity and expiration.
AWS SQS FIFO QueueAsynchronous DecouplerBuffers email dispatch requests, preventing downstream email service outages from stalling signups.
Transactional Mail ProviderHigh-Reputation DispatcherInjects templates and signs email headers with 2048-bit DKIM, SPF, and DMARC alignments.
Customer Inbox & Magic LinkUser Verification PortalCustomer opens email and clicks verification URL within the 30-minute validity window.
Activation GatewayCryptographic Activation NodeVerifies HMAC signature mathematically, updates user verification flag, and redirects to dashboard.

3. Step-by-Step Request Flow

1

User Signs Up

Visitor enters credentials; API validates email format, hashes password, and creates an unverified account.

2

Stateless Token Generation

Backend generates HMAC-SHA256 signature containing user ID and expiration, avoiding extra database writes.

3

Async Queue Decoupling

Email job is published to AWS SQS FIFO queue; user gets an immediate HTTP 201 response in under 25ms.

4

DKIM-Signed Dispatch

Queue consumer invokes Resend/SendGrid API; email is dispatched with authenticated DKIM and SPF records.

5

Customer Link Click

Customer receives email in under 3 seconds and clicks the secure activation URL.

6

Cryptographic Account Activation

Gateway validates token signature in microseconds, flips is_verified = true, and logs user into onboarding.

4. Architectural Trade-offs

Decision:

Stateless HMAC Token vs Database Record

Chosen: Stateless HMAC-SHA256 Token

Rationale: Eliminates database write and row-lock contention during massive marketing signup spikes; verified mathematically.

Decision:

Async Queue Decoupling vs Synchronous Send

Chosen: AWS SQS FIFO Decoupling

Rationale: Insulates signup API response times and prevents failed third-party email APIs from breaking registrations.

Interview Tip

Explain why GET requests should render a confirmation button rather than auto-activating accounts: corporate spam scanners (e.g., Microsoft Defender) pre-fetch links, which can accidentally invalidate single-use links.

Distributed Architectures

Explore Related System Blueprints

View All Blueprints (19) →
Beginner Friendly6 min read

TinyURL Shortener

A URL shortener converts a long link (like a 100-character article URL) into a compact 7-character key (like tinyurl.com/xyz123) and redirects visitors in under 15 milliseconds.

Study Architecture →
Interview Favorite7 min read

API Rate Limiter

A rate limiter acts as a digital bouncer at the door of your API, ensuring each client stays within their allowed request limits (e.g. 100 requests per minute) and blocking abusive traffic.

Study Architecture →
Streaming & Media9 min read

Video Streaming CDN

Streaming high-definition video to millions of smart TVs and mobile phones requires breaking large 10GB video files into tiny 5-second chunks, encoding each into 20 different resolutions, and caching them right inside local ISP networks.

Study Architecture →
Real-Time & Geo10 min read

Uber Dispatch Engine

A real-time geospatial dispatch system matches riders with the most optimal nearby drivers using 64-bit H3 hexagonal indexing and 2-second batch optimization, minimizing city-wide pickup ETA and driver idle time.

Study Architecture →
Fintech & Ledger11 min read

Stripe Payments Ledger

A resilient financial payments architecture guarantees strict consistency (CP system) using cryptographic idempotency reservation, double-entry balanced postings, and sharded balance locks.

Study Architecture →
Real-Time & Collab9 min read

Figma Multiplayer Engine

A real-time multiplayer document engine uses stateful sticky session routing and server-authoritative operational ordering to sync 2D scene graphs across worldwide collaborators without locking.

Study Architecture →