Skip to content
A quick vargrant to prop up a 3 node percona cluster
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Percona XtraDB Cluster (PXC) Demo

Quickly get a Percona XtraDB Cluster cluster up and running with Vagrant & some shell magic. The base OS is Centos 6.4 x86_64.

You'll also get an HAProxy node which will round-robin connect you to any of the three nodes configured for HA failover. Go ahead, kill -9 a server with a loop running in the background -- you'll have about 2 seconds of potential down time.

Once vargrant has finished provisioning, the network diagram will look like this:

           host:8080 ───> haproxy:80    ┌───> m1:3306
           host:3306 ───> haproxy:3306 ─┼───> m2:3306
cc:80 <─── host:9090                    ├───> m3:3306
                                        └───> mN:3306*  

* You can have up to 9 nodes. By default this kicks off 5 -- you can modify the Vagrantfile to easily spin up more/less


  1. Install Vagrant
  2. Clone this repo
  3. vagrant up

After Startup

The HAProxy node will come up first and you can watch -- it'll be a bit boring right up to the point where m1 comes online and you see it go green in the status board.

Once m2 is up, you can start using your favorite mysql client to connect to with the userpass of cu and cu to the clusterup database. Note how you don't have to wait for m3 to come up, neat :D

If you vagrant ssh ha you'll find that sysbench 0.5 has been installed and you can use it to run the OLTP test against the cluster.


  • Cluster Control (cc) is a WIP getting a host for that setup and provisioned. Should be a fun item.
  • Totes' not safe for a real production deployment (Vagrant boxes come with a publicly known SSH keypair.)


Something went wrong with that request. Please try again.