top of page

TRAILDURO

Public·192 membres

How To Manage ProxySQL Cluster With Core And Satellite Nodes


Click Here ::: https://urlin.us/2tv9VQ





```markdown


How to Manage ProxySQL Cluster with Core and Satellite Nodes


ProxySQL is a high-performance proxy server for MySQL and other database systems. It allows you to scale, load-balance, and monitor your database cluster with ease. In this article, we will show you how to manage ProxySQL cluster with core and satellite nodes, which is a recommended architecture for high availability and performance.


What are Core and Satellite Nodes


A ProxySQL cluster consists of multiple ProxySQL nodes that communicate with each other using a shared configuration database. The nodes can be divided into two types: core and satellite.


Core nodes are the primary nodes that handle most of the traffic and queries from the clients. They are also responsible for updating the configuration database and propagating the changes to the satellite nodes. Core nodes should be deployed in the same data center as the database cluster, or as close as possible, to minimize latency and network issues.


Satellite nodes are the secondary nodes that act as backups for the core nodes. They can handle traffic and queries from the clients in case of core node failure or overload. They can also serve as read-only replicas for read-intensive workloads. Satellite nodes should be deployed in different data centers or regions than the core nodes, to provide geographic redundancy and disaster recovery.


The number of core and satellite nodes depends on your specific needs and preferences, but a common ratio is 3:1 or 4:1. For example, you can have three core nodes and one satellite node, or four core nodes and one satellite node.


How to Configure Core and Satellite Nodes


To configure core and satellite nodes, you need to use the proxysql-admin tool, which is a script that automates the setup and management of ProxySQL cluster. You can download it from https://github.com/sysown/proxysql-admin-tool.


The proxysql-admin tool requires a configuration file that specifies the parameters for your ProxySQL cluster, such as the hostnames, ports, credentials, modes, etc. You can use the sample configuration file provided by the tool as a template, and modify it according to your needs.


The configuration file should have different sections for core and satellite nodes, as shown below:


[core]


proxysql_servers=(proxysql-core-1:6032;proxysql-core-2:6032;proxysql-core-3:6032)


proxysql_admin_user=admin


proxysql_admin_password=admin


proxysql_admin_port=6032


proxysql_mode=singlewrite


monitor_user=monitor


monitor_password=monitor


mysql_user=app_user


mysql_password=app_password


mysql_port=3306


write_node=master


[satellite]


proxysql_servers=(proxysql-satellite-1:6032)


proxysql_admin_user=admin


proxysql_admin_password=admin


proxysql_admin_port=6032


proxysql_mode=loadbal


monitor_user=monitor


monitor_password=monitor


mysql_user=app_user


mysql_password=app_password


mysql_port=3306


read_only=true


The main differences between core and satellite nodes are:


The proxysql_servers parameter lists the hostnames and ports of the ProxySQL nodes for each type.


The proxysql_mode parameter defines the mode of operation for each type. Core nodes should use singlewrite mode, which means only one node will write to the database cluster at a time, while the others will act as read-only replicas. Satellite nodes should use loadbal mode, which means they will load-balance the read queries among themselves.


The write_node parameter specifies which core node will be the primary writer to the database cluster. This parameter is only required for core nodes.


The read_only parameter indicates whether the ProxySQL node will accept only read queries or not aa16f39245






À propos

Bienvenue dans le groupe ! Vous pouvez communiquer avec d'au...

membres

bottom of page