December 03, 2018
In this post we’ll explore what serverless architecture is and how WordPress sites can benefit from the growing trend.
Serverless is a misnomer, and servers are still used in serverless architecture, but rather than a fixed server with finite resources, serverless uses a series of microservices triggered by functions to serve up a website or web application.
Here’s a snapshot from Google Trends that shows serverless as a growing trend over the past 5 years.
This growth can be attributed to the following benefits that serverless offers:
One of my favorite definitions so far is that a serverless system should be designed with the idea that if nobody is using it, then nothing is running.
This makes it very clear that serverless is “event-driven” as opposed to traditional hosting which runs all the time.
By not having your site run all the time, you can lower your costs and your carbon footprint during “off” times. And let’s remember that data centers have a carbon footprint set to exceed that of the entire aviation industry!
Another aspect of serverless is that unlike traditional hosting, there are no fixed resources.
This translates into not needing to worry about scaling or traffic spikes, because serverless scales automatically with demand and you’d never need to add more server resources ahead of huge press coverage.
With serverless, the attack surface is reduced since there’s no underlying database that can be hacked or processing server that needs to be patched and maintained.
Currently, WordPress sites suffer tremendously from security woe. It’s a prime target for hackers because of its ongoing vulnerabilities (over 70% of WordPress sites have active vulnerabilities) and immense popularity (over 34% of websites are running WordPress).
WordPress is a dynamic CMS which means it queries the database for content. Therefore, by default, WordPress is not compatible with serverless.
In order to go serverless:
Luckily, there are a few ways to turn your website into a static site and take advantage of serverless.
Serverless, a more flexible hosting solution, has many benefits, including being “on” when needed, scaling on-demand, security, and lower costs.
For a “long” time (in internet time), WordPress couldn’t take advantage of these benefits since it outputs dynamic websites. Luckily, there are several ways to keep using WordPress and reap the rewards of serverless. Or as we like to say, you can have your cake and eat it too 🙂
Product Manager at Strattic
Rebecca has been in a dedicated relationship with WordPress for over 15 years - one full of love, laughs, tears, growth and strong drinks. L'chaim!