{
  "service": {
    "name": "atlas-kv",
    "version": "3.8.1",
    "environment": "production",
    "region": "ca-central-1",
    "clusterId": "kv-prod-ca-01"
  },
  "server": {
    "bindAddress": "0.0.0.0",
    "clientPort": 7400,
    "peerPort": 7401,
    "requestTimeoutMs": 3000,
    "maxRequestBytes": 1048576,
    "tls": {
      "enabled": true,
      "certificatePath": "/etc/atlas-kv/tls/server.crt",
      "privateKeyPath": "/etc/atlas-kv/tls/server.key",
      "clientCaPath": "/etc/atlas-kv/tls/clients-ca.crt",
      "requireClientCertificate": true,
      "minimumVersion": "TLS1.3"
    }
  },
  "cluster": {
    "replicationFactor": 3,
    "consistency": {
      "defaultRead": "quorum",
      "defaultWrite": "quorum",
      "allowStaleReads": false
    },
    "nodes": [
      {
        "id": "node-ca-01a",
        "host": "10.24.1.11",
        "zone": "ca-central-1a",
        "roles": [
          "voter",
          "storage"
        ],
        "weight": 100
      },
      {
        "id": "node-ca-01b",
        "host": "10.24.2.11",
        "zone": "ca-central-1b",
        "roles": [
          "voter",
          "storage"
        ],
        "weight": 100
      },
      {
        "id": "node-ca-01c",
        "host": "10.24.3.11",
        "zone": "ca-central-1c",
        "roles": [
          "voter",
          "storage"
        ],
        "weight": 100
      }
    ],
    "failureDetection": {
      "heartbeatIntervalMs": 500,
      "suspectTimeoutMs": 5000,
      "deadNodeTimeoutMs": 30000
    }
  },
  "storage": {
    "engine": "lsm",
    "dataDirectory": "/var/lib/atlas-kv/data",
    "writeAheadLog": {
      "enabled": true,
      "directory": "/var/lib/atlas-kv/wal",
      "syncMode": "batch",
      "syncIntervalMs": 10,
      "segmentSizeBytes": 67108864
    },
    "compaction": {
      "strategy": "leveled",
      "targetFileSizeBytes": 134217728,
      "maximumConcurrentJobs": 4
    },
    "cache": {
      "blockCacheBytes": 4294967296,
      "indexCacheBytes": 536870912,
      "evictionPolicy": "lru"
    }
  },
  "namespaces": [
    {
      "name": "sessions",
      "defaultTtlSeconds": 86400,
      "maximumValueBytes": 262144,
      "replicationFactor": 3,
      "compression": "zstd"
    },
    {
      "name": "feature-flags",
      "defaultTtlSeconds": null,
      "maximumValueBytes": 65536,
      "replicationFactor": 3,
      "compression": "none"
    },
    {
      "name": "rate-limits",
      "defaultTtlSeconds": 3600,
      "maximumValueBytes": 16384,
      "replicationFactor": 3,
      "compression": "lz4"
    }
  ],
  "authentication": {
    "enabled": true,
    "provider": "oidc",
    "oidc": {
      "issuer": "https://identity.example.net",
      "audience": "atlas-kv",
      "jwksRefreshIntervalSeconds": 900
    },
    "serviceAccounts": [
      {
        "name": "checkout-api",
        "namespaces": [
          "sessions",
          "feature-flags"
        ],
        "permissions": [
          "read",
          "write"
        ]
      },
      {
        "name": "analytics-reader",
        "namespaces": [
          "feature-flags"
        ],
        "permissions": [
          "read"
        ]
      }
    ]
  },
  "rateLimiting": {
    "enabled": true,
    "requestsPerSecond": 25000,
    "burstCapacity": 50000,
    "perClient": {
      "requestsPerSecond": 1000,
      "burstCapacity": 2000
    }
  },
  "observability": {
    "logging": {
      "level": "info",
      "format": "json",
      "includeRequestIds": true,
      "redactedFields": [
        "authorization",
        "cookie",
        "value"
      ]
    },
    "metrics": {
      "enabled": true,
      "endpoint": "/metrics",
      "port": 9090,
      "labels": {
        "team": "platform-storage",
        "environment": "production"
      }
    },
    "tracing": {
      "enabled": true,
      "protocol": "otlp-grpc",
      "endpoint": "otel-collector.monitoring.svc.cluster.local:4317",
      "sampleRate": 0.05
    }
  },
  "backup": {
    "enabled": true,
    "schedule": "0 */6 * * *",
    "destination": "s3://atlas-kv-backups-ca/prod/cluster-01",
    "encryption": {
      "enabled": true,
      "keyId": "arn:aws:kms:ca-central-1:123456789012:key/7f81a2d9-2c78-4d1b-8f41-c1220f73c846"
    },
    "retention": {
      "hourly": 24,
      "daily": 14,
      "weekly": 8
    }
  },
  "maintenance": {
    "drainTimeoutSeconds": 120,
    "shutdownGracePeriodSeconds": 45,
    "automaticRepair": true,
    "repairConcurrency": 2,
    "preferredWindow": {
      "day": "Sunday",
      "startTime": "03:00",
      "durationMinutes": 120,
      "timezone": "America/Toronto"
    }
  }
}