Introduction to serverless - Part 1
Hello guys, I have decided to create a series to teach you how to use Serverless services from Beginner to Pro (you will be able to create Projects of your own). The series will be divided into 3 parts, so if you are not following me do that now so that you will be notified when I create new Articles other parts
part 1 - introduction to serverless
part 2 - introduction to AWS amplify part 3 - Getting Started with AWS amplify
You can be sure that after this series you will be ready enough to create your dream project using what you learn here
- react (which will be used in this )
- most importantly willingness to learn
So today I am going to introduce you to the Serverless Computing
what is serverless
I am sure as a developer in 2020 you must have been hearing people talk about serverless, even as a backend developer you must have been seeing trends on twitter about serverless taking over backend developer roles
serverless is an application deployment solution that eliminates the need to maintain a complete host environment for an application. Instead of having to set up a virtual machine (or even a Docker container) in order to execute code, DevOps teams can simply upload individual functions to a serverless environment and execute them on demand.
Serverless is the native architecture of the cloud that enables you to shift more of your operational responsibilities to Hosting services, increasing your agility and innovation. Serverless allows you to build and run applications and services without thinking about servers. This simply means that you are not going to have to create, configure and update your server from scratch.
myths of serverless
The name Serverless
the name serverless doesn't your applications will no longer require a server. It simply means that developers longer needing to manage the servers that run their code manually.
Serverless will take over Backend roles - As true as this may sound it is very wrong. Serverless backend is not an Alternative to a backend developer but a tool that can be used by a backend developer to create and host application quickly and more efficiently
Serverless is more Expensive - In every way, serverless computing is way cheaper than developing from scratch
E.g AWS pricing
The monthly compute price is $0.00001667 per GB-s and the free tier provides 400,000 GB-s. The monthly request price is $0.20 per 1 million requests and the free tier provides 1M requests per month
advantages of serverless
Speedy development creating an application using will be way faster especially when using a tool like Amplify (next topic)
cheaper developing On most serverless platforms, you pay only for the time that your code is running. In this way, serverless costs less than having to pay for a virtual server that runs constantly, even if the applications it hosts are not constantly in use.
Efficiency unlike your traditional development where code can easily break or bug may be discovered in production (especially when you are not Testing Your codes or using CI tools)
Code can be executed almost instantly. You don’t have to wait for a virtual machine or container to start.
- Serverless code can scale massively. Because you don’t have to wait for an environment to start up before launching a serverless function, or to provision more virtual servers when your workload grows in size, the number of requests that you can handle with serverless code without a delay is virtually unlimited.
Disadvantages/limitations of Serverless
Your Workloads are Constant : Serverless is ideal for deploying workloads that fluctuate rapidly in volume. If you have a workload that is relatively constant, however—like a web application whose traffic does not change by magnitudes from hour to hour—you’ll gain little from serverless. So, before moving code to a serverless platform just because everyone is talking about it, consider whether the massive scalability and on-demand execution features of serverless will actually help you.
You Fear Vendor Lock-In : Most serverless platforms are tied to particular cloud-computing vendors. Even those that are designed to be pure-play and open-source, like OpenWhisk, are not compatible with each other.
- While it’s possible to migrate serverless workloads from one platform to another, doing so requires significant manual effort. You can’t use Lambda one day and switch to Azure Functions the next.
What this means is that, if you use serverless today, you should expect to be bound to whichever particular platform you use for the foreseeable future. For organizations that loathe lock-in, this could be a compelling reason to steer clear of serverless platforms.
You Need Advanced Monitoring : The relative novelty of serverless as a widely used deployment solution also means that the ecosystem of monitoring and security tools for serverless functions remains immature. If you want robust monitoring solutions for serverless environments, now may not be the time to start using serverless.
You Have Long-Running Functions One of the main limitations of serverless solutions like Lambda is that each serverless code instance can run for a limited amount of time (five minutes in the case of Lambda).
In the case of most workloads that are good candidates for serverless, this time is more than sufficient. But if you have a workload that is delayed by, for example, network bandwidth limitations, it may not be able to complete in time. You can work around this by chaining serverless instances together, but that’s a clumsy solution, and you’d be better off in most cases by simply sticking to other deployment solutions.
You Use an Unsupported Language : Not every kind of function can be moved to a serverless platform. Most serverless environments support only code written in specific languages. In some cases, you can use wrappers or other tricks to run other types of code, but in general, your options are limited to a core set of popular programming languages.
If you choose to write a given function in a language that is not supported by your serverless platform of choice, then you simply can’t use serverless computing for that particular workload.
Companies that provide serverless service (FaaS)
- AWS Lambda.
- Cloudflare Workers.
- Google Cloud Functions.
- IBM Cloud Functions.
- Microsoft Azure Functions.
- Oracle Functions.
- Vendor Comparison Chart.
After my research, I feel this is all you need to know to get started with serverless computing. If you have any questions or contributions please indicate in the comment section. In my next article, I am going to be talking about "Getting Started With AWS serverLess". So, please follow me and Anticipate