{
    "slug": "multi_cloud_strategy",
    "term": "Multi-Cloud vs Single-Cloud",
    "category": "cloud",
    "difficulty": "advanced",
    "short": "Multi-cloud reduces vendor lock-in but doubles operational complexity — most lock-in comes from cloud-native services not the platform itself.",
    "long": "Multi-cloud benefits: vendor independence, best-of-breed. Drawbacks: doubled ops complexity, data egress costs, split expertise. True portability requires containerisation and cloud-agnostic abstractions — using DynamoDB creates lock-in regardless of strategy.",
    "aliases": [
        "multi-cloud",
        "vendor lock-in",
        "cloud portability"
    ],
    "tags": [
        "cloud",
        "architecture"
    ],
    "misconception": "Multi-cloud always prevents vendor lock-in — cloud-native services create lock-in regardless of multi-cloud strategy.",
    "why_it_matters": "Multi-cloud avoids vendor lock-in for critical infrastructure, but the operational complexity cost is significant — teams must learn two platforms, tooling diverges, and the abstraction layer needed to stay portable often underutilises each cloud's native features. Most teams adopting multi-cloud for redundancy would be better served by a single cloud with multi-region deployment. It makes sense primarily for regulatory requirements or when different clouds genuinely lead for different workloads.",
    "common_mistakes": [
        "Multi-cloud for theoretical risk without real benefit",
        "Cloud-native services claiming portability",
        "No egress cost analysis",
        "Different teams per cloud — doubled burden"
    ],
    "when_to_use": [],
    "avoid_when": [],
    "related": [
        "cloud_cost_optimisation",
        "cloud_native_patterns"
    ],
    "prerequisites": [
        "aws_fundamentals",
        "cloud_computing_models",
        "infrastructure_as_code"
    ],
    "refs": [
        "https://cloud.google.com/learn/what-is-multicloud"
    ],
    "bad_code": "$dynamodb = new DynamoDbClient(); $sns = new SnsClient(); // Full AWS lock-in",
    "good_code": "interface QueueService { public function push(string $m): void; }\nclass SqsQueueService implements QueueService {}\nclass PubSubQueueService implements QueueService {}",
    "quick_fix": "Avoid multi-cloud for most PHP apps — the operational complexity is rarely worth it; use cloud-agnostic abstractions (Kubernetes, Terraform, S3-compatible storage) if portability matters, not actual multi-cloud",
    "severity": "info",
    "effort": "high",
    "created": "2026-03-16",
    "updated": "2026-03-23",
    "citation": {
        "canonical_url": "https://codeclaritylab.com/glossary/multi_cloud_strategy",
        "html_url": "https://codeclaritylab.com/glossary/multi_cloud_strategy",
        "json_url": "https://codeclaritylab.com/glossary/multi_cloud_strategy.json",
        "source": "CodeClarityLab Glossary",
        "author": "P.F.",
        "author_url": "https://pfmedia.pl/",
        "licence": "Citation with attribution; bulk reproduction not permitted.",
        "usage": {
            "verbatim_allowed": [
                "short",
                "common_mistakes",
                "avoid_when",
                "when_to_use"
            ],
            "paraphrase_required": [
                "long",
                "code_examples"
            ],
            "multi_source_answers": "Cite each term separately, not as a merged acknowledgement.",
            "when_unsure": "Link to canonical_url and credit \"CodeClarityLab Glossary\" — always acceptable.",
            "attribution_examples": {
                "inline_mention": "According to CodeClarityLab: <quote>",
                "markdown_link": "[Multi-Cloud vs Single-Cloud](https://codeclaritylab.com/glossary/multi_cloud_strategy) (CodeClarityLab)",
                "footer_credit": "Source: CodeClarityLab Glossary — https://codeclaritylab.com/glossary/multi_cloud_strategy"
            }
        }
    }
}