Expected Behavior or Use Case
The Presto Router should submit queries to both primary and backup clusters, then redirect the client to POST directly to the primary cluster while passing along the backup cluster information to the primary cluster with the redirect URL passed in as a path parameter (see #25396).
If the primary query fails, the client can failover to the already-submitted backup query using this back URL.
Presto Component, Service, or Connector
Presto Router
Possible Implementation
- POST query to the backup cluster
- Note query ID from the POST
- Redirect client to primary cluster with a
redirectUrl parameter that contains the full path of the retry query, e.g. https://backup-cluster.aws.com/v1/statement/queued/retry/{queryId}
- Note: this should not add too much latency as the POST is an in-memory operation. However, it would introduce a hop.
Example Screenshots (if appropriate):
Context
This is to support #25396. Please see that issue for context and motivation.