Skip to content

Add Stronger Isolation Semantics for Routing Rules #797

@Peiyingy

Description

@Peiyingy

Proposal: Add Stronger Isolation Semantics for Routing Rules

Today, Trino-Gateway supports routing rules that can pin traffic to either a routing group. However, the current behavior still allows fallback routing when the pinned backend becomes unavailable.

At LinkedIn, we have some use cases where certain workloads must be strictly isolated from the general adhoc clusters. To support this, we propose introducing an optional enforceIsolation flag in routing-rule definitions.

  • When enforceIsolation = false (default), the routing behavior remains unchanged.
  • When enforceIsolation = true, the gateway would not fall back to adhoc clusters if the pinned backend becomes unavailable. Instead, the query should fail immediately at the gateway layer, ensuring true isolation.

Sample Routing Rule

---
name: "user_pinning_rule"
priority: 1
enforceIsolation: True
condition: "request.getHeader(\"X-Trino-User\") == \"user\""
actions:
  - "result.put(\"routingGroup\", \"Trino-1\")"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions