Step 7. Ensuring scalability
A site must be able to withstand any predefined load. This means that for the planned peak load of target requests arriving at the site, it must be possible to create an infrastructure and configuration on which the site can serve all these requests without visible problems. So far we have considered few request variants, but even with this essentially only CRUD example, one can imagine how load can increase by orders of magnitude.
Case: 100 thousand administrators constantly change something with both hands. Everything remains correct and consistent at any stage.
We start with the simplest: one site, one server:
We load the system. WS heats up, SDC puffs. When the load average (combined CPU, memory, and disk load) on the server approaches half its limit, it is worth adding another server to the infrastructure and configuration. What does this mean when the site has one server? For example, spread the WS and DC roles across different servers in the configuration. The load on IC in this case is small, so assuming the load on SDC is lower, we leave it on the server with the SDC role:
We load further. The server dedicated to WS is approaching its performance limit. We add another server and place a duplicate WS on it. We established earlier that WS is made redundant in Active-Active mode, so redundancy is essentially scaling. We give half the administrators the address of the first server and the other half the address of the second, or configure hashring in DNS.
We load further. The server with SDC starts "finding it hard to breathe". What should be done with it? It can only be made redundant in Active-Passive mode, so it does not scale within a site like WS. Moving the load to another site will not solve the problem: the master site runs the same MDC with the same Active-Passive redundancy, and the load will concentrate there and stall overall scaling. Here the multi-domain structure comes to the rescue. We form a domain tree, limit the number of entities in each domain, including the administrators working in them. We add a server to the infrastructure and create several role groups of SDC for the site in the configuration. They are bound to domain zones, and on that basis several of them can be active simultaneously. They do not back each other up but complement each other to form the full domain tree. Each can have a standby instance. The standby attribute is the same group index and, as a consequence, the same set of parameters, including the binding to domain zones. Our 100 thousand administrators are distributed across a number of domains, the load on the servers is distributed, and potential for further load growth is gained.
In this scheme there are two servers without active services (Server2 and Server4), and two WS roles could be moved to them, saving a couple of servers (removing Server6 and Server7 from the configuration). The advisability of such role consolidation on a server depends on additional external requirements and conditions. The following arguments against consolidation can be given:
-
ObjectDB on Server2 and Server4 in this case is busy with intensive transaction synchronization.
-
In a real example, Server2 and Server4 will be loaded with other useful roles, and the apparent emptiness will not exist.
-
For systems designed for high load and availability when servers are lost, it makes sense to leave free resources in the infrastructure.
Further, you can add servers, add WS roles, add domains, add SDC roles on the worker site and similarly MDC on the master site. We will only hit the network bandwidth limit: between servers of one site, and between the worker site and the master site. It is quite possible to approximately calculate this load limit for each value of network bandwidth within a site and between sites.
MIC does not work with domains and has no such grouping capability. What happens if the system is loaded with configuration changes? No, that will not work, because MIC processes requests one at a time and rejects an action until the previous one is completed.
By the way, the configuration validator on MIC will not allow an invalid role group configuration. That is, it will not allow:
-
creating groups on one site with overlapping sets of domains or groups that do not combine into the full domain tree;
-
setting different parameters for instances of the same group.
| Term | Definition |
|---|---|
|
! |
|
! |
|
! |
|
! |
-
Next step: Step 8. Which role instance is active
-
Previous step: Step 6. Ensuring availability