Views: 539
Last Modified: 15.09.2022
Attention! Below are the actions that may be categorized as an 'extreme' tuning. Such actions require a high level of competency and qualifications from system administrator, with clear understanding of performed actions.
Using the connection via unix socket to local memcache servers, expediting project operation. The kernel ensures cache validity on all nodes, deleting marked cache keys. Such cluster work mode has proven itself very well in various load tests and actual operation, ensuring around 30% growth due to faster cache handling.
For example, there are two nodes with configured web server roles, memcache and database. In this case, you need to execute the following steps:
- Configure memcache for the use of web socket and the Web Cluster module for handling memcache via the socket.
- In the cluster module,
add
Groups is an entity created for convenience only. They are used for merging "nodes" within a geo cluster. This allows locating your own: database servers, Memcached-servers and web servers inside data centers with various geographic locations.
Learn more ...
the required number of groups.
- Define the constants identifying group ID as well as slave reading mode for any group on each server.
<?
define('BX_CLUSTER_GROUP', 1);
define('BX_CLUSTER_SLAVE_USE_ANY_GROUP', true);
?>
- Move the server's slave to the Bitrix Site Manager admin section, assorted by different groups. For moving the server slave to a required group you need to edit corresponding records in the table b_cluster_dbnode, by specifying a required value to the
GROUP_ID
field.
- For moving memcached servers to a required group, you need to indicate a required value of the
GROUP_ID
key in the file /bitrix/modules/cluster/memcache.php
.
After this, servers will start working with the local cache via socket, which is significantly faster than handling remote servers via TCP.