What is Serverless?

What is Serverless?

Serverless is called serverless in Chinese.

Serverless is a Cloud Native development model that allows developers to focus on building and running applications without managing servers.

The difference between serverless and other Cloud Service models is that it is the responsibility of the cloud provider to manage the cloud infrastructure and application expansion. Serverless applications are deployed in containers that are automatically launched on demand when called.

(X)aas

IaaS, PaaS, SaaS, BaaS, FaaS, these nouns are followed by the three letters aas, aas is As-a-Service, which means service. Let’s take a look at the following architecture diagram:

IaaS、PaaS、SaaS

Cloud Computing Platform generally provides the three types of Cloud as a Service in the above architecture diagram

** IaaS **: Infrastructure as a Service

As can be seen from the architecture diagram above, IaaS is at the bottom, with service providers providing underlying/physical layer infrastructure resources (servers, data centers, environmental control, power supplies, server rooms), and customers deploying and executing various software such as operating systems or applications themselves.

In the standard Infrastructure as a Service (IaaS) Cloud Service model, users need to pre-purchase capacity units; that is, you pay the public cloud provider for always-available server components in order to run your application. Users are responsible for expanding server capacity when demand is high, and reducing capacity when it is no longer needed. The cloud infrastructure required to run an application remains in place even when it is idle.

** PaaS **: Platform as a Service

PaaS is in the middle layer. Service providers provide infrastructure underlying services, providing operating systems (Windows, Linux), database servers, web servers, domain controllers and other Middleware, as well as middleware layer services such as backup services in the service model. For example, IIS, .NET, Apache, MySQL…, the customer controls the upper-level application deployment and application hosting environment.

** SaaS **: Software as a Service

SaaS is at the top, and service providers provide software-based solutions to meet customer end needs; such as OA, CRM, MIS, ERP, HRM, CM, Office 365, iCloud, G Suite and other applications, customers do not need to consider any form of professional technical knowledge, get a complete software package to make their daily work and life easier.

img

Baas,Faas

The serverless architecture allocates resources for application code only when an event triggers it to run. After the code is executed, users no longer pay. In addition to the cost and efficiency advantages, serverless also frees developers from trivial daily tasks related to application scaling and server provisioning.

With Serverless, routine tasks such as managing operating systems and file systems, security patches, load balancing, capacity management, scaling, logging, and monitoring are shared by Cloud as a Service Provider.

In the serverless model, cloud providers are responsible for running physical servers and dynamically allocating resources on behalf of users, who can directly deploy code into production environments.

Serverless computing products are usually divided into two categories, namely backend as a service (BaaS) and function as a service (FaaS).

BaaS allows developers to access a variety of third-party services and applications. For example, cloud providers can provide authentication services, additional encryption, cloud access to databases, and high Confidence Level usage data. In BaaS, serverless functions are usually invoked through application programming interfaces (APIs). It can also be understood as BaaS = IaaS + PaaS + APIs + SDKs, that is, service providers provide a large number of functions. Users only need to access the sdk and then use its api.

In most cases, when developers refer to serverless, they are basically referring to the FaaS model. Under FaaS, developers still have to write custom server-side logic, but it can run in containers managed entirely by Cloud as a Service provider.

In general, the computing cost of Cloud Computing Platform depends on the number of calls, execution time, and memory consumption. So if the function code of this function is not well written, the number of calls is very large, the execution time is particularly long, or it consumes a lot of memory, then the price will be very expensive.

Generally combined with BaaS to develop special calculations required for some projects, only paying for the actual amount of computing.

Then this kind of service is suitable for services with occasionally high computation, but generally no computation, or low computation

Baas and Faas seem to be between Paas and Saas, allowing developers to focus only on how to apply logic, while the difference between Baas and Faas is that Baas provides interfaces for various background services, such as authentication services, etc., like a configurable plugin, while Faas is simple logic. Your code may be just a simple line of code for the crud of the database, whether the background is mysql or sqlserver.