Serverless computing is a method of providing backend services on an as-used basis. Servers are still used, but a company that gets backend services from a serverless vendor is charged based on usage, not a fixed amount of bandwidth or number of servers.
After reading this article you will be able to:
Related Content
Serverless Vs Containers
Serverless and Javascript
Function as a Service (FaaS)
Edge Computing
Platform as a Service (PaaS)
Subscribe to theNET, Cloudflare's monthly recap of the Internet's most popular insights!
Copy article link
Serverless computing is a method of providing backend services on an as-used basis. A serverless provider allows users to write and deploy code without the hassle of worrying about the underlying infrastructure. A company that gets backend services from a serverless vendor is charged based on their computation and do not have to reserve and pay for a fixed amount of bandwidth or number of servers, as the service is auto-scaling. Note that despite the name serverless, physical servers are still used but developers do not need to be aware of them.
In the early days of the web, anyone who wanted to build a web application had to own the physical hardware required to run a server, which is a cumbersome and expensive undertaking.
Then came cloud computing, where fixed numbers of servers or amounts of server space could be rented remotely. Developers and companies who rent these fixed units of server space generally over-purchase to ensure that a spike in traffic or activity will not exceed their monthly limits and break their applications. This means that much of the server space that gets paid for can go to waste. Cloud vendors have introduced auto-scaling models to address the issue, but even with auto-scaling an unwanted spike in activity, such as a DDoS Attack, could end up being very expensive.
Serverless computing allows developers to purchase backend services on a flexible ‘pay-as-you-go’ basis, meaning that developers only have to pay for the services they use. This is like switching from a cell phone data plan with a monthly fixed limit, to one that only charges for each byte of data that actually gets used.
The term ‘serverless’ is somewhat misleading, as there are still servers providing these backend services, but all of the server space and infrastructure concerns are handled by the vendor. Serverless means that the developers can do their work without having to worry about servers at all.
Application development is generally split into two realms: the frontend and the backend. The frontend is the part of the application that users see and interact with, such as the visual layout. The backend is the part that the user doesn’t see; this includes the server where the application's files live and the database where user data and business logic is persisted.
For example, let’s imagine a website that sells concert tickets. When a user types a website address into the browser window, the browser sends a request to the backend server, which responds with the website data. The user will then see the frontend of the website, which can include content such as text, images, and form fields for the user to fill out. The user can then interact with one of the form fields on the frontend to search for their favorite musical act. When the user clicks on ‘submit’, this will trigger another request to the backend. The backend code checks its database to see if a performer with this name exists, and if so, when they will be playing next, and how many tickets are available. The backend will then pass that data back to the frontend, and the frontend will display the results in a way that makes sense to the user. Similarly, when the user creates an account and enters financial information to buy the tickets, another back-and-forth communication between the frontend and backend will occur.
Most serverless providers offer database and storage services to their customers, and many also have Function-as-a-Service (FaaS) platforms, like Cloudflare Workers. FaaS allows developers to execute small pieces of code on the network edge. With FaaS, developers can build a modular architecture, making a codebase that is more scalable without having to spend resources on maintaining the underlying backend. Learn more about FaaS >>
Learn more about the benefits of serverless computing.
A couple of technologies that are often conflated with serverless computing are Backend-as-a-Service and Platform-as-a-Service. Although they share similarities, these models do not necessarily meet the requirements of serverless.
Backend-as-a-service (BaaS) is a service model where a cloud provider offers backend services such as data storage, so that developers can focus on writing front-end code. But while serverless applications are event-driven and run on the edge, BaaS applications may not meet either of these requirements. Learn more about BaaS >>
Platform-as-a-service (PaaS) is a model where developers essentially rent all the necessary tools to develop and deploy applications from a cloud provider, including things like operating systems and middleware. However PaaS applications are not as easily scalable as serverless applications. PaaS also don’t necessarily run on the edge and often have a noticeable startup delay that isn’t present in serverless applications. Learn more about PaaS >>
Infrastructure-as-a-service (IaaS) is a catchall term for cloud vendors hosting infrastructure on behalf of their customers. IaaS providers may offer serverless functionality, but the terms are not synonymous. Learn more about IaaS >>
Serverless computing continues to evolve as serverless providers come up with solutions to overcome some of its drawbacks. One of these drawbacks is cold starts.
Typically when a particular serverless function has not been called in a while, the provider shuts down the function to save energy and avoid over-provisioning. The next time a user runs an application that calls that function, the serverless provider will have to spin it up fresh and start hosting that function again. This startup time adds significant latency, which is known as a ‘cold start’.
Once the function is up and running it will be served much more rapidly on subsequent requests (warm starts), but if the function is not requested again for a while, the function will once again go dormant. This means the next user to request that function will experience a cold start. Up until fairly recently, cold starts were considered a necessary trade-off of using serverless functions.
Cloudflare Workers has addressed this problem by spinning up serverless functions in advance, during the TLS handshake. Since Workers functions spin up at the edge in a very short amount of time, even shorter than the time required to complete the handshake, the result is an FaaS platform with zero cold starts. To get started with Cloudflare Workers, see our Developer documentation.
As more and more of the drawbacks of using serverless get addressed and the popularity of edge computing grows, we can expect to see serverless architecture becoming more widespread.
Serverless computing uses a pay-as-you-go model, where developers only pay for the backend computational resources they actually use, instead of paying for reserved server space or bandwidth.
Function-as-a-Service (FaaS) is a type of serverless platform that lets developers run small, modular pieces of code in response to events, without managing any underlying infrastructure.
In serverless computing, auto-scaling means the provider automatically allocates or reduces computational resources as needed, so developers do not have to manage scaling policies themselves.
Serverless computing specifically addresses backend services, handling server-side logic, data processing, and infrastructure management that users do not directly see.
Serverless computing reduces costs by eliminating the need to pay for idle server space or unused CPU time, since charges are based only on actual usage.
Edge computing in serverless means that functions can be deployed closer to end users, reducing latency and improving application performance.
Cold start mitigation refers to techniques that reduce the delay when starting dormant serverless functions. Serverless providers with cold start mitigation features in place spin up functions at the edge in advance, helping to eliminate delays in execution.
乳核是什么 | 喆读什么 | 佛跳墙是什么菜 | 移动增值业务费是什么 | 自字五行属什么 |
备孕需要补充什么 | 79年属什么生肖 | 赭石色是什么颜色 | 迪丽热巴颜值什么水平 | 生姜和红枣煮水喝有什么作用 |
oh什么意思 | 侵犯是什么意思 | 生肖龙和什么生肖相冲 | 碳酸钙俗称什么 | 反式脂肪酸是什么 |
翎字五行属什么 | 肺寒咳嗽吃什么药 | 什么人不能吃苦瓜 | 什么是包皮过长 | 弱冠是什么意思 |
谷维素是什么hcv9jop8ns3r.cn | 玩微博的都是什么人hcv9jop6ns4r.cn | 11月24日是什么星座hcv8jop1ns2r.cn | 筋道是什么意思hcv8jop7ns8r.cn | 究竟涅盘是什么意思hcv9jop6ns4r.cn |
牙龈肿痛吃什么药好得快hcv8jop7ns9r.cn | 来苏水又叫什么名字hcv9jop5ns2r.cn | 疾控中心属于什么单位hcv8jop6ns2r.cn | 四个木是什么字hcv9jop2ns4r.cn | 突然头晕恶心是什么原因hcv9jop6ns8r.cn |
痱子是什么样的图片hcv9jop0ns8r.cn | 衣服38码相当于什么码creativexi.com | 称中药的小秤叫什么hcv7jop5ns2r.cn | 乐果农药适合杀什么虫hcv8jop9ns9r.cn | 荆州有什么大学hcv9jop3ns6r.cn |
医学检验技术是干什么的hcv8jop3ns1r.cn | 鸡蛋为什么不能放冰箱hcv8jop5ns8r.cn | warning是什么意思mmeoe.com | 多囊卵巢综合症有什么症状hcv8jop3ns2r.cn | 割韭菜什么意思hcv8jop9ns5r.cn |