[Improvement] Support an advertised URI for Iceberg REST service discovery
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 935
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 298
Description
### What would you like to be improved?
Iceberg REST service discovery constructs the endpoint from the IRC listener configuration. When IRC binds to a wildcard address, it uses the hostname from the Gravitino request.
Behind a reverse proxy, the public IRC endpoint may have a different hostname, protocol, port, or path. For example, discovery may return `http://gravitino.example.com:9001/iceberg`, while clients need `https://iceberg.example.com/iceberg/`.
Currently, Trino clients must configure `gravitino.iceberg.rest-uri` explicitly to use the public endpoint.
### How should we improve?
Add an optional server-side configuration, such as:
```properties
gravitino.iceberg-rest.advertised-uri=https://iceberg.example.com/iceberg/
```
After the existing service availability and metalake checks, discovery should return the configured URI when present. Otherwise, retain the current address derivation behavior.
Validate the configured URI and add tests for reverse-proxy endpoints, backward compatibility, and metalake matching. This setting should only affect the advertised endpoint, leaving the IRC listener configuration unchanged.
Contributor guide
Assessment
This issue has not been assessed yet.