We will implement primary and secondary ELBs with configured health checks under AWS Route 53 DNS along with advisories for phpmyadmin access via the ELB DNS alias.
As before lets take a look at the schematic first (Fig:1), followed by an explanation of what's going on.
So, what do we have here. Well, as in the previous post our PXC is configured with IOPS optimised EC2s spread over x3 zones. A x3 (AWS) zone, datacentre or 'switch' minimum configuration is strongly advised to prevent a 'split brain' situation in the event of node connectivity issues, although an 'arbitrator' instance can be utilised for x2 nodes where a x3 node config is not possible. In this expanded configuration we have x2 ELBs configured identically (with the same port listeners/health checks etc) although for resilience they should be placed in alternate zones
Cluster nodes and ELBs are running in their own respective security groups (SGs) with relevant port/IP and/or top level SG access between both granted and locked down where required. The 'magic' is taken care of in Route 53 using failover (health check) aliases for primary and secondary ELBs (Fig:2). Simply choose 'Failover' as the Routing Policy and create matched (primary and secondary) entries for both ELBs. Job done.
As previously mentioned, in order to utilise phpmyadmin via the ELB DNS alias you will need to configure relevant ELB port pass through (80) along with load balancer generated session cookies set with a suitable expiry time, and you will (obviously) need to install phpmyadmin to each node.
If you would like advice or assistance with Percona XtraDB clustering, or any other aspects of AWS IaaS and HA systems feel free to get in touch, we would be more than happy to hook up and discuss how Cirronix can help you design and deliver your cloud infrastructure - http://cirronix.com/contact