Project name: How to Build Single or Multisite WordPress Hosting Hub. To make the story short, I’ve started ccnahub.com on Shared Hosting Plan, however, few months later and after google indexed my articles, thousands of people are visiting ccnahub.com every month!
Therefore, Shared Hosting Platform is not a long term solution for thousands of visitors. So, I have decided to design and build my own WordPress Hosting Servers using VPS or Cloud Servers.
My long term goal is to open 2 separate WordPress Hosting Hub Platforms:
1. Single WordPress Hosting Hub – E.g. www.wpengine.com
2. Multisite WordPress Hosting Hub – E.g. www.wordpress.com
I know it’s not easy task especially if you have only spare time, however, I started the design already of VPS Hosting infrastructure and this article will show you the planing I have done so far to build scalable WordPress CMS as Single or Multisite Platform. My design starts by phase1 using Multiple VPS Nodes, although it’s possible to start such project with Single VPS or 2 Mirrored VPS, however, I believe it’s better to start with Multi-VPS for too many reasons like better performance and scalability. This project can be implemented as Cloud or VPS Hosting, but VPS instance is half the price of Cloud instance.
To start the project, I designed few Topologies: Phase1, 2, and 3. The following article will show the possibilities to implement each phase. In the next articles, I have discussed each step in details to build Linux VPS using either of the 3 types Linux distributions: Ubuntu, Debian, and CentOS.
Phase1: 4 VPS Nodes:
Phase1 starts with 2 Sites – SiteA and SiteB.
Site A Roles
1. Node1a acts as OpenVPN Server and Mirrored Web Server with Node1b.
2. Node2a acts as OpenVPN Client and Master-Master MYSQL Replication Server with Node2b.
Site B Roles
1. Node1b acts as OpenVPN Client and Mirrored Web Server with Node1a.
2. Node2b acts as OpenVPN Server and Master-Master MYSQL Replication Server with Node2a.
The main idea behind having more than phase is to allow the Network Admin for future Horizontal Scale Out by adding more servers to divide the load, hence moving from phase to phase. Most VPS providers give us the opportunity to scale up Vertically by Adding more CPU, Memory, or Storage, but when it comes to Horizontal Scale Out – Network Design, Operating Systems, and Applications must be planned a head of time. However, the project will be open for ideas to adjust as needed.
Phase2: 6 VPS Nodes
Phase 2 will attach more servers for Redundancy and Load Balancing.
What’s New?
a. One load balancer added before 2 Web Servers to distribute the load.
b. One more Web Server added at each site to divide the load.
c. One load balancer added before 2 MYSQL Replication Servers to distribute the load.
d. One more MYSQL Server added at each site to divide the load.
Site A Roles
1. LB1a will act as OpenVPN Server and Load Balancer.
2. Node1a will act as OpenVPN Server, OpenVPN Client, and Mirrored Web Server with Node3a and Node1b.
3. Node3a will act as OpenVPN Client and Mirrored Web Server with Node1a.
4. LB3a will act as OpenVPN Server and Load Balancer for MYSQL Servers.
5. Node2a will act as OpenVPN Server, OpenVPN Client, and Master-Master MYSQL Server with Node4a and Node2b.
6. Node4a will act as OpenVPN Client and Master-Master MYSQL Server with Node2a.
Site B Roles
1. LB1b will act as OpenVPN Server and Load Balancer.
2. Node1b will act as OpenVPN Server, OpenVPN Client, and Mirrored Web Server with Node3b and Node1a.
3. Node3b will act as OpenVPN Client and Mirrored Web Server with Node1b.
4. LB3b will act as OpenVPN Server and Load Balancer for MYSQL Servers.
5. Node2b will act as OpenVPN Server, OpenVPN Client, and Master-Master MYSQL Server with Node4b and Node2a.
6. Node4b will act as OpenVPN Client and Master-Master MYSQL Server with Node2b.
Phase3: 16 VPS Nodes
High Availability possible if Multiple A records are used between the 2 Sites.
What’s New?
a. One more load balancer with Floating IP Address before 2 Web Servers to distribute the load.
b. One more load balancer with Floating IP Address before 2 MYSQL Servers to distribute the load.
Site A Roles
1. LB1a and LB2a with Floating IP Address to act as OpenVPN Servers and Load Balancers for Web requests.
2. Node1a will act as OpenVPN Server, OpenVPN Client, and a Mirrored Web Server with Node3a.
3. Node3a will act as OpenVPN Client and Mirrored Web Server with Node1a.
4. LB3a and LB4a with Floating IP Address to act as OpenVPN Servers and Load Balancers for MYSQL requests.
5. Node2a will act as OpenVPN Server, OpenVPN Client, and Master-Master MYSQL Server With Node4a and Node2b.
6. Node4a will act as OpenVPN Client and Master-Master MYSQL Server with Node2a.
Site B Roles
1. LB1b and LB2b with Floating IP Address to act as OpenVPN Servers and Load Balancers for Web requests.
2. Node1b will act as OpenVPN Server, OpenVPN Client, and a Mirrored Web Server with Node3b.
3. Node3b will act as OpenVPN Client and Mirrored Web Server with Node1b.
4. LB3b and LB4b with Floating IP Address to act as OpenVPN Servers and Load Balancers for MYSQL requests.
5. Node2b will act as OpenVPN Server, OpenVPN Client, and Master-Master MYSQL Server With Node4b and Node2a.
6. Node4b will act as OpenVPN Client and Master-Master MYSQL Server with Node2b.
Finally, there is no perfect solution to fit all application requirements, however, the upper project phases will focus only on serving WordPress CMS Platform. So, you may picked Phase1 or Phase2 but using one site instead, or Phase2 and 3 together with less or more Nodes, no matter which phase you picked or planning to implement, please share your thoughts.
Genaro Krasnici author says
loads of nice references and pointers.