Understanding serverless computing can be confusing enough. Determining whether or not itโs a good development solution for you gets even more complicated, as there are many pros and cons to consider.
In this article, weโll break down the basics of serverless computing for WordPress developers. Then weโll discuss some of the factors you should consider when deciding if this technology is right for you.
Letโs jump in!
An Introduction to Serverless Computing for WordPress Users
Serverless computing can be tricky to make sense of at first, especially because its name is misleading. While it implies that you may be able to develop a website or application without a server, thatโs not the case.
Instead, the term โserverlessโ means that the job of setting up and maintaining the servers needed to develop your project is left to a cloud services provider. This gives you, the developer, more time to commit to actually creating your website or application.
The cloud services provider handles all your back-end processes on a pay-per-use basis. Meanwhile, your website or application is built on highly-scalable architecture. To break all of this down a little further, serverless computing consists of three key features:
- Cloud-based servers that are managed entirely by cloud services providers, also sometimes called โvendorsโ. The developer does not have to do any server maintenance or worry about the underlying infrastructure of their project.
- Costs that are determined by usage, rather than pre-paid storage that you may or may not use to its fullest extent. With serverless computing, you pay only for the executions of your site or appโs functions, which scale automatically based on how often its code is run.
- An architecture that breaks a website or application down into individual functions. This is also known as Function as a Service (FaaS), in which code is executed in response to specific events.
In many situations, this provides a way for developers to get their projects up and running faster, as they donโt have to worry about server maintenance. It also reduces costs while increasing scalability, and in some cases, speed. However, serverless technology isnโt right for every project.
How to Decide If Serverless Computing Is Right for You (5 Key Factors)
If youโre trying to decide whether or not serverless computing is a strong choice for your next project, there are several considerations to keep in mind. While this method of developing sites and applications can offer many benefits, itโs dependent on the specific qualities of your project. Letโs explore what that means in more detail.
1. Consider the Size of Your Project and Its Potential Latency
To start with, serverless computing is most successful when itโs used to create static websites or simple applications. Static files and a small number of simple functions are easy for a serverless architecture to serve to end users.
However, very large dynamic sites and applications with a lot of more complex functions wonโt necessarily fare as well. With bigger projects, your codeโs run time will likely be longer, which could have negative effects on your projectโs speed and the cost of running it.
A related consideration is the frequency with which each of the functions that make up your website or application will be used. When a function on a serverless architecture hasnโt been called in a while, its code is not constantly running. If a user calls an infrequently-requested function, it will require a โcold startโ. This will result in latency and could impact your User Experience (UX), as it will take a while for the code to โwarm upโ again.
2. Decide How Much Time You Can Dedicate to Maintenance
One of the primary advantages to going serverless is the amount of time you can save. For example, you donโt have to build the infrastructure on which your website or application will run. You can focus exclusively on the code thatโs specific to your project.
However, an even more appealing time-saver is the fact that you wonโt have to worry about server maintenance. Your cloud services provider handles all of that for you, saving you time not only during development, but over the course of your site or applicationโs lifetime.
That said, if youโre already maintaining a server for another project, taking on a little additional maintenance may not be much of a problem for you. When you consider the fact that it can be extremely difficult to move a project from a traditional architecture to a serverless one, sticking with what you know isnโt necessarily a bad idea.
3. Determine Your Budget and Compare Costs
The serverless pay-as-you-go financing structure certainly has its appeals. When compared with the traditional method of paying for server space upfront, it seems like the wisest option. After all, youโll never have to pay for space you havenโt used, like you might when youโre pre-paying.
However, that doesnโt mean serverless computing is always a low-cost proposition. As we mentioned earlier, functions with long run times could greatly increase your costs. A large website or a complex application is still going to run up a pretty high bill.
Additionally, situations where a huge number of requests are made all at once could end up costing you more than you might anticipate. This could include a simple traffic spike, or a less pleasant event such as a Denial of Service (DoS) attack. Either way, youโre the one who will pay for all those requests.
In short, donโt just assume that serverless architecture will be less expensive that the more traditional alternative of managing your own server and pre-paying for storage. Consider your traffic levels and the complexity of your project, and then compare the potential costs before committing to one or the other.
4. Figure Out How Important Scalability Is to Your Project
Handling the growth of a website or application is an ongoing and not always simple task. If you donโt account for potential growth, your project may crash and burn. However, overestimating could result in you paying for costly server space that you donโt need.
Serverless computing takes the question of scalability off your plate, and makes it on your providerโs responsibility. A serverless site or application is highly scalable and adapts instantly to your usersโ needs. Youโll no longer have to worry about overloading your server, or other negative side effects to huge traffic spikes.
That said, there are plenty of ways to make your project scalable, especially when youโre working with WordPress. If there are more reasons to choose a traditional setup, scalability probably shouldnโt be the sole factor that tips the scale towards going serverless.
5. Account for a Lack of Control Over Your Server
One of the biggest concerns when it comes to serverless computing is the lack of control youโll have over your server. While itโs convenient that your cloud services provider handles so many tedious details for you, it also restricts your access to some of your projectโs features.
With no access to your server, youโre entirely dependent upon a third party for your website or application to work properly. You also wonโt be able to see your back-end processes, which will make debugging and troubleshooting much more difficult than with a traditional project.
Additionally, youโll have no way to vet your vendorโs security upfront. If you handle user data or other sensitive information, this could become risky. Youโll have no control over whether your project shares server space with other projects, which could result in data exposure. These risks can be mitigated, of course, but theyโre still worth considering.
Conclusion
Serverless computing isnโt the most straightforward concept. While youโll hear a lot about its many benefits, there are also key drawbacks to consider. In other words, deciding if serverless technology is right for your project is no small task.
To help you get started, here are five factors youโll want to think about when deciding if you should go serverless:
- Consider the size of your project and its potential latency.
- Decide how much time you can dedicate to maintenance.
- Determine your budget and compare costs.
- Figure out how important scalability is to your project.
- Account for a lack of control over your server.
Do you have any additional questions about serverless computing? Let us know in the comments section below!
Article Thumbnail Image jkcDesign / shutterstock.com
I’m particularly attached to cloud computing, considering the benefits that you’ve listed:
Costs that are determined by usage, serverless computing and no storage challenges.
However, my concern is my data being managed by a third party and i have to trust him with it’s security.
Is there a solution to this so far?
Hi Kosigro,
There there isn’t a specific solution, other than discussing any concerns directly with the cloud computing provider to raise your concerns. They would be the best placed authority as it pertains to your own service.
I totally agree that serverless computing is very easy for end users, but new project usually don’t need much resources so they tend to stay with simple Shared Hosting stuff, its kind of serverless for them already. This topic needs more exposure to help customers understand better.
We totally agree that the topic needs more exposure, Nasir. This is a great opportunity to share the piece with those who need it. ๐