Remotes on a server
A remote is external storage, such as an S3 bucket or a web server, that holds copies of your staged assets. When a server has pushed an asset to a remote, it can send downloads there instead of serving the file itself. To add remotes and push assets, see Configure remote storage.
How the server answers a download
Section titled “How the server answers a download”For /v4/archives/{asset_digest}/download and /v4/assets/{asset_digest}/files/{file_path}:
- Redirect. If the asset was pushed to an
httporhttpsremote, the server redirects to it. The URL is the remote's prefix plus the file's path inside the stage folder, so a staged archive at<stage folder>/<genome digest>/fasta/<asset digest>.tgzwith prefixhttps://example.org/refgenieis sent tohttps://example.org/refgenie/<genome digest>/fasta/<asset digest>.tgz. When several remotes qualify,httpswins overhttp, then the newest one. - Serve locally. Otherwise the server streams the file from its stage folder, or returns 404 if the file is missing.
Only http and https remotes give a download URL; an s3 remote is for pushing. If you push to S3 and serve from a separate server, refgenie catalog-export --https-prefix <public bucket URL> writes a catalog whose download links point at the bucket's public URL. See the CLI reference.
Manage remotes
Section titled “Manage remotes”refgenie remote add --type https --prefix https://example.org/refgenie --name publicrefgenie remote listrefgenie remote remove publicYou can have several remotes of each type. Names must be unique and not all digits. See Configure remote storage for push commands and push status.