{
  "service": {
    "name": "atlas-kv",
    "environment": "production",
    "version": "3.8.2",
    "region": "ca-central-1",
    "listen": {
      "host": "0.0.0.0",
      "port": 7400,
      "protocol": "https"
    }
  },
  "cluster": {
    "name": "atlas-prod-ca",
    "replicationFactor": 3,
    "consistency": {
      "defaultRead": "quorum",
      "defaultWrite": "quorum",
      "allowStaleReads": false
    },
    "nodes": [
      {
        "id": "kv-ca-01",
        "host": "10.42.1.11",
        "port": 7401,
        "zone": "ca-central-1a",
        "roles": [
          "storage",
          "coordinator"
        ],
        "weight": 100
      },
      {
        "id": "kv-ca-02",
        "host": "10.42.2.12",
        "port": 7401,
        "zone": "ca-central-1b",
        "roles": [
          "storage"
        ],
        "weight": 100
      },
      {
        "id": "kv-ca-03",
        "host": "10.42.3.13",
        "port": 7401,
        "zone": "ca-central-1d",
        "roles": [
          "storage"
        ],
        "weight": 100
      }
    ],
    "membership": {
      "gossipIntervalMs": 1000,
      "failureTimeoutMs": 10000,
      "seedNodes": [
        "10.42.1.11:7402",
        "10.42.2.12:7402",
        "10.42.3.13:7402"
      ]
    }
  },
  "storage": {
    "engine": "lsm",
    "dataDirectory": "/var/lib/atlas-kv/data",
    "maxDiskUsagePercent": 85,
    "compression": {
      "enabled": true,
      "algorithm": "zstd",
      "level": 3
    },
    "compaction": {
      "strategy": "leveled",
      "targetFileSizeMb": 128,
      "maxConcurrentJobs": 4
    },
    "writeAheadLog": {
      "enabled": true,
      "directory": "/var/lib/atlas-kv/wal",
      "syncMode": "batch",
      "batchIntervalMs": 5
    }
  },
  "sharding": {
    "strategy": "consistent_hash",
    "virtualNodesPerNode": 256,
    "rebalance": {
      "automatic": true,
      "maxConcurrentTransfers": 2,
      "bandwidthLimitMbps": 250
    }
  },
  "security": {
    "authentication": {
      "enabled": true,
      "provider": "oidc",
      "issuer": "https://identity.example.net/",
      "audiences": [
        "atlas-kv-api"
      ]
    },
    "tls": {
      "enabled": true,
      "minimumVersion": "TLS1.3",
      "certificateFile": "/etc/atlas-kv/tls/server.crt",
      "privateKeyFile": "/etc/atlas-kv/tls/server.key",
      "clientCertificateMode": "required"
    },
    "encryptionAtRest": {
      "enabled": true,
      "keyProvider": "kms",
      "keyId": "alias/atlas-kv-production"
    }
  },
  "limits": {
    "maxKeyBytes": 1024,
    "maxValueBytes": 10485760,
    "maxBatchOperations": 500,
    "requestTimeoutMs": 3000,
    "namespaces": [
      {
        "name": "sessions",
        "defaultTtlSeconds": 86400,
        "maxKeys": 50000000
      },
      {
        "name": "profiles",
        "defaultTtlSeconds": null,
        "maxKeys": 10000000
      },
      {
        "name": "feature-flags",
        "defaultTtlSeconds": 300,
        "maxKeys": 100000
      }
    ]
  },
  "observability": {
    "logging": {
      "level": "info",
      "format": "json",
      "includeRequestIds": true
    },
    "metrics": {
      "enabled": true,
      "path": "/metrics",
      "port": 9090,
      "labels": {
        "service": "atlas-kv",
        "environment": "production",
        "region": "ca-central-1"
      }
    },
    "tracing": {
      "enabled": true,
      "exporter": "otlp",
      "endpoint": "https://telemetry.example.net/v1/traces",
      "sampleRate": 0.05
    }
  },
  "maintenance": {
    "snapshot": {
      "enabled": true,
      "schedule": "0 */6 * * *",
      "retentionDays": 14,
      "destination": {
        "type": "object_storage",
        "bucket": "atlas-kv-prod-backups",
        "prefix": "ca-central-1/"
      }
    },
    "gracefulShutdownSeconds": 30
  }
}