{
  "patterns": {
    "database": [
      {
        "name": "PostgreSQL with Read Replicas",
        "description": "Master-replica architecture for OLTP workloads",
        "suitable_for": [
          "Strong consistency requirements",
          "Complex relational queries",
          "ACID transactions critical",
          "10K-100K concurrent users"
        ],
        "scale_limits": {
          "max_concurrent_users": 100000,
          "max_data_size": "multi-terabyte",
          "read_capacity": "10K+ req/sec with caching"
        },
        "operational_overhead": "high",
        "team_size_required": 2,
        "cost_estimate": {
          "min": 2000,
          "max": 15000,
          "currency": "USD/month"
        },
        "gdpr_friendly": true,
        "compliance_notes": "Encrypted backups, audit logging available"
      },
      {
        "name": "DynamoDB (NoSQL)",
        "description": "Serverless key-value store on AWS",
        "suitable_for": [
          "Simple key-value access patterns",
          "Consistent scale",
          "Minimal operational overhead"
        ],
        "scale_limits": {
          "max_concurrent_users": 50000,
          "max_throughput_rcu": 40000,
          "max_throughput_wcu": 40000
        },
        "operational_overhead": "low",
        "team_size_required": 1,
        "cost_estimate": {
          "min": 500,
          "max": 5000,
          "currency": "USD/month"
        },
        "gdpr_friendly": true,
        "compliance_notes": "Point-in-time recovery limited, complex queries require GSI"
      },
      {
        "name": "MongoDB Atlas",
        "description": "Managed MongoDB with automatic backups",
        "suitable_for": [
          "Flexible schema requirements",
          "Document-oriented data",
          "Global distribution needed"
        ],
        "scale_limits": {
          "max_concurrent_users": 50000,
          "max_storage": 4000,
          "max_data_size_unit": "GB"
        },
        "operational_overhead": "medium",
        "team_size_required": 1,
        "cost_estimate": {
          "min": 1000,
          "max": 10000,
          "currency": "USD/month"
        },
        "gdpr_friendly": true,
        "compliance_notes": "Compliant deployments available, HIPAA eligible"
      }
    ],
    "api_layer": [
      {
        "name": "GraphQL with Apollo Server",
        "description": "GraphQL API gateway for efficient data fetching",
        "suitable_for": [
          "Multiple frontend clients with different needs",
          "Reducing over-fetching and under-fetching",
          "Self-documenting API",
          "Real-time subscriptions"
        ],
        "latency_impact": "50-150ms overhead",
        "caching_strategy": "query result caching required",
        "team_expertise": "medium",
        "development_velocity": "high",
        "cost_estimate": {
          "min": 0,
          "max": 5000,
          "currency": "USD/month",
          "note": "Open source, costs mainly operational"
        }
      },
      {
        "name": "REST API",
        "description": "Traditional REST endpoints for simplicity",
        "suitable_for": [
          "Simple, predictable access patterns",
          "Minimal team GraphQL expertise",
          "Cache-friendly request patterns"
        ],
        "latency_impact": "10-50ms overhead",
        "caching_strategy": "HTTP caching (ETag, Cache-Control)",
        "team_expertise": "low",
        "development_velocity": "medium",
        "cost_estimate": {
          "min": 0,
          "max": 3000,
          "currency": "USD/month"
        }
      },
      {
        "name": "gRPC",
        "description": "High-performance RPC framework",
        "suitable_for": [
          "Microservice-to-microservice communication",
          "Low-latency requirements (< 10ms)",
          "High throughput streams"
        ],
        "latency_impact": "< 10ms overhead",
        "caching_strategy": "not applicable (streaming)",
        "team_expertise": "high",
        "development_velocity": "low",
        "cost_estimate": {
          "min": 0,
          "max": 2000,
          "currency": "USD/month"
        }
      }
    ],
    "deployment": [
      {
        "name": "Kubernetes on AWS EKS",
        "description": "Managed Kubernetes cluster on AWS",
        "suitable_for": [
          "Microservices architecture",
          "Team with Kubernetes experience",
          "Need for fine-grained control",
          "Multi-region deployments"
        ],
        "scale": "unlimited",
        "operational_overhead": "high",
        "team_size_required": 3,
        "cost_estimate": {
          "min": 5000,
          "max": 20000,
          "currency": "USD/month"
        },
        "setup_time_weeks": 4,
        "compliance_notes": "VPC isolation, IAM integration, audit logging"
      },
      {
        "name": "AWS App Runner",
        "description": "Fully managed container service",
        "suitable_for": [
          "Monolithic applications",
          "Minimal Kubernetes expertise",
          "Simple deployment model needed"
        ],
        "scale": "up to 50K req/sec",
        "operational_overhead": "low",
        "team_size_required": 1,
        "cost_estimate": {
          "min": 500,
          "max": 5000,
          "currency": "USD/month"
        },
        "setup_time_weeks": 1,
        "compliance_notes": "Auto-scaling, monitoring, but less control"
      },
      {
        "name": "AWS Elastic Beanstalk",
        "description": "Platform-as-a-service for applications",
        "suitable_for": [
          "Rapid deployment without infrastructure focus",
          "Team new to cloud deployment",
          "Quick time-to-market"
        ],
        "scale": "up to 10K req/sec",
        "operational_overhead": "medium",
        "team_size_required": 1,
        "cost_estimate": {
          "min": 1000,
          "max": 8000,
          "currency": "USD/month"
        },
        "setup_time_weeks": 2,
        "compliance_notes": "Good compliance support, but less flexibility"
      }
    ]
  },
  "combination_recommendations": [
    {
      "name": "Startup Fast-Track",
      "database": "PostgreSQL (RDS)",
      "api": "REST API",
      "deployment": "AWS App Runner",
      "reason": "Minimal operational overhead, rapid deployment"
    },
    {
      "name": "Scale-Ready Microservices",
      "database": "PostgreSQL + read replicas",
      "api": "GraphQL with Apollo",
      "deployment": "Kubernetes on AWS EKS",
      "reason": "Designed for 10K+ concurrent users, independent scaling"
    },
    {
      "name": "Real-Time & Analytics",
      "database": "PostgreSQL (OLTP) + Data Warehouse (Analytics)",
      "api": "GraphQL subscriptions",
      "deployment": "Kubernetes with event streaming (Kafka)",
      "reason": "Separates transactional and analytical workloads"
    }
  ]
}
