> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usecharlie.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Scalability

> Performance, infrastructure, and availability

Charlie is built for enterprise-scale operations, leveraging Shopify and Cloudflare infrastructure for reliability and performance.

## Infrastructure

Charlie operates on **Cloudflare Workers**—the same infrastructure backbone that Shopify relies on.

<Note>
  This represents a shared dependency rather than an additive risk factor.
</Note>

```mermaid theme={"system"}
flowchart TB
    subgraph ShopifyInfra["Shopify infrastructure (on Cloudflare)"]
        Customer["Customer data"]
        Payment["Payment data"]
        Orders["Order data"]
        Inventory["Inventory"]
        Metafields["Metafields"]
        Functions["Shopify Functions"]
    end
    
    subgraph CharlieInfra["Charlie infrastructure (on Cloudflare)"]
        Config["Configuration"]
        Sync["Sync engine"]
        Dashboard["Dashboard"]
    end
    
    Config -->|"writes rules"| Metafields
    Sync -->|"reads/writes"| Metafields
    Functions -->|"executes at checkout"| Metafields
```

## Performance

Charlie's routing logic is written in **Rust** and compiled to **WebAssembly**, executing in under 1ms with zero impact on checkout speed.

| Metric           | Capability      |
| ---------------- | --------------- |
| Locations        | 800+            |
| Product variants | 100k+           |
| Cart size        | 200+ line items |
| Execution time   | \< 1ms          |

## Peak traffic handling

During peak traffic events:

* **Checkout functions** scale automatically through Shopify
* **Application infrastructure** scales automatically through Cloudflare
* **Rate limiting** protects Shopify APIs from overload

<Tip>
  Charlie adds no additional scaling complexity. If Shopify can handle your traffic, so can Charlie.
</Tip>

## Availability scenarios

<AccordionGroup>
  <Accordion title="Charlie becomes unavailable (no sync in progress)">
    Checkout continues normally. Routing functions execute within Shopify using cached metafield data.
  </Accordion>

  <Accordion title="Charlie becomes unavailable during sync">
    The bulk operation pauses and resumes upon recovery. Checkout remains unaffected.
  </Accordion>

  <Accordion title="Cloudflare experiences an outage">
    Shopify will likely face similar issues given the shared infrastructure dependency.
  </Accordion>
</AccordionGroup>

## Service continuity

| Scenario               | Impact                                   |
| ---------------------- | ---------------------------------------- |
| Charlie dashboard down | Checkout unaffected, routing continues   |
| Charlie sync paused    | Checkout unaffected, resumes on recovery |
| Full Cloudflare outage | Shopify likely affected too              |

<Info>
  Routing functions execute within Shopify, independently of Charlie's availability. Your checkout is never dependent on Charlie being online.
</Info>

## Related

<CardGroup cols={2}>
  <Card title="Integration" icon="plug" href="/enterprise/integration">
    How Charlie integrates with Shopify
  </Card>

  <Card title="Security" icon="shield" href="/enterprise/security">
    Data governance and security controls
  </Card>
</CardGroup>
