Scaling operates at the granularity of replica groups, not individual servers. You specify a target number of replica groups; the Pinot controller computes the exact set of servers to remove or restore to achieve that target. See Replica Group based Workload Isolation for background on replica groups and pools.
Prerequisites
- Your cluster is on StarTree release 0.15.0 or later.
- Your cluster is managed by the StarTree Kubernetes operator via the
PinotClustercustom resource. This feature is configured at the operator level by the StarTree Ops team — see Enabling it. - The tenant’s tables already use pool-based, replica-group-aware instance assignment — see Controller requirements for scale-down for the exact conditions the controller checks before it will scale down a tenant.
How it works
- Scheduled scaling is enabled in the
PinotClusterspec under theservercomponent, with one or more schedules defined per tenant (see Enabling it). - The operator creates and maintains a
ScheduledServerScalingcustom resource for each tenant you configure. - At each schedule’s cron time:
- Scale down — the operator calls the Pinot controller to determine which servers can be removed to reach the target replica-group count. Each affected server marks itself unavailable and drains its in-flight queries (up to 10 minutes) before its StatefulSet is scaled to zero.
- Scale up — the operator determines which previously-removed servers must come back to reach the target, and restores their StatefulSets.
- If the operator was down when a schedule fired, it still executes the missed run as long as it restarts within the
missedExecutionWindow. After that window passes, the missed run is skipped until the next occurrence.
Enabling it
Scheduled scaling is configured at the Kubernetes operator level, via thePinotCluster custom resource. This isn’t currently exposed in the Data Portal or any self-serve UI, so contact the StarTree Ops team to have it enabled for your cluster.
To enable it, share the following with StarTree Ops for each tenant you want to schedule:
To change or disable a schedule, or to remove scheduled scaling from a tenant altogether, reach out to StarTree Ops with the updated details. When a tenant is removed from the spec, the operator deletes its
ScheduledServerScaling resource and restores any servers that were left scaled down.
Configuration reference
scheduledScaling (under spec.components.server):
Each entry in
tenants:
Each entry in
schedules:
Before a server is scaled down, it marks itself unavailable and drains its in-flight queries, for up to 10 minutes, before its StatefulSet is scaled to zero. This drain timeout is fixed and isn’t currently configurable.
Cron format
Schedules use standard 5-field Unix cron (minute hour day-of-month month day-of-week). All times are evaluated in UTC — convert your local schedule to UTC before setting cron.
Typical pattern: nightly scale-down, morning scale-up
Pair aSCHEDULED_SCALE_DOWN with a SCHEDULED_SCALE_UP to shrink capacity during off-hours and restore it before peak load:
- Scale down at night to a low
targetReplicaGroups(e.g.1). - Scale up in the morning back to your full
targetReplicaGroups(e.g.3).
Checking status
The operator tracks each tenant’s scaling state in theScheduledServerScaling resource:
Notes and limitations
targetReplicaGroupsmust be greater than 0 — a schedule cannot remove every replica group.- If
targetReplicaGroupsequals the tenant’s current total replica groups, a scale-down is a no-op (nothing to remove). - Cron times are evaluated in UTC — convert your local time before setting
cron. - Scheduled scaling only affects server StatefulSets for the named tenant. It does not change Zookeeper, Controller, Broker, or Minion components.
Controller requirements for scale-down
At each scale-down, the operator asks the Pinot controller (GET /serverReplicaGroupScaleDown) which servers can be removed for the tenant. The controller only returns a server list when all of the following hold. If any fails, the scale-down is rejected and no servers are removed — fix the underlying condition and the next scheduled run (or a manual retry) will proceed.
Tenant and topology
- The tenant exists and has servers tagged for it (
<tenant>_OFFLINE/<tenant>_REALTIME). - Servers are exclusive to the tenant — no server tagged for this tenant may also carry tags for another tenant.
- Every tenant server has a pool assignment, and each pool matches at least one of the tenant’s tags.
- If a server has both OFFLINE and REALTIME tags, both must point to the same pool number.
targetReplicaGroupsmust be ≥ 1 and ≤ the current number of replica groups (pools).- If
targetReplicaGroupsequals the current replica-group count, the call succeeds but returns no servers (nothing to remove).
- No table may use
instancePartitionsMap(which bypasses pool-based assignment). - All non-dimension tables must use pool-based, replica-group-aware instance assignment.
- Each table’s configured
numReplicaGroups(when non-zero) must equal the current pool count.
- No table in the tenant may have an active or failed table rebalance job.
- The tenant may not have an active, aborted, cancelled, or unscheduled tenant rebalance job.
The controller evaluates these against a point-in-time snapshot of cluster state. The highest numbered pools are always selected for removal, so a given
(tenant, targetReplicaGroups) request is deterministic.Troubleshooting
A scale-down is rejected, with no servers removed, whenever one of the controller requirements above isn’t met. Fix the underlying condition — the next scheduled run (or a manual retry) will proceed once it’s resolved.Related
- Replica Group based Workload Isolation — background on replica groups and pool-based instance assignment.
- Cluster Health Dashboard — check overall cluster health, including replication and instance-pool checks relevant to scale-down eligibility.

