Object-Storage Routing¶
License: Pro tier for writing the bucket map; see the [reference(../reference/BucketRouting.md).
You run S3-compatible object storage (Scality, Cloudian, MinIO, Ceph…) in several
clusters and want customers to use one hostname pattern — <bucket>.s3.example.com —
while Nexus sends each bucket's traffic to the cluster that actually holds it.
photos.s3.example.com ──▶ Nexus DNS ──▶ bucket map: photos → cluster "east" ──▶ east's S3 gateways
logs.s3.example.com ──▶ Nexus DNS ──▶ bucket map: logs → cluster "west" ──▶ west's S3 gateways
new-bucket.s3... ──▶ Nexus DNS ──▶ not mapped → default pool ──▶ wherever new buckets land
1. One pool per storage cluster¶
Each cluster's S3 gateway/endpoint IPs are the members of a pool, with a health check against the endpoint (a TCP check on the S3 port is the simplest; an HTTP check works if you know a path your gateways answer with the status you configure).
gslbctl pools create --name east # then add members + a health check (WebUI: Topology)
gslbctl pools create --name west
2. The namespace: a wildcard service¶
Create a service whose domain is *.s3.example.com. and whose default pool is
where unmapped buckets should go — typically the cluster that receives newly
created buckets. Use a low TTL (30 s) if buckets move between clusters.
The zone (example.com) must be a verified [delegated domain(../reference/DelegatedDomains.md). Issue the
*.s3.example.com certificate your clusters present with the
[ACME guide(ACMECertificates.md#step-4-configure-cert-manager-kubernetes-including-wildcards).
3. Tell Nexus where each bucket lives¶
One bucket:
gslbctl buckets set <service-id> photos <east-pool-id>
gslbctl buckets set <service-id> logs <west-pool-id>,<east-pool-id> # west primary, east replica
In bulk — this is how a storage vendor's inventory job should feed Nexus:
# inventory.txt — "<bucket> <pool>[,<replica>…]", "-" in the pool column unmaps
photos <east-pool-id>
logs <west-pool-id>,<east-pool-id>
old-bucket -
gslbctl buckets import <service-id> inventory.txt
or POST /api/v1/services/{id}/buckets with {"upsert":[…],"delete":[…]} (atomic, 2000 per call).
Also available in the WebUI: open the wildcard service in Topology → Bucket Map, which
has a "where is bucket X?" lookup and a paged list filterable by cluster.
Let Nexus discover your buckets¶
Instead of feeding the map by hand, give Nexus read access to each storage account and it keeps the map up to date. Nexus polls each source's S3 bucket list and maps every bucket it finds to that source's cluster. Entries you set by hand always win.
Status: not yet run against any real storage system. Try it on a test namespace first.
export SRC_SECRET='…' # the secret key never goes on the command line
gslbctl bucket-sources add --name east-prod --pool <east-pool-id> \
--endpoint https://s3.east.example.com --access-key AKIA… \
--secret-key-env SRC_SECRET <service-id>
The WebUI has the same under Topology → the wildcard service → Bucket Sources.
If the endpoint's certificate comes from an internal CA (common for a Cloudian
Admin API on :19443), add that CA with --ca-file; Nexus always verifies TLS and
has no option to skip it:
A newly created bucket is served by the default pool until the next poll (every
60 s by default), or run gslbctl bucket-sources sync <service-id> <source-id> to
poll it now. A source that fails keeps its buckets, and a bucket that disappears
is unmapped only after 3 successful polls without it. Full rules:
[reference(../reference/BucketRouting.md#bucket-discovery-sources).
| Vendor | How to set it up | Status |
|---|---|---|
| Any S3-compatible system | one s3 source per account/project |
Generic S3 ListBuckets; not yet tested against a real system |
| Cubbit DS3 | one s3 source per project; the key needs s3:ListAllMyBuckets; custom tenants use https://s3.<tenant>.cubbit.eu |
From Cubbit docs; not yet tested |
| Scality RING / Artesca | one s3 source per account |
Cross-account discovery not available (unverified that any exists) |
| Cloudian HyperStore | one cloudian-admin source per HyperStore region (all accounts), or one s3 source per account |
Admin API source follows Cloudian's docs; not yet tested against a real cluster |
4. Check it¶
dig +short photos.s3.example.com @<nexus-ip> # east's gateways
dig +short unmapped.s3.example.com @<nexus-ip> # the default pool
Moving a bucket between clusters¶
- Replicate/migrate the objects to the destination cluster (your storage system's job).
gslbctl buckets set <service-id> photos <new-pool-id>— the node you used flips immediately, the others within the cache TTL (30 s by default), and clients within the service TTL.- Keep the old cluster serving the data until the TTL has passed everywhere.
Replicas and failover¶
List replica clusters after the primary. If the primary cluster has no healthy gateway, queries go to the next cluster in the list. If all of a bucket's clusters are down the bucket is unavailable — Nexus deliberately does not fall back to the default pool, which does not hold the data.
Limits to know about¶
- Virtual-hosted style (
bucket.s3.example.com) only — path-style cannot be steered by DNS. - The map is not part of config history/rollback; keep your vendor's inventory as the source of truth.
- Nexus records where a bucket is; it never moves data.
- Discovery sees only the buckets each source's credentials can list, so you need one source per account or project.