Do you seek a hosting solution with increased scale and availability? A Nexcess Hosting Cluster Solution can provide what you are looking for. Learn more!
Nexcess Enterprise Hosting: Clusters 101 - An Overview for Clients & Admins
What is Clustered Web Hosting?
Clustered hosting is primarily an enterprise hosting solution, with the main benefits being increased scale and availability. It provides a way of scaling horizontally among multiple servers, which increases maximum throughput, and adds fault tolerance through redundancy.
Already Ready for Your New Nexcess Hosting Solution?
Are you on an accelerated schedule and already ready to move forward? If you need to get started with your Nexcess Hosting Cluster Solution sooner rather than later, check out these resources:
Hosting Cluster Challenges
The benefits outlined above are short, simple, and clearly valuable. Unfortunately, those advantages come at a cost, both financial and in the form of significantly increased complexity. It’s easy enough to lose track of all the moving pieces in a single server environment, and this can grow exponentially with the size of a cluster solution if left unchecked. On the other hand, things like version control, configuration management, and good naming conventions can all be extremely valuable with this kind of solution. It can also be beneficial to maintain a reference diagram of the application and cluster layout and its interaction with all external systems.
The simplest form a cluster can take is a two-server solution. The second server is used to offload a heavy piece of the infrastructure, such as a database service, to its dedicated server with its own resources. There generally isn’t much added complexity in this basic layout, as most of these services can work across a network just as well as they would when accessed locally.
When you add in multiple servers performing the same role, you have to face bigger challenges like ensuring state and data consistency. These objectives are primarily handled by using services like Redis to store cache and session data that can be shared between servers and a network file system to ensure the files are consistent. These external resources do add overhead to actions, though, and network file systems, in particular, can become a bottleneck if not implemented intelligently.
Do You Have Questions About Enterprise Hosting?
What size solution should I choose?
Our cluster architects will guide you through the selection process and size you according to your needs.
The solution you provided seems too big/small, can we change this?
Our cluster architects will size you based on what they believe you will likely need. In some cases, we will incorporate your projected growth in this assessment. If you feel you would like a solution different than the one we suggest, we are happy to help.
How big can my cluster become?
Theoretically, as large as you need it to. Talk to our cluster architects to see what size is right for you and how much you expect to grow in the future.
What applications can I use?
You can use any web application compatible with our systems, as long as you hold the appropriate licenses and authorizations. Our ESG team will help you to load the application onto your cluster at no additional cost. Bear in mind that we have optimized our servers for certain applications. Get in touch with our cluster architects to see what that may mean for you.
What level of support will I receive with an enterprise solution?
Our enterprise solutions all come with ESG support.
What is the Enterprise Support Group (ESG)?
The ESG is a team of experienced hosting veterans dedicated to keeping your solution running smoothly. They will also handle enterprise migrations so your site has no downtime during its transition.
Nexcess Hosting Cluster Solution
The above sections give a short overview of the benefits and difficulties of a cluster solution. The rest of this article will cover how Nexcess implements this and provide an introduction on interacting and managing sites on a Nexcess cluster service.
Nexcess clusters come in two basic layouts. The first is a single server with an external database server. The second will include at minimum a file server, database server, load balancer, and one or more web nodes. A lot of the information below will be primarily focused on the second type as it is more complex by design. However, many of the items will still apply to the first type and quite a bit will even apply to environments with only a single dedicated server as well.
One great benefit of using a load-balanced environment, even with only a single web node, is that it makes scaling up for busy periods much easier. Building additional web nodes and adding them to the environment is a straightforward process that can be done without interruption to the site. It’s also a common practice to add an “admin” node that provides a dedicated server for site administrators that is less impacted during moments of heavy load on the front end of the site.
Servers in a cluster all have hostnames sharing a common prefix, followed by their role and a number that uniquely identifies it among other servers in that role. So, with a prefix of gpc999, the hostnames would be something like:
gpc999-lb1.us-midwest-1.nxcli.net.yaml (Load Balancer)
gpc999-fs1.us-midwest-1.nxcli.net.yaml (File Server)
gpc999-db1.us-midwest-1.nxcli.net.yaml (Database Server)
gpc999-node1.us-midwest-1.nxcli.net.yaml (Web Node 1)
gpc999-node2.us-midwest-1.nxcli.net.yaml (Web Node 2)
gpc999-admin1.us-midwest-1.nxcli.net.yaml (Web Node for admin traffic)
The servers are all connected on a local network or “backnet”. To take advantage of that setup, each server also has an internal hostname consisting of the beginning of their external hostname followed by -int. One example would be:
Where: Web nodes.
- Apache Description: Web server that runs only on web nodes and routes traffic to the applications.
Where: Web nodes.
- PHP-FPM Description: Dynamic requests are routed to this by Apache. This service executes the actual application code for any application written in PHP.
Where: Database server.
- MySQL Description: Relational database service. Nexcess predominantly uses MariaDB.
Where: File server.
- NFS Description: Network File System allowing for files to be shared among all servers.
Where: Load balancer.
- HAProxy Description: Robust load balancing software used to route traffic to web nodes evenly.
Where: Load balancer.
- Ipvsadm Description: Simple load balancing software used to route traffic to web nodes evenly.
Where: Load balancer.
- Varnish Description: Highly configurable and fast page cache.
Where: File server or load balancer for instances without replication.
- Redis Description: Fast caching and session storage supported by most applications.
Where: File server or load balancer.
- Elasticsearch Description: Search engine supported by many applications.
Where: File server or load balancer
- RabbitMQ Description: Message broker used for running tasks asynchronously.
Managing a Nexcess Cluster Solution
Add/remove domains or create domain aliases
Change the PHP version used by a site
Reset SSH password or manage SSH keys
Whitelist IP addresses for SSH/SFTP/FTP access
Add and remove databases
Manage database users
Manage other control panel users
, but the load balancer is treated as the gateway to the cluster. Once logged in to the load balancer, shortcuts are available via configuration in .ssh/config file for the user that allows quickly logging into other hosts:
This is added by default on newer clusters but is currently not present on all. If these shortcuts aren’t working for you, contact our support team, and we can get it added to an existing service.
Adding Domains or Accounts
Clusters can support as many sites as the resources allow, and as mentioned above, . These sites can also be distributed among multiple SiteWorx accounts, which means they will be under separate Unix users on the servers for better isolation between them. New sites can be added to existing accounts, however, new accounts must be created by our support team.
Note: Adding secondary domains (not aliases) to an environment using HAProxy requires a minor modification to the Apache configuration on each newly created domain. At this time, this needs to be done manually by our support team.
As mentioned above, via . Accessing MySQL remotely, however, requires firewall whitelisting for specific IP addresses that our support team can only do. Alternatively, it can be accessed using an SSH tunnel through the load balancer which most MySQL clients support.
Note: SSH tunneling is not enabled on all environments currently. Contact support if you’re having trouble connecting.
The default settings for SMTP in most applications use localhost port 25 for sending email. . Email sent during a web request will be sent from a web node, whereas a cron job will send mail from whatever server that cron job is running on (likely a file server or a load balancer).
We do not provide root access to our servers; however we do allow the ability to restart/reload most of the services listed above via sudo. You’ll also need to ensure you’re logged into the proper server using the information outlined above for the various services.
, however, the best place to run most cron jobs is on the file server as it saves overhead from NFS and tends to perform better as a result of that. Note that the PHP version used by cron jobs is set manually via the PATH variable at the top of the crontab file.
The PHP version used by CLI commands is set in your user’s .bashrc file which is read on login. While commands can be run from almost any server due to NFS, commands involving many file changes will perform best when run directly on the file server.
Apache access logs and error logs for all web nodes are available via NFS on the load balancer. They are located here, where xx.xx.xx.xx is the internal IP address of the specific web node:
PHP errors that occur during web requests will either be written to the site’s Apache error log or to a php-fpm error log:
Most PHP settings can be done via the .user.ini file in the site’s document root. You can find a reference of settings in the List of php.ini directives - Manual. Settings marked with PHP_INI_PERDIR or PHP_INI_ALL can be set in the .user.ini file. These settings are only read by web requests, though command line configuration can be adjusted through the use of flags appended to the command.
This article was intended to provide a high-level overview of what a cluster solution is, when to use one, and how to manage one with Nexcess. Some topics mentioned may require much more detail than seen here, and therefore may be covered in future articles of their own to explore their full depths. Our support team is available 24/7 to assist with any issues you may have to further clarify anything mentioned covered in this article.
Consider at Nexcess Hosting Cluster Solution to take your online business to the next level:
We’ve been delivering secure, high-performance enterprise hosting with best-in-class support and unrivaled uptime since 2004. Our pre-sales cluster architects will help you find the right setup for your business, before our enterprise support group guides you through the migration process.
From the moment your service starts with Nexcess, your site will be proactively monitored and secured by the Nexcess Enterprise Support Group (ESG). Experienced technicians will handle your initial migration and address any issues for the life of your service.
If you need any assistance with the above-mentioned, don't hesitate to reach out. For 24-hour assistance any day of the year, Nexcess customers can contact our support team by email or through your Client Portal.
Useful YouTube > Nexcess Channel Links