Step 3. A multi-server system

multi_srv
Figure 1. Site diagram

Scaling is ensured by the system running on several servers. Mostly, each server has its own set of roles. In this step, we examine how the system is united into a single whole. For clarity, let us imagine the following scheme of role distribution across servers on a site (see figure).

If this were a simple application running on 4 servers, for example a calculator, it would generally be 4 independent calculators. But we have a system where each program instance on each server (more precisely, on each node) performs a specific set of roles. At the same time, from the application’s point of view, everything on all servers is the same, but it functions differently. Only the entire system as a whole possesses the useful qualities that satisfy the full set of requirements.

How does each server know which roles it should perform? How does each role on a server know where the other system services it needs are located? In particular, the WS role needs DC, and not just as an application but specifically as a service, that is, a running application with active processes and data. It cannot simply be accessed locally, because the DC role is not running locally (see the site diagram — one role per server), and only a set of software files exists due to the identical composition of software directories on all servers.

This is handled by the configuration: a structure that connects the infrastructure, logic, and data layers. Which server belongs to which site, what addresses the servers have, which roles run on which servers, which domain zones are served on which sites, and other data. The configuration is defined by the configuration file and is the same for all servers of the system. Each node on each server draws from the configuration information about which servers are part of the infrastructure, discovers itself, determines which roles to activate, and on which servers the other roles are located.

Starting the platform application on a server schematically looks like this:

server_cfg

The application starts the root node, where the service role ServerShell is activated. Its main task is to start and monitor child worker nodes based on the configuration file. Each worker node starts the BasedRole process, which starts the target functional roles based on the configuration file. If something happens to a worker node, ServerShell immediately restarts it. If something happens to a target role instance in a worker node, it is restarted by the Boot service.

Table 1. Terms used
Term Definition

Configuration

!

Configuration file

!

Domain zone

!

Root node

!

Worker node

!

ServerShell

!

BasedRole

!

Boot

!

Review questions
  1. Which requirement is ensured by the system running on several servers?

  2. What set of software files is located on each server?

  3. How does each server know which roles it should perform?

  4. Which structure connects the infrastructure, logic, and data layers?

  5. Which role ensures the operation of target functional roles?