🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

Add a per-table SHADOW enforcement mode for storage and query quotas #19837

Open

Description

@Tarun-kishore

Problem

Pinot currently enforces storage and QPS quotas as soon as they are configured on a table. This makes it risky to introduce or adjust quotas for existing tables.

  • Storage quota: Segment uploads are rejected with HTTP 403, and realtime consumption is paused when the quota is exceeded.
  • QPS quota: Queries exceeding the configured limit are rejected with HTTP 429.

There is no way to see how many queries or uploads would have been rejected by a proposed quota without actually enforcing it. We need a way to evaluate quota limits before enabling enforcement.

Proposal

Introduce a QuotaEnforcementMode enum with three modes: ENFORCED, SHADOW, and DISABLED.

Add two optional fields to QuotaConfig to control storage and query quota enforcement independently:

{
  "quota": {
    "storage": "10G",
    "maxQueriesPerSecond": "100",
    "storageQuotaEnforcementMode": "SHADOW",
    "queryQuotaEnforcementMode": "SHADOW"
  }
}
Mode Behavior
ENFORCED (default) Existing behavior. Quota breaches are recorded and requests are rejected.
SHADOW Quota breaches are recorded in metrics and logs, but queries and uploads are allowed to proceed.
DISABLED Quota enforcement is skipped, and no breach metrics are emitted.

Expected Behavior

  • Storage quota: In SHADOW mode, segment uploads should not be rejected and realtime consumption should not be paused due to quota breaches. Tables already paused due to storage quota should resume when switched to SHADOW.
  • Query quota: In SHADOW mode, queries exceeding the configured QPS quota should still be served.
  • Metrics: SHADOW and ENFORCED should emit the same quota breach metrics (BrokerMeter.QUERY_QUOTA_EXCEEDED and ControllerMeter.STORAGE_QUOTA_EXCEEDED), allowing operators to evaluate limits before enforcing them.
  • Backward compatibility: Tables without the new fields should continue using ENFORCED, preserving existing behavior.

Activity

  1. added
    PEP-RequestPinot Enhancement Proposal request to be reviewed.
    featureNew functionality
    and removed
    PEP-RequestPinot Enhancement Proposal request to be reviewed.
    on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew functionality

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions