Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel2
outlinefalse
typelist
printablefalse
Excerpt
hiddentrue

Internal use:

What is Synchronous Write to Remote Sites?

Swarm's Replication Feeds are mature and resilient, with each feed syncing content iteratively and asynchronously, linking one source cluster to one target destination. Replication feeds keep target clusters continuously updated with object changes in the source cluster, and having multiple replication feeds allows the distribution of content across a set of remote Swarm clusters. Remote synchronous write is limited by inter-cluster bandwidth and the constraints of overall request timeouts. Hence, it should not be thought of as a synchronization guarantee. Remote synchronous write are built on the Swarm asynchronous feed, which acts as a safety net to ensure the eventual replication of new writes that may not have been synchronously replicated.

...

Info

RSW

Implementing Remote Targets

A remote synchronous write engages as many replication targets as are active at the time of the write. Start using remote synchronous write with one remote cluster and add additional remote clusters later. Remove or change remote sites in the future while continuing to use RSW.

...

  1. Set up replication feeds in the remote clusters if the remote clusters are accepting content to be mirrored back to the primary cluster.

  2. Verify that the feeds are running successfully in each of the target clusters, populating objects from the source cluster.

Enabling Remote Synchronous Writes

Click the Settings (gear icon) and set the Properties to be in force for that domain or bucket in the Content UI. The policy change takes effect on Save.

...

Domains

The option must be enabled at this level if synchronous writes to remote sites to include unnamed objects (which do not reside in buckets) is desired.

The best practice is to enable the option at the level of those buckets if synchronous writes for certain buckets are desired.

  • Synchronous Write Enabled: Toggle to explicitly enable or discontinue the feature.

    • For a domain, enabling it means that each of its buckets also default to having it enabled, unless inheritance is overridden.

Buckets

Disable Inherit Policy and explicitly enable it for each affected bucket unless enabling synchronous write at the domain level:

  • Inherit Policy: (default) Select to accept the domain's policy, which is disabled by default until the domain explicitly enables it.

    • With inheritance off, the bucket does not respond to domain-level changes. 

  • Synchronous Write - Enabled: Toggle to explicitly enable or disable the feature.

Managing RSW Manually

Info

Required

PutPolicy and GetPolicy permissions are required to set or change RSW settings.

...

  • To enable remote synchronous write, run a curl command that specifies one domain or bucket that is included in remote synchronous writes:

    Code Block
    curl -X PUT http://<Gateway>/_admin/manage/tenants/_system/domains/<domain>/rsw?state=enabled --anyauth -u admin:password 
    curl -X PUT http://<Gateway>/_admin/manage/tenants/_system/domains/<domain>/buckets/<bucket>/rsw?state=enabled --anyauth -u admin:password 

    Repeat the RSW enabling command on each remaining domain and/or bucket that is part of remote synchronous write.

  • To disable remote synchronous write from the command line, run a curl command that specifies one domain or bucket that is excluded in remote synchronous writes:

    Code Block
    curl -X PUT http://<Gateway>/_admin/manage/tenants/_system/domains/<domain>/rsw?state=disabled --anyauth -u admin:password 
    curl -X PUT http://<Gateway>/_admin/manage/tenants/_system/domains/<domain>/buckets/<bucket>/rsw?state=disabled --anyauth -u admin:password 
  • To inherit the domain setting again after having had it disabled on the bucket, change the state back to unset:

    Code Block
    curl -X PUT http://<Gateway>/_admin/manage/tenants/_system/domains/<domain>/buckets/<bucket>/rsw?state=unset --anyauth -u admin:password 
  • To verify the RSW status of a given domain or bucket, run the RSW command:

    Code Block
    curl -I http://<Gateway>/_admin/manage/tenants/_system/domains/<domain>/rsw 
    curl -I http://<Gateway>/_admin/manage/tenants/_system/domains/<domain>/buckets/<bucket>/rsw 

Logging for Remote Writes

A file is completely written to the original cluster and then sent to the remote clusters before the client is notified of completion, so this incurs some latency for the request when a large file is written with remote synchronization. The new object is accessible from the source cluster even if errors prevent immediate replication in any remote clusters.

...