PromptBase
Upgrade
Close icon
General
Home
Marketplace
Create
Hire
Login
Chat
Sell
Explore

Prompt Details

Model
(claude-4-7-opus)
Token size
481
Example input
[SYSTEM_PURPOSE]: Real-Time Chat Application (WhatsApp clone) [EXPECTED_SCALE]: 50 Million Daily Active Users, 500k concurrent WebSocket connections [CLOUD_PREFERENCE]: AWS Native [KEY_CONSTRAINTS]: Sub 50ms message delivery latency, high write-to-read ratio
Example output
# System Architecture Blueprint ## PHASE 1: HIGH-LEVEL ARCHITECTURE **Component Overview:** - Edge Layer: Route53 (DNS) directing to AWS CloudFront (CDN) for static assets. - Entry Point: Network Load Balancers (NLB) optimized for long-lived TCP connections. - API Gateway: Handles traditional REST calls (user profiles, settings). - Connection Managers (WebSocket Servers): Fleet of stateless servers holding persistent connections to active users. **Core Data Flow (Sending a Message):** 1. User A sends a message via active WebSocket to Connection Manager 1. 2. Connection Manager 1 drops the payload into a message broker (Event Stream). 3. A Chat Service worker consumes the message, saves it to the database, and looks up User B's active connection. 4. The message is pushed to Connection Manager 2, which holds User B's WebSocket, delivering the message instantly. ## PHASE 2: DATABASE & STORAGE STRATEGY **Primary Database:** Amazon DynamoDB or Apache Cassandra. *Justification:* A chat application is extremely write-heavy. We need a NoSQL database optimized for high-throughput, low-latency writes and horizontal scalability. Cassandra/DynamoDB excel at time-series-like data appending without locking issues common in traditional RDBMS. **Caching Layer:** Redis Cluster. *Justification:* Used to store user presence (Online/Offline status) and map active User IDs to their specific Connection Manager IP address. Redis provides the sub-millisecond read/write speeds required for presence broadcasting. **Object Storage:** Amazon S3. *Justification:* Used for storing media attachments (images, videos). Uploads happen via S3 Pre-signed URLs directly from the client to avoid bottlenecking the core application servers. ## PHASE 3: MICROSERVICES & COMMUNICATION **Synchronous Communication:** REST over HTTPS for non-critical path operations (login, changing profile picture, fetching message history). **Asynchronous Communication:** Apache Kafka or Amazon Kinesis. *Justification:* Kafka is chosen over RabbitMQ because chat messages require strict ordering and high throughput persistence. If a user is offline, Kafka retains the event stream until the user reconnects and fetches missed messages. **Protocol Choice:** WebSockets (WSS). Provides full-duplex, bidirectional communication essential for sub-50ms real-time chat delivery, avoiding the overhead of HTTP long-polling. ## PHASE 4: FAULT TOLERANCE & SCALING **Bottleneck Mitigation:** - Connection Manager Memory: Holding millions of WebSockets is memory-intensive. We scale this tier horizontally using AWS Auto Scaling based on active TCP connection counts, not CPU. - Thundering Herd Problem: If a regional outage disconnects 1 million users, their simultaneous reconnection attempt will crash the API. Mitigation involves implementing client-side Exponential Backoff with Jitter for reconnections. **Disaster Recovery:** - Multi-Region Active-Active setup using DynamoDB Global Tables to ensure that if AWS us-east-1 goes down completely, users are seamlessly routed to us-west-2 via Route53 latency-based routing, maintaining full operational capability.
🌀 Claude

Enterprise System Design Architect

Add to Cart
Instant accessInstant access
Usage rightsCommercial use
Money-back guaranteeMoney‑back
By purchasing this prompt, you agree to our terms of service
CLAUDE-4-7-OPUS
Tested icon
Guide icon
4 examples icon
Free credits icon
Stop guessing how to scale. This enterprise-grade prompt acts as a Principal Solutions Architect, generating comprehensive system design blueprints for high-scale applications. It defines load balancing, database selection, microservices topology, and fault tolerance strategies. Perfect for tech leads planning new products or developers preparing for FAANG architecture interviews. Generates a strict 4-phase technical spec tailored to your exact traffic and cloud constraints.
...more
Added 1 week ago
Report
Browse Marketplace