Clustering Overview

Clustering is a rather generic term when it comes to computers. There are a variety of clustering mechanisms and uses and the term clustering usually denotes a group of computers (2 or more, dubbed nodes) working together as a unit on a task. The clustering that InterWorx-CP supports also employs a load balancer which distributes incoming traffic to one of the nodes in the cluster. As traffic flow to the cluster increases, more nodes can be added to distribute the load over a broader range of servers.

Why an InterWorx-CP Cluster?

Clustering allows you to harness the power of multiple servers acting as a single unit. The historical problem with clustering configurations for most users is the setup and maintenance processes. Setting up and maintaining a cluster traditionally requires a system administrator to architect, install and monitor the cluster. There are key decisions to be made regarding how the cluster is architected.

  • Is it a shared storage solution?
  • How is data synchronized across nodes?
  • Which load balancer should be used?
  • What load balancing policy should be employed?
  • What happens if a node requires maintenance?
  • How are account setups to be handled across all nodes?
  • Where do users manage their website from? Can they?

Some of these questions can be answered by simply purchasing a hardware solution that serves the purpose. These solutions work well, but at exorbitant cost for the average user. While purchasing a hardware solution may solve the technical problems but the management problems longer term will remain.

The InterWorx-CP Solution

InterWorx-CP uses a collection of open source components and glues them together with the InterWorx-CP API system allowing a single InterWorx-CP box, the Cluster Manager, to control and manage an entire cluster.

Clustering Overview

Clustered NodeWorx - The Cluster Manager

To manage the cluster itself InterWorx-CP provides the Cluster Manager. From the Cluster Manager node you can add and delete nodes from the cluster graphically without ever having to use a shell utility. The Cluster Manager also acts as the main console for account management. Any accounts added on the Manager will instantly be propagated to all InterWorx-CP nodes in the cluster via the InterWorx-CP API subsystem. Adding and deleting nodes and accounts is made simple by the same InterWorx-CP interface you're already used to.

Clustered NodeWorx - Clustered Nodes

Each clustered node has an abbreviated interface to some features but still allows the admin to control the basic services. While you cannot add or delete accounts from the clustered nodes you can still do basic tasks such as control DNS for the cluster and edit packages. You can also manage all basic services on the box such as Apache, FTP and e-mail services.

Clustered SiteWorx

SiteWorx is virtually unchanged in the clustered environment. SiteWorx users can use any node in the cluster without seeing any difference in functionality or interface. The system is truely perceived as a single server.

Load Balancing

The load balancer, provided by the Linux Virtual Server Project (LVS) is a robust software load balancing solution. LVS has many large installations and is a proven technology. If you're already familiar with LVS you'll be happy to know that you can do any and all configuration for LVS from the command line as you can with most IWorx-CP services. We also provide a clean graphical interface on the Cluster Manager to configure all aspects of the load balancing setup, including RRD graphs so you can track the load balancer as it balances.

Cluster Storage

Our solution uses a shared NFS storage mechanism to mitigate any overt data synchronization of data. Asynchronous data synchronization (usually done via rsync) can confuse end-users when using a cluster as data uploaded to one node may not be immediately available on all nodes. Our NFS solution provides a synchronous data source where all nodes see exactly the same data at the same time. The shared storage device can be as simple as one of the drives in the Cluster Manager (the default) or as complex as a RAID and/or NAS setup.

Using Cluster Services

The InterWorx-CP clustering solutions makes a cluster of servers act as a single, virtual server. This is best conveyed by using basic services such as IMAP, POP3, SSH, etc. You can SSH to any of the clustered nodes, edit files and the entire cluster instantly sees the change. If you need to hand edit a PHP script via SSH every apache instance on every node will process the change as soon as you save the file. This is also true for POP3 and IMAP. You can check POP3 e-mail from any node and you will get the same result. This allows for easy load balancing of services beyond HTTP and HTTPS.

Clustering Mini-FAQ

Q. Is this a true load balancing solution?

A. Yes, domains are served from every clustered node and the cluster manager acts as the load balancer for the cluster using LVS.

Q. How are files synced across the cluster?

A. There is no scheduled synchronization done at all. The system uses a shared NFS storage device on the cluster manager as the main repository for client data.

Q. Don't session based scripts break when used in a cluster?

A. No, sessions are handled by LVS persistence (node affinity) where a given client IP is Adirected to the same cluster node over a period of time, thus saving the session state. For applications with database-based sessions the persistence is not even needed.

Q. What box do my users connect to for mail, ftp etc?

A. This is up to you. Users can connect to any box in the cluster, including the Cluster Manager to use IMAP/POP3/FTP services. Users can also send mail from any box in the cluster. It comes down to a architectural decision you must make as to what IPs to publish to your users for a given service.

Q. How does the load balancer work?

A. Load balancer documentation

Q. What platforms does the clustering solution run on?

A. At the moment just CentOS/RHEL 4 and above, but there is no technical reason it can't be run on every InterWorx-CP supported OS.

Q. What resources and hardware/software do I need to build a cluster?

In order to build a cluster:

  • A minimum of two servers are required (the cluster manager and one node)
  • All servers (cluster manager and nodes) MUST have an unlimited domain license
  • Each InterWorx-CP server must be running CentOS 4 or above
  • The cluster manager MUST have two public IP address and each node must have at least one public IP
  • All machines in the cluster MUST be the same architecture (all i386 or all x86_64)
  • The IPs of the cluster manager and nodes MUST be on the same network segment (e.g. to have a 2 node cluster (1 cluster manager and 1 node), you will need at least 3 different IPs, all on the same network segment )

Q. Does the clustering solution cost more than the base product?

A. No, any non-VPS unlimited domain license can run the clustering solution.

Q. Where is the clustering documentation located?

A. Clustering documentation

Q. How is DNS handled, is there a master/slave setup between the nodes?

A. InterWorx-CP uses a database back-end to store all DNS data. This means that each node in the cluster, including the Cluster Manager sees the exact same DNS data. You can simply use any of the nodes as a full fledged DNS server for sites in the cluster without having to worry about setting up any master/slave system. It is a truly clustered DNS setup.

Q. Does each cluster node require a license?

A. Yes, every node in the cluster requires an unlimited domain InterWorx-CP license.

Q. Is this a high-availablity solution?

A. No, not at this time. This functionality is currently being developed.

Q. Can the servers in my cluster be running different OS's?

A. No, all servers (CM and Nodes) MUST have the same OS: CentOS/RHEL 4 or above.

Q. Can servers in the cluster be of different architectures?

A. No, all servers in a cluster MUST be either i386 OR x86_64

Q. How many public IP's does each server in a cluster need?

A. The cluster manager MUST have two public IP address and each node must have at least one public IP.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by WP Hashcash