# Queries Per Second (QPS) — System Designer & SRE Incident Simulator > Queries Per Second (https://queriespersecond.com) is an interactive distributed systems architecture workbench, real-time QPS/latency traffic simulator, and SRE outage investigation platform with native Model Context Protocol (MCP) support for AI agents. Queries Per Second lets engineers, architects, and AI agents design cloud and agentic architectures on an interactive node-and-wire canvas, simulate request throughput (Queries Per Second), inspect P95/P99 tail latency, hourly infrastructure costs, and cascading saturation bottlenecks, or step into realistic production outage campaigns. ## Core Modes & Capabilities - **Interactive Architecture Sandbox**: Build, connect, tune, and simulate distributed systems topologies in real time. Configure per-node capacity (QPS), horizontal instance scaling, synchronous (HTTP/gRPC/SQL) vs. asynchronous (Kafka/SQS/Webhook) links, fanout multipliers, and traffic splits. - **Real-Time Flow & Bottleneck Engine (`FlowEngine`)**: Computes offered load, effective throughput, utilization %, saturation penalties, P95/P99 latency propagation, SLA pass/fail targets, and hourly cloud cost estimates across multi-tier graphs. - **SRE Incident Investigation Campaigns**: Evidence-driven debugging missions where engineers inspect component telemetry probes, evaluate falsifiable root-cause hypotheses, execute 1-to-5 minute emergency mitigations, and re-architect topologies to prevent recurrence. - **Model Context Protocol (MCP) Bridge (`system-designer` MCP Server)**: Allows AI agents (Claude Desktop, Cursor, Cline, Antigravity, custom LLMs) to read, build, layout, and simulate system architecture diagrams live in the browser over WebSocket (`ws://localhost:3100`). ## SRE Incident Campaigns Included 1. **The Midnight Outage** (*Intermediate — Resource Contention & Feedback Loops*) - **Episode 01: The Phantom Healthy System (`ep1-connection-pool-starvation`)**: App CPU is 12%, `/health` returns `200 OK`, yet 58% of customer checkouts time out with `504 Gateway Timeout` and P99 latency hits `8,420 ms`. Root cause: a background enterprise CSV export job holds 70% (69/100) of the shared PostgreSQL connection pool while aggressive client retries without jitter trigger a retry storm. Prevention pattern: **Bulkhead Pattern & Workload Isolation** (dedicated connection pools, read replica for reporting, jittered exponential backoff). - **Episode 02: The Thundering Herd (`ep2-thundering-herd-cache`)**: A flash sale hot key (`item:deal-of-century`) expires in Redis, causing cache hit rate to collapse from 99.4% to 14.2% and 4,710 identical queries/sec to saturate PostgreSQL at 100% CPU. Prevention pattern: **Singleflight Mutex & Probabilistic Early Refresh (XFetch)**. 2. **The Resilient Ledger** (*Advanced — Distributed Transactions & Idempotency*) - **Episode 01: The Double Charge Catastrophe (`ep1-double-charge-race`)**: Mobile client network retries during peak checkout execute concurrently without atomic deduplication, causing 18.4% duplicate order charges and a `$428,000` ledger imbalance. Prevention pattern: **Transactional Idempotency Store + Distributed Lock (Redis SETNX / Redlock)**. ## 70+ Architecture Modules Catalog (14 Categories) - **Clients**: Android App, iOS App, Web App, Desktop App, Mobile Web, Smartwatch App, Smart TV App, VR/AR App, CLI Tool, Browser Extension. - **Gateways & Traffic**: API Gateway, Load Balancer, GraphQL Gateway, Service Mesh Ingress, Reverse Proxy (Nginx/Envoy). - **Services & Compute**: Microservice, Lambda / Serverless, Batch Job, Cron Worker, Monolith Service, Edge Function, BFF (Backend For Frontend). - **Databases**: RDS, DynamoDB, PostgreSQL, MySQL, MongoDB, Cassandra, Neo4j (Graph DB), ElasticSearch, Snowflake, BigQuery. - **Caches**: Redis, Memcached, ElastiCache, CDN, Application Cache, Hazelcast, In-Memory LRU Cache. - **Queues**: SQS, RabbitMQ, Apache Kafka, ActiveMQ, Redis Queue, Google Pub/Sub, Azure Service Bus. - **Streams**: Kinesis, Apache Kafka Streams, Apache Flink, Apache Spark Streaming, Event Hub, Materialized Streams. - **Storage**: S3 Bucket, Blob Storage, GCS, Local Disk Storage, NAS / NFS. - **Observability**: NewRelic, Datadog, Prometheus, Grafana, Jaeger Tracing, OpenTelemetry Collector. - **Security**: IAM, Cognito / Auth0, KMS Encryption, WAF, OAuth Server, Secrets Manager, Certificate Manager. - **DevOps & Infrastructure**: Kubernetes Cluster, EC2 Instance, Docker Container, ArgoCD Pipeline, Jenkins Pipeline, GitHub Actions, Terraform Infrastructure. - **Integrations**: Stripe Payment Gateway, Plaid, Twilio, Salesforce, Webhook Endpoint. - **AI & Agentic Systems**: LLM Model (OpenAI/Llama/Mixtral), Agent Planner, Agent Orchestrator, Tool Adapter / Tool Bridge, Reasoning Engine, Memory Store, Vector Database, Embedding Model, Retrieval Engine (RAG), Function Calling Engine, Self-Reflection Component, Evaluator Agent, Safety + Guardrail Layer, Prompt Router, Supervisor Agent, Simulation / Sandbox Engine. - **Machine Learning**: Feature Store, Training Pipeline, ML Inference Service, Model Registry, Model Monitoring. ## AI Agent / MCP Server Integration AI agents can control the System Designer workspace via the built-in MCP server (`mcp-server`): - **Node Tools**: `add_node`, `update_node`, `remove_node`, `list_nodes`, `move_node` - **Edge Tools**: `connect_nodes`, `disconnect_nodes`, `update_edge`, `list_edges` - **Diagram Tools**: `get_diagram`, `import_diagram`, `clear_diagram`, `save_diagram`, `load_diagram`, `auto_layout` - **Simulation & Catalog Tools**: `run_simulation`, `get_available_components` - **Challenge Tools**: `list_challenges`, `start_challenge`, `get_challenge_info` ## Further Documentation for AI & Search - [Full Technical Reference & Complete Catalog (`/llms-full.txt`)](https://queriespersecond.com/llms-full.txt): Detailed specifications of every module's default QPS capacity, P95 latency, hourly cost rate, simulation formulas, and full SRE incident telemetry trees. - [Interactive Application (`/`)](https://queriespersecond.com/): Launch the live System Designer sandbox and SRE campaign workbench.