Scalable WordPress

A highly scalable and performance-tuned platform for running a WordPress site.


Scalable WordPress is a highly scalable and performance-tuned platform for running a WordPress site. It combines industry best practices with best-of-breed technologies and Elastisys’ industry-leading autoscaling to empower you with a flexible and performant platform to host your WordPress site.

Scalable WordPress adjusts to your site’s traffic. It increases the number of servers to handle load peaks and reduces the server pool at low-traffic hours, allowing you to always run with just the right amount of capacity. This allows you to cope with surges in traffic without being charged undue amounts for an overdimensioned hardware setup and, most importantly, your visitors get to enjoy a smooth browsing experience at all times.

Scalable WordPress runs on-premise or in a public cloud of your choice.

If you have a WordPress site that needs to deliver a responsive user experience even in the face of high variations traffic, Scalable WordPress is for you!

Features

Scalable WordPress is built following industry best practices and comes with a lot functionality that goes beyond what is normally offered by WordPress hosting sites. Some notable features of the Scalable WordPress platform include:

  • Auto-scaling: Scalable WordPress automatically scales in all dimensions in response to changing load. More specifically, it is capable of scaling the system both at the component-level and at the server level. See the architecture description below for more details.
  • Self-healing: Scalable WordPress uses probes to continuously monitor the health of system components and restart components that appear to be at fault.
  • Monitoring: Scalable WordPress contantly collects performance metrics during its operation. These metrics are visualized in
    a Grafana dashboard.
  • HTTPS: Scalable WordPress secures the traffic to your site by enforcing HTTPS. At the reception of a request, it authenticates to the client with the site certificate. At this point it also terminates the SSL connection, allowing for, more performant, plain HTTP to be used internally within the Scalable WordPress stack.
  • Automatic certificate management: a certbot automatically acquires and renews the site certificate when the certificate is nearing its expiry date. The certificate comes from Let’s Encrypt, a free, open and widely trusted Certificate Authority.
  • Web accelaration: a web acceleration reverse-proxy is used to cache rendered web pages to provide nearly instantaneous responses to clients, while at the same time off-loading the backend.
  • Application cache: more fine-grained, WordPress-specific, caching is supported via an in-memory cache that WordPress caching plugins, such as W3 Total Cache, can use as an object cache, a database cache, or a page cache.
  • Run anywhere: Scalable WordPress runs in public clouds and on-premise.
    To support auto-scaling at the server-level, it needs an API to start/terminate VMs.

Under the hood

Scalability is the primary design tenet of Scalable WordPress. We want the system to scale in all dimensions and to limit potential bottlenecks. Following this principle we have put together a software stack of proven technologies that scales both at the component-level and at the server-level.

At the very foundation of the system we find Kubernetes, a production-grade system for running software across clusters of (virtual/physical) machines. With Kubernetes, we are standing on the shoulders of giants, benefitting from 15 years of experience running production workloads at Google.

Scalable WordPress is comprised of a software stack where components can be conceptually divided into layers, each of which can run with one or more instances depending on the load. Each component instance in the stack is run as a Docker container that is scheduled onto one of the (virtual/physical) machines that comprise the Kubernetes cluster.

When we combine Kubernetes with Elastisys’ industry-leading autoscaling, we end up with a runtime that elastically scales along two dimensions:

  • Autoscaling is applied to right-size each individual software layer in the stack by adjusting the number of containers required to handle the load being placed on the component.
  • Autoscaling is also applied to the Kubernetes cluster itself, to ensure that the right number of Kubernetes worker machines are available to fit the desired containers.

At times of high load, many of the micro services within the cluster will require additional pods to be started. In such situations, the cluster-level autoscaler may need to expand the cluster by adding additional worker nodes to fit the requested pods. Similarly, at times when a lot of micro-services are experiencing low load, the total number of scheduled micro-service pods will decrease, eventually allowing the cluster to shrink by removing worker nodes.

This combination of component-level autoscaling and server-level autoscaling that is one of the primary traits of Scalable WordPress.

Software stack

The components of the Scalable WordPress software stack can be conceptually divided into layers, as shown in the image below. Note that most layers are represented by multiple boxes. This indicates that the component can run with more than one instance — components that can be scaled out at times of high load, and scaled back in at times of lower load.

Turning our attention to each of the software stack layers we find the following components:

  • SSL-termination layer: consists of a collection of nginx instances, which handle incoming HTTPS connections from clients, authenticates the site using the configured site certificate and then translates those HTTPS requests to HTTP, which is used internally within the stack. Once HTTPS/TLS has been terminated, requests are forwarded to the Varnish layer.
  • Varnish layer: the Varnish instances keep a cache of rendered pages received from WordPress, thereby off-loading the lower layers of the stack and allowing very quick responses for pages in the cache. With some amount of tuning, Varnish should be able to respond with cached content most of the time. When a page is not found in the cache, requests will be passed through to the WordPress layer.
  • WordPress layer: runs an Apache webserver that serves up the WordPress (PHP) application. This is where your pages/posts are rendered.
  • Redis layer: while the rich ecosystem of plugins makes WordPress an extremely flexible platform, most plugins come with a performance penalty. For example, by adding database queries and processing time to your pages. Caching is tremendously important to keep page load times in check in the face of “heavy” plugins. With the help of WordPress plugins, such as W3 Total Cache, results of recent expensive computations/database queries can be kept in memory for easy retrieval should the same computation be needed again in a short while. A collection of Redis instances are provided to supply lightning-fast retrieval of cached items.
  • Database layer: WordPress needs access to a database to store pages, posts, and comments. This is where MySQL enters the picture. To survive process failures and machine reboots, it needs to store its data to a persistent volume.
  • Filesystem layer: WordPress needs a file-system to store themes, plugins, uploads, etc. Since several WordPress instances can be used to process requests, the file-system needs to be writable by multiple concurrent writers. Scalable WordPress can be adapted to use any network file system, as long as it is (or can be made) supported by Kubernetes.

Scalable WordPress is a truly elastic platform for delivering WordPress sites. In fact, by visiting this site, you are already experiencing Scalable WordPress as a site visitor.

If you would you like to get a demo of your own site running on the Scalable WordPress platform or discuss how Scalable WordPress can be customized for your use case, please contact us.