Bitrix24 Web Cluster Introduction

Yana Prokopets
February 2, 2016
Last updated: December 3, 2018
The Web Cluster module is available in Bitrix24 BizPace Enterprise version.

Web Cluster solves the following issues:

Site scalability under rising workloads

As your intranet matures, growth in popularity and traffic increases, as do the resources it requires: CPU, memory, disk space.

Bitrix Web Cluster provides a flexible solution with real-time scalability of the specific resources (the database or web server) which need to be expanded, simply by adding new machines to the cluster.

Key features of the technology:
  • machines (nodes) in the cluster may have completely different configuration: a virtual host, VPS, dedicated server, cloud instance, etc.;
  • nodes can be distributed in any manner needed, even being located in separate data centers;
  • adding nodes increases site performance proportionally to the capacity of the new resource.
Backup Of System Nodes, Fault Tolerance And Continuity Of Service

The second important issue is to ensure fault tolerance of the system and minimize downtime in the case of server failure or routine maintenance.

If your intranet is on a single server and that server goes off line, or when there is an emergency in a datacenter, the interruption in service can lead to many unpleasant circumstances.

Clustering of all intranet components (web servers and databases) with Bitrix Web Cluster minimizes downtime. Depending on how load balancing is managed throughout the cluster, downtime can either be greatly reduced, or in some situations completely eliminated.

How it works: when a node goes down, the cluster recognizes that the resource is offline, be it a database, web server, or memcached server, and the load on the system automatically is re-distributed among the remaining nodes.

Time of page creation may increase proportionately during peak load periods, but service will not be interrupted. If there is adequate reserve capacity in the cluster, performance during non-peak times will continue without perceptible change.

After the failed server(s) is diagnosed and the problems are corrected, it can be returned to work in the cluster to maximize intranet performance.

Real-time backup

System redundancy can be obtained using a web cluster; all data can be backed up in real time.
The need for regular backup of data is obvious. But it is also essential to recover quickly in the case of a shutdown.

According to a study by the Strategic Research Institute 93% of business firms that experienced a major system failure and did not restore the restore data within 10 days shut down and went bankrupt within a year, with about 50% of those closures being immediate.

Thus another critical factor concerning backups is the frequency with which they are made. If backups are not often performed, say only once per week, then the amount of data that is at risk can be very substantial - think of it as 2% of the year’s output.

Bitrix Web Cluster lets you to connect one node as a backup server. This need not be a very expensive server and could even be a VPS. In the web cluster environment, this node can be designated for use only for backup purposes.

With a dedicated node, data (files and databases) will be backed up constantly – in real time. Recovery from a shutdown will be performed with data that are, for all practical purposes, current at the time of the shutdown. The fastest way to recover the system is simply to engage the backup server as a production server.

Reducing the cost of traffic, a simple CDN system

Owners of intranets that incorporate a large amount of "heavy" content (audio, video, photo) must solve another serious problem: how to balance intranet performance among a geographically diverse vusers pool with the cost of maintenance. Web clusters can be distributed across data centers in different cities or countries. Additional tools, such as GeoIP, can automatically determine the visitor’s location and redirect requests from the visitor to the most appropriate node in the cluster.

The following technologies are present in the Bitrix Web Cluster module:


Vertical sharding of database

Vertical sharding is the separation of a web application’s database into two or more databases which serve particular modules or sets of modules of the product. This method does not affect the logical structure of the web application.

9a017cde2f5430556bad7cbce9afa734.png

The following product modules can be served by separate servers:
  • Web Analytics
  • Search
MySQL replication

Replicating a MySQL database is the process of creating and maintaining current copies of it. The application does not work with one, but with multiple databases: one database is used for writing and the rest are used for reading. This applies only to MySQL, not to other database types supported by Bitrix.

9e48515d4a6784d65037d59bc760a147.png

This reduces the load on the primary database because reading the data occurs on additional (slave) databases, and the main database is available exclusively for writing.

Slave databases can only be used to create a copy of the primary database in real time, otherwise, reading from the slave databases will not be supported. Master-master replication is also supported.

Distributed data cache

A memcached server is a server that allows you to save the cache not in files, but in the operating memory.

Using multiple memcached-enabled servers improves system reliability through increased stability of the subsystem caching in the case of a server going offline. Centralized web application caching is likewise more efficient and unlimited scalability by adding additional memcached-servers is supported.

a4a1c641c02f553f543a6b6ec2553c0a.png

The cache created by nodes 1, 2 and/or other nodes can be used as a single cache serving the entire cluster, so any node in the cluster can access it. The more nodes, the greater the effect of centralized cache.

The continuity of web sessions between web servers (storing sessions in database)

When using a single Web server, storing sessions in the server's file system is the most convenient. However, when working with multiple web servers, situations may arise wh ere a user's query (for example, direct authorization) occurs on the one server, and the next query occurs on another server, on which the visitor is not authorized. Such a situation would cause a number of inconveniences for visitors. If sessions are stored in the file system rather than the database, statistics and user behavior analysis would be based on incorrect data.

Clustering of the Web Server

The web server is said to be in a cluster when files of the web project are located on various nodes in a cluster.

Using multiple web servers for an intranet means that any request for any user can be handled by any of the nodes in the cluster. To accomplish this, each web server must contain the same content (files). For example, an image that is loaded through the administrative interface on one web server must be available to return to the user through another web server.

When implementing a web server cluster, synchronization of the content on each node and load balancing between nodes must be set up.

More information about configuring a web cluster for the Bitrix platform can be found here. Bitrix Virtual Appliance also has a support for quick deploy of a master-slave cluster.
Free. Unlimited. Online
Bitrix24 is a place where everyone can communicate, collaborate on tasks and projects, manage clients and do much more.