Views: 2089
Last Modified: 04.10.2022


The Web Cluster module contains a combination of technological solutions that allow deploying a single site on several servers and solve the following objectives:

  • ensuring high availability of the site;
  • ensure site scalability under increased load;
  • ensure balancing of the load, traffic and data between several servers.

The Web Cluster module doesn't require any changes in the code of existing and new projects. Web Cluster settings may require elementary qualifications in the area of system administration.

The Web Cluster module allows to use:

  • Vertical sharding (deployment of individual database parts (modules) to separate MySQL servers. For example, for "Search" "Web Analytics");
  • MySQL replication and load balancing between servers;
  • Distributed data cache (memcached);
  • Session continuity between web servers (session database storage);
  • Web server clusterization:
    • File synchronization;
    • Balancing load between servers.

Attention! In case, Cluster DBMS servers are located in different data centers, you need to configure a shared time zone.

The "Web Cluster" module solves several very important practical business objectives.

  • Web project scaling and improved performance;
  • All system nodes redundancy, ensured fail-over protection and continuous availability;
  • Real-time backup;
  • Reduction of traffic costs, simple CDN system;

Web project scaling and increased performance

Web project's growing visitation and popularity requires an increased resource consumption (CPU, memory, drive space). Up to a certain threshold, such milestones can be solved easily. Site is moved from virtual hosting to a VPS and - to a dedicated server and then to a more powerful server. During this process, each new move of a site to new deployment locations is accompanied by a temporary site unavailability during the move. Sooner or later, available resources will become insufficient.

"Bitrix24 Web Cluster" technology flexibly and in real time scales specifically the resources (database or web server) that are presently required, simply by adding/disabling computers as required.

Key features:

  • each unit ("node") within a cluster may serve as a different platform: virtual host, VPS, dedicated server, an instance in "cloud" (for example, Amazon EC2);
  • nodes may be distributed in any different arrangement - up to being located in different data centers;
  • adding nodes of various power offers a proportional performance boost.

Example: if your site operates on a dedicated server with a single Intel Quad Core processor with 4 GB RAM on board (and can process up to 40 queries per second during peak visitation), then deployment of a second such server into the web cluster increases performance approximately for 90-95% and allows to process up to 77 queries per second during peak load.

Such approach allows to add project resources gradually as needed.

Approximate recommendations for "hardware"

An online store visited by approx. 150 people per 10 minutes, site folder contains 700GB, with 10GB database.

  • For memcached: Intel Xeon E-2236 3.4 GHZ, 6 cores 16 GB DDR4 2 × 480 GHZ SSD
  • For App server: Intel Xeon E3-1230 3.4 GHZ, 4 cores 32 GB DDR4 2 × 240 GB SSD 2 × 2000 GB HDD
  • For server database: Intel Xeon E-2236 3.4 GHZ, 6 cores 64 GB DDR4 2 × 960 GB SSD

  All nodes redundancy, fail-over and continuous availability

Equipment shutdown or a datacenter emergency may cause a multi-hour site downtime. And this can lead to negative consequences:

  • order loss (in case of an online store);
  • money spent uselessly on ads;
  • reputational losses;
  • lost positions in search systems in case of re-indexing by web crawler at the moment of site unavailability.

Clusterization of all site components (web server and database) using "Bitrix24 Web Cluster" minimizes system downtime. Depending on how load balancing is implemented between cluster nodes, site downtime may be 5-15 minutes and for individual cases may be zeroed out altogether.

How it works: in case of emergency in separate nodes, malfunctioning cluster nodes are marked as inactive (OFFLINE), and the system load is automatically distributed between the remaining nodes.

During peak loads, page loading for site visitors may proportionately increase, but operational capacity won't be disturbed. During standard operation, in case of sufficient performance reserve, customers won't notice any changes at all.

After emergency causes are resolved, offline nodes once again are brought into operation, thus distributing the load between significant number of servers.

  Real-time backup

One of the most important aspects in creating backup copies is the update frequency for the backup copies. If backups aren't created often, for example, once a week (which, unfortunately, is often the case for large-scale projects), then in case of an emergency there is a risk of loosing all changes (e. g. developer code, the site data itself, suer data) up to seven days.

"Bitrix Web Cluster" connects one of nodes as a backup server. This may be an inexpensive server, or, for example, a VPS. The Web Cluster settings indicate that this node is used for backup only and doesn't participate in load distribution generated by site visitation. In such cases, site data (both files and database) are duplicated in realtime. The emergency cases trigger restoration of actual data at the moment of malfunction. You establish a maximally quick switch Maximum максимально быстрого восстановления обращения к сайту могут быть переключены непосредственно на резервный бэкап-сервер.

Traffic cost reduction, Simple CDN system

Owners of sites with significant "data-heavy" content (audio, video, photo) have a serious objective: minimize the cost of project traffic combined with ensured access high speed for all visitors independently from location.

Web cluster nodes are located in various data centers (for example, possible locations for three servers: USA, Europe, South America). Additional tools (for example, GeoIP bases) automatically define a site visitor region and forward this visitor query to a corresponding cluster node. (Detailed mechanism, regulating a content loading depending on the customer's geographical location is called CDN - Content Delivery Network).


Courses developed by Bitrix24