Automerge Repo - v2.6.0-alpha.3
    Preparing search index...

    Interface RepoConfig

    interface RepoConfig {
        denylist?: AutomergeUrl[];
        enableRemoteHeadsGossiping?: boolean;
        flushConcurrency?: number;
        isEphemeral?: boolean;
        network?: NetworkAdapterInterface[];
        peerId?: PeerId;
        saveDebounceRate?: number;
        shareConfig?: ShareConfig;
        sharePolicy?: SharePolicy;
        sharePolicyConcurrency?: number;
        storage?: StorageAdapterInterface;
        syncStateLoadConcurrency?: number;
    }
    Index

    Properties

    denylist?: AutomergeUrl[]

    A list of automerge URLs which should never be loaded regardless of what messages are received or what the share policy is. This is useful to avoid loading documents that are known to be too resource intensive.

    enableRemoteHeadsGossiping?: boolean

    Whether to enable the experimental remote heads gossiping feature

    flushConcurrency?: number

    Maximum number of documents Repo.flush (and Repo.shutdown) write to storage concurrently. Defaults to 20.

    Tie this to the constraining resource of your StorageAdapterInterface:

    • filesystem (e.g. the nodefs adapter): stay well under the process's file-descriptor ceiling; the default 20 is comfortable.
    • HTTP/1.1-backed: a browser caps connections per origin at ~6, so a limit near that avoids head-of-line queueing you can't see.
    • HTTP/2-backed: ~100 multiplexed streams per connection, so you can go higher.
    • database-backed: at or below the connection-pool size, leaving headroom for other callers.
    isEphemeral?: boolean

    Indicates whether other peers should persist the sync state of this peer. Sync state is only persisted for non-ephemeral peers

    A list of network adapters (more can be added at runtime).

    peerId?: PeerId

    Our unique identifier

    saveDebounceRate?: number

    The debounce rate in milliseconds for saving documents. Defaults to 100ms.

    shareConfig?: ShareConfig

    Whether to share documents with other peers. By default we announce new documents to everyone and allow everyone access to documents, see the documentation for ShareConfig to override this

    Note that this is currently an experimental API and will very likely change without a major release.

    sharePolicy?: SharePolicy

    Normal peers typically share generously with everyone (meaning we sync all our documents with all peers). A server only syncs documents that a peer explicitly requests by ID.

    sharePolicyConcurrency?: number

    Maximum number of share-policy resolutions the synchronizer runs concurrently when re-evaluating which peers each document is shared with. Defaults to the synchronizer's SHARE_POLICY_CONCURRENCY (10).

    Each resolution may invoke an async SharePolicy. On a sync server with many peers and many documents, an unbounded fan-out launches one policy call per peer-document pair at once; this caps how many run together.

    A storage adapter can be provided, or not

    syncStateLoadConcurrency?: number

    Maximum number of persisted sync-state reads the synchronizer issues concurrently while adding peers to documents (one read per peer-document pair). Defaults to 20.

    Like RepoConfig.flushConcurrency, tie this to your StorageAdapterInterface: stay under a filesystem adapter's file-descriptor ceiling, near a browser's per-origin connection cap for an HTTP/1.1-backed adapter, or at or below a database adapter's pool size.