-
Notifications
You must be signed in to change notification settings - Fork 129
Description
Background
Today, when the rulesType is set to FILE, Trino-Gateway loads routing rules from a local configuration file, and any update requires a service redeploy. While the gateway already supports dynamically refreshing routing rules in memory, the source of truth is still a local file, which limits operational flexibility and slows down configuration rollout.
At LinkedIn, we have been extending Trino-Gateway to support loading routing rules from Artifactory in addition local files. This allows us to:
- Update routing rules without redeploying the gateway
- Use Artifactory as a centralized, versioned, and auditable configuration store
- Reuse existing dynamic-rules refresh mechanisms already present in the gateway
We believe this approach is generally useful and could benefit the broader OSS community as well.
Proposed Approach
1. Configuration source for routing rules for file based routing rules
Introduce an abstraction that allows routing rules to be loaded from different sources, e.g.:
- Local file (current behavior)
- Artifactory (new)
2. Artifactory-backed implementation
Implement Artifactory configuration loader so that:
- The latest version of the routing rules can be fetched from Artifactory
- The existing periodic refresh logic in Trino-Gateway can reload rules automatically
At LinkedIn, this pattern is already in use in production for dynamic configuration, and we are in the process of applying it to Trino-Gateway routing rules as well. We’d like to explore upstreaming this capability so it can be broadly available and maintained in the open-source project.
Happy to contribute design, implementation, and follow-up PRs if the community agrees this direction makes sense.