Master Domain Center (mdc)

Description

A repository of domain entities.
Provides other roles within the site with access to data to organize processes. Some data is subject to pre-calculation within the role.
Has direct access to relational databases of all domains regardless of which sites they are served on. On startup, loads domain data from the appropriate databases into the cache.

Divided into microservices by domain. Data is automatically synchronized between sites serving the domain.
Reserved in Active-Passive mode. Scaled by domain tree partitioning.

Table 1. System Characteristics

Code

mdc

Mode of operation

Storage, service

Backup mode

Active-Passive

Types of sites

Master

Layer

Business logic

Placement

Internal

Saving and restoring state on reboot

Yes

appendix

era_dc

Own storage

PostgreSQL entity DB

Limitations

  • Present in the initial configuration.

  • Should only be placed on the master site. Other sites use the role instead sdc

  • If the role is unavailable, the master site does not function. As a consequence, other sites in the system do not synchronize domain data among themselves. This matters when serving the domain to multiple sites.

Parameters

Table 2. Parameters
Name Type Default Description

name

str

required

Name. May consist of Latin letters and numbers, must begin with a letter.

roletype

str

required

Role Type. Possible values: "mdc".

iface

str

required

The alias of the server network interface on which the roles will interact internally with each other.

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.

dbconnstrings

array<str>

required

Connection strings to the PostgreSQL server farm where domain databases are located (created and used) with a repository of entities managed by the domain center and their change history.
Each domain has one permanently active connection to the database. The connection is automatically reconnected when the connection is broken.
Each domain uses the original specified string only to create its own database with a unique name 'r_domain_%DOMAIN%', and for operation uses a modified connection string where it substitutes the name of its database as the database.
Connection string format: "alias://pgdb_strings/<ALIAS_NAME>", where <ALIAS_NAME> is a specific configuration alias from the section pgdb_strings.
Listing multiple connection strings in the list provides redundant access to the database server farm - if the connection through the first string fails, the connection through the second string is made, and so on.

group

int

required

Group Number.
As part of horizontal scaling, a role can be divided into multiple groups on a site, with only one instance active in each group and the rest reserved.
Responsibilities between groups are shared across domain sets. Together, all groups maintain a complete domain set. All roles in the same group must have the same responsibility.
Integer from 1 to 9999999.

order

int

required

The order of a role instance within a group.
Defines in what order the flow in the mode will take place Active-Passive.

include_domains

array<str>

empty

A list of domain names served by this group.
Any domain of any level can be specified. Specifying a domain causes its subdomain tree to be served on this group and not on other role groups, excluding only those branches mentioned in other groups.
Collectively, all role groups on a site serve a complete domain tree.

*max_loading_domains"

int

4

Limit the number of domains that can be loaded at the same time.
Comes in handy in systems with a large number of domains.
It is used to limit the CPU load during microservice reboot.

Configuration example

The configuration is managed in an application available to master domain administrators. The application hides the full content of the configuration, but it is nevertheless accessible via the API.

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

Example node
{
  "name": "mdc1",
  "roletype": "mdc",
  "iface": "eth0",

  "dbconnstrings": [
    "alias://pgdb_strings/b",
    "alias://pgdb_strings/c"
  ],
  "group": 11020,
  "order": 2
}

See also