public Optional<String> archiveUriFor(Node node) {
        if (node.allocation().isEmpty()) return Optional.empty();
        ApplicationId app = node.allocation().get().owner();

        return Optional.ofNullable(node.cloudAccount().isExclave(zone) ?
                archiveUris.get().accountArchiveUris().get(node.cloudAccount()) :
                archiveUris.get().tenantArchiveUris().get(app.tenant()))
                .map(uri -> {
                    StringBuilder sb = new StringBuilder(100).append(uri)
                            .append(app.tenant().value()).append('/')
                            .append(app.application().value()).append('/')
                            .append(app.instance().value()).append('/')
                            .append(node.allocation().get().membership().cluster().id().value()).append('/');

                    for (char c: node.hostname().toCharArray()) {
                        if (c == '.') break;
                        sb.append(c);
                    }

                    return sb.append('/').toString();
                });
    }
Returns the archive URI to use for given node
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/archive/ArchiveUriManager.java