WordPress @ 160 requests per second

We’ll take a brand new Kubernetes Cluster and deploy WordPress making it highly available by using Replicas, MySQL & an NFS Service. This exercise will cover the following Kubernetes Topics:

Kubernetes Deployments

Kubernetes Services

Kubernetes Ingress

Kubernetes PersistentVolume

Kubernetes PersistentVolumeClaim

By combining these resources with MySQL and an NFS Service you’ll be able to see, in real time, a simple WordPress Service handling over 160 requests per second!

The Kubernetes Architecture

Traffic will be routed to our (multiple) WordPress Pods through the Ingress Controller (which is basically a reverse proxy). Through Services our pods will receive the end users http requests which will be served by the running containers web server.

WordPress will read (and write) persistent data to disk which will be represented by an NFS mount locally within each container. By using an NFS mount our pods can scale horizontally and be backed by the same filesystem removing the requirement to replicate data manually and having a cloud provider that supports volumes with “ReadWriteMany” mounting procedures.

Source Code Repositories covered in this demonstration:

Alternatively you can use this monorepo: https://github.com/mateothegreat/k8-byexamples-highly-available-wordpress.