Creating custom solutions: A 20k User Galera and HAProxy Cluster!

Have you ever found your application so successful that you constantly are trying to add more and more resources to a single server to meet the needs? At some point, you will find that the cost of higher speed processors, more RAM, faster drives starts to only provide diminishing returns. So what is a popular website operator to do? At DediPath, besides providing high quality bare metal and VPS offerings, we also provide turnkey custom solutions that address this exact issue.

The problem and solution

A partner recently approached us looking for a solution to serve 20,000 concurrent users on their dynamic website. After documenting all their requirements for current traffic as well as future growth, we created a bespoke solution for them using the mature HAProxy and Galera open source products, saving them money while also providing extensive documentation, rock-solid stability, and ability to scale easily in the future.

Galera Cluster

In this case, the problem can be approached in two parts, the first of which being the management of the dynamic backend data. We needed to provide instant data-replication across multiple servers to allow for both scalability as well as high availability. We did this by creating a three node cluster based on Galera which provides load balancing and data replication which not only allows for the workload to be shared across services, but also provides high availability should a node need to be taken down for maintenance and allow for its automated return to the group once that maintenance is completed. The days of taking down services to perform security updates and patches are now a thing of the past for the partner!

HAProxy Cluster

With the cluster backend solution resolved, we needed to take the same load balancing and high availability approach to the front end. With the same goal in mind as we had with Galera, we needed to find a scalable solution that can serve requests quickly and look to save costs for the customer. We determined the best solution was to deploy a three server HAProxy cluster on the front end. This solution allowed us to perform dynamic load balancing across the cluster with cluster health detection to allow for a node to be taken offline for maintenance and an automated rejoin at the completion. This solution also allows for us to add future capacity via additional nodes at a greater value and lower cost. We provided a solution to the partner with sticky sessions and SSL support that allows for dynamic content to be reliably replicated and served securely.

Constant Communication

Our team found that the most critical portion of this solution was not really the hardware or software, but the constant communication. We ensured that our team was constantly available to answer questions and define the needs as we continued the built out and testing. By involving the partner and receiving constant feedback, we were able to ensure a successful product and launch!

Closing Thoughts

With the initial deployment, the partner site is seeing greatly improved performance during peak times which has allowed for them to provide a better experience. Word of that improved experience has already gotten out and traffic is already on the rise! Should the need arise, it will simply require the addition of another node to the needed cluster with zero downtime as the workload is automatically spread to the new resources. We did all of this with zero licensing fees to the partner! If you’re ready to have us implement your cluster solution, or you need help tackling any other cloud solution, visit us at DediPath.com, give us a call at (877)234-DEDI or find us on Facebook, Twitter, and LinkedIn!

Comments are closed.