Merge lp:~hrvojem/percona-xtradb-cluster/haproxydocs into lp:~percona-dev/percona-xtradb-cluster/5.5.20

Proposed by Hrvoje Matijakovic on 2012-03-22
Status: Merged
Approved by: Vadim Tkachenko on 2012-03-22
Approved revision: 3737
Merged at revision: 3739
Proposed branch: lp:~hrvojem/percona-xtradb-cluster/haproxydocs
Merge into: lp:~percona-dev/percona-xtradb-cluster/5.5.20
Diff against target: 134 lines (+69/-17)
4 files modified
doc/source/faq.rst (+4/-0)
doc/source/haproxy.rst (+16/-17)
doc/source/installation.rst (+1/-0)
doc/source/installation/apt_repo.rst (+48/-0)
To merge this branch: bzr merge lp:~hrvojem/percona-xtradb-cluster/haproxydocs
Reviewer Review Type Date Requested Status
Vadim Tkachenko 2012-03-22 Pending
Review via email: mp+98903@code.launchpad.net
To post a comment you must log in.
3737. By Hrvoje Matijakovic on 2012-03-22

      - updated haproxy howto
      - added debian/ubuntu experimental repo information
      - added big transaction to FAQ

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'doc/source/faq.rst'
2--- doc/source/faq.rst 2012-02-20 17:05:24 +0000
3+++ doc/source/faq.rst 2012-03-22 19:10:33 +0000
4@@ -27,6 +27,10 @@
5 * Unknown error (node is online but Galera is not connected/synced with the cluster)
6 * Connection error (node is not online)
7
8+Q: How does XtraDB Cluster handle big transaction?
9+==================================================
10+A: XtraDB Cluster populates write set in memory before replication and this sets one limit for how large transactions make sense. There are wsrep variables for max row count and max size of of write set to make sure that server is not running out of memory.
11+
12 Q: Is there a chance to have different table structure on the nodes?
13 =====================================================================
14 What I mean is like having 4 nodes, 4 tables like sessions_a, sessions_b, sessions_c and sessions_d and have each only on one of the nodes?
15
16=== modified file 'doc/source/haproxy.rst'
17--- doc/source/haproxy.rst 2012-03-21 03:24:04 +0000
18+++ doc/source/haproxy.rst 2012-03-22 19:10:33 +0000
19@@ -1,10 +1,10 @@
20 =============================
21- Load balancing with Haproxy
22+ Load balancing with HAProxy
23 =============================
24
25-This section is how to configure *haproxy* to work in the front of cluster
26+This section describes how to configure `HAProxy <http://haproxy.1wt.eu/>`_ to work in front of the cluster.
27
28-The following is the simplest config for *haproxy* ::
29+Here is the simple configuration file example for *HAProxy* ::
30
31 # this config needs haproxy-1.4.20
32
33@@ -39,23 +39,22 @@
34 server db02 10.4.29.99:3306 check
35 server db03 10.4.29.98:3306 check
36
37-with this config haproxy will load balance between nodes.
38-It checks only if mysqld listens on 3306 and it does not take into an account
39-a state of the node.
40-
41-To check the current status of a node we need a more complex checks.
42-The idea is taken from
43-https://groups.google.com/group/codership-team/browse_thread/thread/44ee59c8b9c458aa/98b47d41125cfae6
44-
45-To implement this setup you will need a script clustercheck (place to /usr/local/bin) and
46-a config for xined - mysqlchk (place to /etc/xined.d) on each node. Both scripts are available in binaries and source
47-distributions.
48-Also you need to make a following change on each node:
49-add to /etc/services file the line ::
50+With this configuration *HAProxy* will load balance between three nodes. In this case it only checks if mysqld listens on port 3306, but it doesn't take into an account state of the node. So it could be sending queries to the node that has mysqld running even if it's in "JOINING" or "DISCONNECTED" state.
51+
52+To check the current status of a node we need a more complex checks. This idea was taken from `codership-team google groups <https://groups.google.com/group/codership-team/browse_thread/thread/44ee59c8b9c458aa/98b47d41125cfae6>`_.
53+
54+To implement this setup you will need two scripts:
55+
56+ * **clustercheck** (place to /usr/local/bin) and a config for xined and
57+ * **mysqlchk** (place to /etc/xined.d) on each node.
58+
59+Both scripts are available in binaries and source distributions of *Percona XtraDB Cluster*.
60+
61+You'll need to change /etc/services file by adding the following line on each node: ::
62
63 mysqlchk 9200/tcp # mysqlchk
64
65-The config for haproxy in this case may look like ::
66+The configuration file for *HAProxy* in this case may look like this: ::
67
68 # this config needs haproxy-1.4.20
69
70
71=== modified file 'doc/source/installation.rst'
72--- doc/source/installation.rst 2012-02-24 18:47:06 +0000
73+++ doc/source/installation.rst 2012-03-22 19:10:33 +0000
74@@ -20,6 +20,7 @@
75 :maxdepth: 1
76
77 installation/yum_repo
78+ installation/apt_repo
79
80 |Percona| provides repositories for :program:`yum` (``RPM`` packages for *Red Hat*, *CentOS*, *Amazon Linux AMI*, and *Fedora*) and :program:`apt` (:file:`.deb` packages for *Ubuntu* and *Debian*) for software such as |Percona Server|, |XtraDB|, |XtraBackup|, and *Percona Toolkit*. This makes it easy to install and update your software and its dependencies through your operating system's package manager.
81
82
83=== added file 'doc/source/installation/apt_repo.rst'
84--- doc/source/installation/apt_repo.rst 1970-01-01 00:00:00 +0000
85+++ doc/source/installation/apt_repo.rst 2012-03-22 19:10:33 +0000
86@@ -0,0 +1,48 @@
87+===============================================
88+ Percona :program:`apt` Experimental Repository
89+===============================================
90+
91+*Debian* and *Ubuntu* packages from *Percona* are signed with a key. Before using the repository, you should add the key to :program:`apt`. To do that, run the following commands: ::
92+
93+ $ gpg --keyserver hkp://keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A
94+ ... [some output removed] ...
95+ gpg: imported: 1
96+
97+ $ gpg -a --export CD2EFD2A | sudo apt-key add -
98+
99+Add this to :file:`/etc/apt/sources.list`, replacing ``squeeze`` with the name of your distribution: ::
100+
101+ deb http://repo.percona.com/apt squeeze main experimental
102+ deb-src http://repo.percona.com/apt squeeze main experimental
103+
104+Remember to update the local cache: ::
105+
106+ $ apt-get update
107+
108+Supported Architectures
109+=======================
110+
111+ * x86_64 (also known as amd64)
112+ * x86
113+
114+Supported Releases
115+==================
116+
117+Debian
118+------
119+
120+ * 6.0 squeeze
121+
122+Ubuntu
123+------
124+
125+ * 10.04LTS lucid
126+ * 11.04 natty
127+ * 11.10 oneiric
128+
129+Install XtraDB Cluster
130+=======================
131+
132+Following command will install Cluster packages: ::
133+
134+ $ sudo apt-get install percona-xtradb-cluster-client-5.5 percona-xtradb-cluster-server-5.5 percona-xtrabackup

Subscribers

People subscribed via source and target branches