We like to keep our infrastructure up to date, so we're always analyzing, tweaking and testing our platforms. Most of the time these changes are not really worth mentioning, but recently we had quite some interesting upgrades which we'd love to share with you. Not too long ago we replaced our caching servers (they serve the static content of the websites we host) with new hardware and the result is nothing short of awesome, as they make your website load faster than ever. In this article we will explain the benefit of our caching features, why it makes our webhosting service unique and how you can get the most out of it.
If we compare the new caching servers to our previous ones, the new caching servers feature 4 times the amount of memory and 8 times the CPU power. Each caching server now has 256GB of high speed DDR4 RAM, fully allocated to serve the static content of your website, such as images, stylesheets, etc… This basically means that more content than ever can be served directly from RAM, instead of being handled by the backend webservers.
How does this work again?
Our hosting packages are divided among clusters, each featuring multiple cache servers on top, multiple webservers as backend and fast SSD-based fileservers at the bottom. All of your website traffic is primarily handled by the caching servers using the super-fast Varnish caching software. This software allows all the website content that doesn’t change often to be cached, allowing the webserver to only process the dynamic content, such as PHP pages, this way using every cpu-cycle as efficiently as possible. Resulting in our caching servers handeling up to 60% of all requests directly from RAM, and only the remaining 40% being processed by the backend webserver.
To put it in prespective, at peak moments our caching servers can handle up to 70.000 requests per second, keeping all the heavy workload away from our webservers, allow our servers to keep working even when there is an enormous load on the platform.
Is there anything I can do to improve caching?
By default, we have an optimized configuration in place for most common content management systems, forcing all static content such as images and stylesheets through our caching servers. This includes CMS’s such as:
If you do decide to optimize your website for caching, you could do so through the use of .htaccess files. With these files you can modify which parts of your website should be cached, and for how long. For the exact syntaxes, see the mod_expires documentation of the Apache webserver.
To help you optimize your page, you can also check this article.
Can I cache everything?
We try to cache as much content as possible, but there is some stuff that should not be cached. Dynamic content, due to its constantly changing nature, should not be cached at all.
Furthermore, when our servers notice your website is setting a "cookie", no content will be cached. This is because when a cookie is set, we presume that you are logged in to the backend of your website (such as the WP Admin dashboard for Wordpress) with the goal of updating or making changes to your website and it wouldn't exactly be convenient if you where updating your website and we would still show you the old version, right?
So remember, when you set a "cookie”, Varnish caching is disabled, so it is wise to not set unnecessary cookies which might circumvent the caching services.
How do know if my website is being cached?
PCextreme sends out webserver headers on each request, which you can see using standard developer tools for your browser.
If the header says "PCX/Cache" this means, your request was cached, if instead you get "PCX/NoCache" your request could not be cached.
What other benefits are there?
Besides making your website faster, there are other benefits of having these caches in front of your website such as:
There are also security enhancements in place, for example, it can protect your website against common exploits as well as brute-force attacks on your Wordpress or Joomla administrator backend. If we notice someone trying to guess your passwords continually we will block him automatically.
The caching software is a very intelligent piece of software, it detects when backend webservers are not functioning correctly so it can divert traffic if needed. This helps PCextreme prevent problems without causing any inconvenience to your website.
Coming soon: Caching as a Service
Is your website hosted elsewhere, but you would like to benefit from these caching services? You’ll be happy to know that we are currently working on a HTTP router service with caching functionality. This product will allow you to point you visitors to this service and we will do all the caching, load-balancing and health-checking of your (web)servers for you.
If you’d be interested in this product keep an eye on our website as we will inform about it as soon as we release it!