Domain Folder Synchronizator (dfsync)

Description

A service role that synchronizes files in the :SYNC directory between different system servers. It provides communication between sites without a direct full-mesh connection. It monitors file system changes for each directory according to the binding of directories to domains and propagates them to all servers of the sites serving the corresponding domains. The :SYNC/common directory is synchronized on all sites.

Fundamentally not made redundant; its instances cover the entire server network. There is no need to use the microservice in a single-server configuration.

Receives file system change notifications using the inotify-tools package. Files are compared by date and size. Content hash sums are not used to optimize performance.

On startup, it reads the directory structure and creates a cache, then regularly monitors synchronization state with other servers in the group. If necessary (checksum mismatch), each instance performs one-way synchronization in its own direction. The cache is also stored on disk. When files are deleted, information about this is retained in the cache for 1 year.

Table 1. System characteristics

Code

dfsync

Operation mode

Service

Redundancy mode

Active-Active

Site types

All

Layer

Configuration

Placement

Internal

State preservation and recovery on restart

Yes

Application

era_dfsync

Limitations

  • Not present in the initial single-server configuration.

  • Must be present once on each server.

  • In a configuration with more than 1 site, at least one instance on each site must have the `is_cross_site` flag enabled to ensure data synchronization with other sites. If more than one instance has the flag enabled, each pulls data from other sites independently, increasing channel load.

Parameters

Table 2. Parameters
Name Type Default Description

name

str

required

Name. May consist of Latin letters and digits and must start with a letter.

roletype

str

required

Role type. Possible values: "dfsync".

ext

json

empty

Additional role options. Contains a JSON object or list.

enabled

bool

empty

Role activity flag. When set to false, the role does not participate in validation and is not started.

limit_of_cores

int

empty

Limit on the number of CPU logical cores used. Default: 0 - unlimited.

logging_default_level

int

empty

Default logging level set specifically for the role instance (microservice type). More

allow_divergence

bool

false

Flag allowing parameter differences in roles of the same group. Default: false - not allowed.

is_cross_site

bool

false

Flag indicating placement on a hub server that provides communication with other sites.

roleid

int

required

Role identifier.
Unique across the entire system, regardless of site or server. Cannot be changed.
An integer from 1 to 9999.

separate

bool

required

Flag indicating whether the role is allocated to a separate node.

Configuration example

Configuration management is performed in an application available to master domain administrators. The application hides the full configuration content, but it is still available through the API.

The configuration contains a section describing all instances of all roles. Parameters are defined for each specific role instance.

Node example
{
  "name": "dfsync1",
  "is_cross_site": false,

  "roleid": 11380,
  "roletype": "dfsync",
  "separate": true
}