You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documented new exposed ports for HAProxy and ProxySQL
Added a section with all available ports and services
Updated config file samples
new file: docs/assets/fragments/haproxy-config.txt
new file: docs/assets/fragments/proxysql-config.txt
modified: docs/haproxy-conf.md
modified: docs/proxysql-conf.md
Copy file name to clipboardExpand all lines: docs/haproxy-conf.md
+57-69
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Configuring Load Balancing with HAProxy
2
2
3
-
Percona Operator for MySQL based on Percona XtraDB Cluster provides a choice of two cluster components to
4
-
provide load balancing and proxy service: you can use either [HAProxy :octicons-link-external-16:](https://haproxy.org) or [ProxySQL :octicons-link-external-16:](https://proxysql.com/).
3
+
You can use either [HAProxy :octicons-link-external-16:](https://haproxy.org) or [ProxySQL :octicons-link-external-16:](https://proxysql.com/) for load balancing and proxy services.
4
+
5
5
You can control which one to use, if any, by enabling or disabling via the
6
6
`haproxy.enabled` and `proxysql.enabled` options in the `deploy/cr.yaml`
restart. Switching from HAProxy to ProxySQL is not possible, and if you need
26
26
ProxySQL, this should be configured at cluster creation time.
27
27
28
-
The resulting HAProxy setup normally contains two services:
28
+
## HAProxy services
29
+
30
+
The Operator creates two services for HAProxy:
31
+
32
+
### `cluster1-haproxy` service
33
+
34
+
The `cluster1-haproxy` service listens on the following ports:
35
+
36
+
*`3306` is the default MySQL port. It is used by the mysql client, MySQL Connectors, and utilities such as mysqldump and mysqlpump
37
+
38
+
*`3309` is the [proxy protocol :octicons-link-external-16:](https://www.haproxy.com/blog/haproxy/proxy-protocol/) port. Proxy protocol is used to store the client's IP address
39
+
40
+
*`33062` is the port to connect to the MySQL Administrative Interface
29
41
30
-
*`cluster1-haproxy` service listening on ports 3306 (MySQL) and 3309 (the [proxy protocol :octicons-link-external-16:](https://www.haproxy.com/blog/haproxy/proxy-protocol/) useful for operations such as asynchronous calls).
31
-
This service is pointing to the number zero Percona XtraDB Cluster member
32
-
(`cluster1-pxc-0`) by default when this member is available. If a zero
33
-
member is not available, members are selected in descending order of their
34
-
numbers (e.g. `cluster1-pxc-2`, then `cluster1-pxc-1`, etc.). This service
35
-
can be used for both read and write load, or it can also be used just for
36
-
write load (single writer mode) in setups with split write and read loads.
42
+
*`33060` is the port for the [MySQLX protocol :octicons-link-external-16:](https://dev.mysql.com/doc/dev/mysql-server/8.4.3/PAGE_PROTOCOL.html). It is supported by clients such as MySQL Shell, MySQL Connectors and MySQL Router
*`8404` is the port to connect to the [HAProxy statistics page :octicons-link-external-16:](https://www.haproxy.com/blog/exploring-the-haproxy-stats-page)
45
+
46
+
The [haproxy.enabled](operator.md#haproxyexposeprimaryenabled)
39
47
Custom Resource option enables or disables `cluster1-haproxy` service.
40
48
41
-
*`cluster1-haproxy-replicas` listening on port 3306 (MySQL).
42
-
This service selects Percona XtraDB Cluster members to serve queries following
43
-
the Round Robin load balancing algorithm.
44
-
It **should not be used for write requests**.
49
+
By default, the `cluster1-haproxy` service points to the number zero Percona XtraDB Cluster member (`cluster1-pxc-0`), when this member is available. If a zero member is not available, members are selected in descending order of their
50
+
numbers: `cluster1-pxc-2`, then `cluster1-pxc-1`. This service
51
+
can be used for both read and write load, or it can also be used just for
52
+
write load (single writer mode) in setups with split write and read loads.
53
+
54
+
The [haproxy.exposePrimary.enabled](operator.md#haproxyexposeprimaryenabled)
55
+
Custom Resource option enables or disables the `cluster1-haproxy` service.
0 commit comments