Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

Info

New SEND

As of Swarm 11.2, SCSP SEND has been expanded to support all feed types and to use the new replication (PUSH) method. For backwards compatibility, the following legacy behavior of SEND is still supported. If a SEND request is missing the new required query arguments, then the behavior described here is in force. (v11.2)

The SCSP SEND method applies to both named and unnamed objects. The SEND request allows explicit transmission of a single object from a source cluster to a remote one, such as for keeping two clusters immediately synchronized. This feature is best used with a replication feed https://perifery.atlassian.net/wiki/spaces/public/pages/2443814668/Replication+Feeds?search_id=2b1d6f53-3003-4c04-9f47-55a3103047d5, which acts as a catch-up mechanism if the intracluster network is down or the SEND command should fail. 

SEND Requests

SEND can only be used by an admin user. With a SEND request, Swarm performs the appropriate GET/retrieve in the destination cluster to verify whether the object already exists there. 

...

Note

You issue SEND directly on a Swarm node in the source cluster, to transfer a single object to a destination cluster. Do not send the request to a Gateway or other proxy.

You use the following headers with SEND requests:

Castor-System-Cluster

required

The value of the cluster.name setting of the destination cluster.

Castor-System-Target

required

The IP:port of a node or reverse proxy of the destination cluster.

Castor-System-Auth

optional

The username:password for an administrative account on the remote cluster,
only if it differs from the source cluster.

Responses to SEND

The request returns information about that request in the body of the response. SEND behaves operates like a HEAD request, with the headers of the response resembling that of a HEAD request. 

Info

Important

The SEND response is chunked transfer encoded, so the client of the SEND request must be prepared for chunked transfer encoding. The response body may contain additional leading newlines sent incrementally, which keeps the connection open in long requests.

The most common HTTP response codes are these:

  • 201 - the object has been transferred successfully

  • 409 - the object already exists in the destination cluster

Example of SEND

The following request transfers the object to the "dr" cluster at 192.168.1.13, with a 201 in that cluster:

...