> For the complete documentation index, see [llms.txt](https://docs.e6data.com/query-engine/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.e6data.com/query-engine/guides/clusters/cluster-sizing-and-scaling.md).

# Cluster sizing and scaling

Choose a cluster sizing and scaling mode - fixed, autoscaling, QPS-based, or scale-to-zero - plus execution modes and result caching.

Size a cluster for its workload and pick the scaling mode that fits how query load behaves.

## Which scaling mode?

* **Predictable, steady load** → **Fixed size** (a T-shirt size or a custom executor count).
* **Variable or spiky load** → **Autoscaling** (set min/max executors).
* **A known target QPS** → **QPS-based scaling** (planners auto-sized to your target).
* **Long idle periods** → **Scale-to-zero** (min = 0; auto-suspend handles the rest).

## Fixed sizing

The cluster runs exactly the chosen number of executors at all times.

| Size   | Executors |
| ------ | --------- |
| XS     | 1         |
| S      | 2         |
| M      | 4         |
| L      | 8         |
| XL     | 16        |
| XXL    | 32        |
| Custom | 1–100     |

Best for steady, predictable workloads where you know the concurrency you need.

## Autoscaling

Set a **minimum** and **maximum** executor count; e6data scales between them based on query load.

| Parameter     | Range | Default | Description                        |
| ------------- | ----- | ------- | ---------------------------------- |
| Min executors | 0–100 | 1       | Floor. Set to 0 for scale-to-zero. |
| Max executors | 1–100 | 5       | Ceiling.                           |

Enable **window-based smoothing** to use a sliding window that dampens aggressive scale up/down cycles - useful when query arrival is bursty but you don't want the cluster thrashing.

## QPS-based planner scaling

If you know your target queries-per-second, enable QPS-based scaling and e6data auto-calculates the planner replica count (`planner replicas = ceil(target QPS / planner cores)`). The system validates that you have enough executor capacity to sustain the target and warns if executors are under-provisioned.

## Scale-to-zero

Set **min executors = 0**. When the cluster is idle and auto-suspend fires, all replicas drop to zero - no compute cost. The first incoming query triggers auto-resume (\~30–90 s). Best for dev/staging, intermittent batch workloads, and cost-conscious teams. See [Suspend and resume](/query-engine/guides/clusters/suspend-and-resume.md).

## Cost-control tips

* **Start small** at XS and scale up based on actual query patterns.
* **Auto-suspend everything non-production**, with a short idle timeout.
* **Scale-to-zero for batch** - if a cluster only runs scheduled jobs, `min = 0` means you pay nothing between runs.
* **Autoscaling for production** - a comfortable min for baseline latency, a max that covers peak.

## Execution modes

A cluster runs in one of two execution modes, set under **Advanced Settings**:

* **Standard** (default) - the full SQL surface area. Use for general-purpose and mixed workloads.
* **Native** - a vectorized path optimized for high-throughput, scan-heavy queries with simple filters, joins, and aggregations. Often 2–3× faster on matching workloads.

When a query uses a feature not supported by native mode (some window functions, complex types, geospatial), the cluster automatically falls back to the standard path for that query - no errors. Run History shows which path each query used. For mixed workloads, standard is the right default; for a known-fast pattern, measure native on your workload before committing.

## Result caching

Enable **result cache** (in cluster settings) to serve repeated identical queries from cache instead of re-executing them, with a configurable TTL (default 300 s). This reduces executor work and latency for dashboards and repeated reports. Caching is most effective when the same queries run frequently against data that doesn't change between runs.

## See also

* [Create and manage clusters](/query-engine/guides/clusters/create-and-manage-clusters.md)
* [Suspend and resume](/query-engine/guides/clusters/suspend-and-resume.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.e6data.com/query-engine/guides/clusters/cluster-sizing-and-scaling.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
