Skip to main content
BLUEPRINT #06Production Case Studies

Design a Resilient Bot Defense & Sybil-Resistant Registration Architecture — Production Case Study

Target AWS Architecture:DynamoDBElastiCacheSQSAPI Gateway
10-Stage Structure:1. Requirements2. Sizing3. Topology4. Data Model5. AWS Topology6. Deep-Dive7. Failures8. SRE Playbooks

1. Problem Statement & Mission

System Mission

Design the ingress protection and anti-abuse architecture for a high-growth developer platform (e.g. AI algorithmic mastery & coding sandbox, cloud compute provider, or developer API) offering free compute coins upon signup and referral bonuses (+25 coins+25\text{ coins}) per colleague invited.

The system must withstand coordinated bot attacks generating up to 500,000 automated registration attempts per hour, eliminate compute token farming, protect email sender reputation on Amazon SES (<2% bounce rate< 2\%\text{ bounce rate}), and preserve zero-friction onboarding for legitimate software engineers.

Functional Requirements

  1. Frictionless Human Registration: Legitimate engineers must sign up in <3 seconds< 3\text{ seconds} without solving visual puzzles or image captchas.
  2. Automated Bot Interception: Intercept and neutralize headless browser clusters (Playwright, Puppeteer, Selenium), residential proxy networks, and disposable email pools.
  3. Sybil-Resistant Referral Qualification: Referrer rewards unlock only when referred accounts complete authentic platform engagement milestones.
  4. Email Reputation Protection: Prevent mass email bombing through email verification throttles and throwaway inbox filtering.

Non-Functional Requirements (SLAs & SLOs)

  • Edge Latency Overhead: 15 ms\le 15\text{ ms} for legitimate users at the edge layer.
  • False Positive Rate: <0.01%< 0.01\% (legitimate engineers must never be falsely blocked).
  • High Availability: 99.99%99.99\% uptime for the authentication and registration service.

2. Capacity & Scale Estimation (Back-of-the-Envelope Math)

Attack Surge Volume

  • Peak Attack Rate: 500,000 registration attempts / hour140 signups / sec500,000\text{ registration attempts / hour} \approx \mathbf{140\text{ signups / sec}}.
  • Legitimate Peak Traffic: 50,000 signups / day5 - 20 signups / sec50,000\text{ signups / day} \approx 5\text{ - }20\text{ signups / sec}.
  • Peak Ingress Load during Surge: 160 requests / sec\approx \mathbf{160\text{ requests / sec}} directed at /api/auth/signup.

Database & Cache Sizing

  • Active IP / Subnet Rate Limits in :
    • Track active IPs over a 15-minute sliding window.
    • 140 req/sec×900 sec=126,000 unique IP keys140\text{ req/sec} \times 900\text{ sec} = 126,000\text{ unique IP keys}.
    • Each sliding window key (Sorted Set of timestamps): 200 bytes\approx 200\text{ bytes}.
    • Memory Required: 126,000×200 bytes25 MB RAM126,000 \times 200\text{ bytes} \approx \mathbf{25\text{ MB RAM}} (negligible footprint for cache.t4g.micro or ).
  • Disposable Email Domain :
    • 50,00050,000 disposable domains with 0.1%0.1\% false positive probability.
    • Memory: m=nlnp(ln2)290 KBm = -\frac{n \ln p}{(\ln 2)^2} \approx \mathbf{90\text{ KB}} (in-memory, sub-millisecond lookup).

Part 2: Production Deep-Dive Locked1 Coin = 24 Hours

Unlock Complete Architecture & Production Runbooks

Your Balance:40 Coins

You have explored the free architectural preview (~37%). Spend 1 Coin to unlock the remaining 3 production deep-dive sections for a full 24 hours.

Sections Included in This 24-Hour Pass:
3. End-to-End System Architecture
4. Detailed Component Implementation
5. Summary of Key Architectural Decisions
Keeps page unlocked for exactly 24 hoursSpend coins to fund LLM & compute infrastructure