Awesome
Introduction
Cetus, originally developed from MySQL Proxy, is a high-performance, stable, and protocol-aware proxy for MySQL Group Replication.
Getting Started
1. Prerequisites for Setup
- cmake
- gcc
- glib2-devel (version >= 2.6.0)
- zlib-devel
- flex
- mysql-devel 5.6 or mysql-devel 5.7 or mariadb-devel
- jemalloc
2. Compiling Cetus: A Step-by-Step Guid
- Go to the
cetus_mgr
directory mkdir build/
cd build/
CFLAGS='-O2 -w' cmake ../ -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS="-ljemalloc" -DCMAKE_INSTALL_PREFIX=/home/user/cetus_mgr_install
3. Installation Guide
make install
4. How to Run
- Go to /home/user/cetus_mgr_install/conf
- cp proxy.conf.example proxy.conf
- Modify proxy.conf
- cp users.json.example users.json
- Modify users.json
- cd ..
- chmod 660 conf/proxy.conf
- ./bin/cetus --defaults-file=conf/proxy.conf
5. How to Modify proxy.conf
- Set
proxy-backend-addresses
to the primary address of MySQL Group Replication. - Set
proxy-read-only-backend-addresses
to the secondary addresses of MySQL Group Replication. - Set
default-username
to a valid user with privileges for managing both MySQL Group Replication and MySQL. - Set
log-file
to a valid file path. - Adjust
worker-processes
to an appropriate number based on the workload. - Configure
default-pool-size
appropriately. - Add
group_replication_group_name
with the correct value. - Add
session-causal-read=true
for session causal reading withsession_track_gtids=OWN_GTID
in MySQL configuration.
6. How to Modify user.conf
Modify passwords as needed for both your applications and MySQL.
Note
- Cetus runs exclusively on Linux.
- Cetus cannot be compiled with MySQL 8.0 development.
- Cetus is compatible only with MySQL Group Replication.
- Cetus supports only
mysql_native_password
. - The total number of connections to each MySQL instance is the sum of
default-pool-size
andworker-processes
. - Use
SELECT help
in the admin interface to view relevant SQL commands.
Bugs and Feature Requests:
If you encounter any issues with the release, I would encourage you to file a bug report. Your feedback is really critical to myself and the rest of the team as we want to make cetus better.
Copyright and License
Copyright 2024 under GPLv2.