Site Domain Center (sdc)

Description

Domain entity storage.
Provides other roles with access to data for organizing processes. Some data is pre-calculated inside the role.

Split into microservices by domains. Data is automatically synchronized between sites serving the domain.
Made redundant in Active-Passive mode. Scaled by splitting the domain tree.

Table 1. System characteristics

Code

sdc

Operation mode

Storage, service

Redundancy mode

Active-Passive

Site types

All worker sites

Layer

Business logic

Placement

Internal

State preservation and recovery on restart

Yes

Application

era_dc

Own storage

ODB Mnesia

Limitations

  • Cannot be located on the master site; the mdc role is used there instead.

  • Must be located on every worker site.

  • Data synchronization between sites is performed through the mdc role on the master site with a total period of up to 1 minute.

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: "sdc".

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.

group

int

required

Group number.
As part of horizontal scaling, the role can be split into several groups on a site, in each of which only one instance is active and the rest are standby.
Responsibility is divided between groups by domain sets. Together all groups serve the full domain set. All roles in one group must have the same responsibility.
An integer from 1 to 9999999.

order

int

required

Order of the role instance within the group.
Determines the order in which takeover occurs in Active-Passive mode.

include_domains

array<str>

empty

List of domain names served by this group.
Any domain of any level can be specified. Specifying a domain causes its subtree to be served on this group and not on other role groups, except for branches mentioned in other groups.
Together, all role groups on the site serve the full domain tree.

max_loading_domains

int

4

Limit on the number of simultaneously loaded domains.
Useful in systems with a large number of domains.
Used to limit CPU load during microservice restart.

takeover

bool

global

Takeover mode switch.

Failover - activation of a lower-priority service instance when the higher-priority service instance (leader of the active-passive group) is detected as unavailable.
Takeover - activation of the higher-priority service instance (leader of the active-passive group) during its recovery, accompanied by stopping the service on the lower-priority service instance.

  • If the mode is enabled, takeover is performed automatically.

  • If the mode is disabled, takeover is not performed; the recovered group leader temporarily becomes a follower and waits for the service to be unloaded on the lower-priority instance.

  • If the option is not set, its value from the current site parameters is used. If it is not set on the site, the value from the general section is used. If it is not set anywhere, takeover is enabled for more accurate load distribution according to the configured priorities.

domain_group

int

group

Domain distribution group number. Instances with the same value share the domain subtree (include_domains) as one group. Defaults to the group number.
An integer from 0.

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": "sdc1",
  "roletype": "sdc",

  "group": 21020,
  "order": 1
}

See also