Skip to main content

Proxy URL

Use the StarTree Pinot Proxy URL in place of the broker URL:
where broker.XXXX is your regular broker host. The Pinot Proxy routes query requests to brokers while preserving broker-tenant isolation. A table can be mapped to one broker tenant, multiple tables can share a broker tenant, and one broker can serve multiple tenants. Pinot Proxy

Request Routing

The proxy routes a query to a broker only when that broker can serve every table used by the query. If a multi-table query references tables that are not served by one common broker, the query fails. In the diagram above:
  • A Table 1 JOIN Table 2 query can route to Broker 1 or Broker 2.
  • A Table 1 JOIN Table 3 query can route only to Broker 2.
  • A Table 1 JOIN Table 4 query cannot be routed.
By default, the proxy parses the SQL query to determine the referenced tables. To avoid that parsing overhead, pass table names with the FORWARD_TABLE header.
  • For multi-table queries, pass one FORWARD_TABLE header per table.
  • If you use databases, use <database>.<table>.
  • Do not include the _OFFLINE or _REALTIME suffix unless the endpoint explicitly asks for a typed table name.
  • Keep the headers consistent with the SQL. The proxy trusts the headers for routing, so an incorrect header can route to a broker that cannot serve the query.

Header-Routed Query

To confirm a query is using the headers, intentionally pass a mismatched table in a non-production environment. The request should fail when the selected broker cannot serve the SQL table.

Query Endpoints

Use these endpoints for normal query execution through the proxy:

Standard SQL

Multi-Stage Query Endpoint

Data Access Layer Query

Paginated Query Results

For large result sets, enable proxy pagination on POST /query/sql by adding doPaginate=true. The proxy forwards the request to the broker’s StarTree pagination namespace and returns a requestId that can be used to fetch result pages.
Fetch result pages with the returned request ID:
Read metadata for the paginated query:
List and clean stored paginated results:
The /query/{requestId}/results, /query/{requestId}/metadata, and /query/resultStore proxy endpoints forward to the older StarTree pagination namespace and are marked deprecated in the proxy implementation. Prefer cursor response-store APIs for new integrations when available in your environment.

Cursor Response Store

The proxy also forwards Pinot cursor response-store APIs. Example:
Deleting response stores requires cluster-level authorization for response-store deletion.

Routing And Debug APIs

Use routing and debug endpoints only for validation, incident response, or with StarTree support guidance. They expose broker routing state and can change routing state when using PUT or DELETE. Examples:
Typed table names and segment names in path parameters must be URL encoded when they contain characters that are not path-safe.

Health And Controller Pass-Through

Check proxy health with:
Requests that do not match a proxy-specific broker/query route are forwarded to the controller. This lets controller APIs continue to work through the proxy, but query clients should prefer the explicit query endpoints listed above.

Usage Considerations

  • Use FORWARD_TABLE headers for high-throughput applications to avoid repeated SQL parsing at the proxy.
  • Pass every table used by a join as a separate FORWARD_TABLE header.
  • Keep customer applications on /query/sql, /query, or cursor endpoints. Reserve debug and routing mutation APIs for operational workflows.
  • When using databases, include the database-qualified table name in FORWARD_TABLE.
  • Use typed table names such as orders_OFFLINE only for APIs that explicitly ask for a table name with type.