Serverless -> Current and future trends

gossip

Some time ago, I read some Serverless articles, and recently I listened to a Serverless application practice course, so I took out my notes and shared them with you. If there is any mistake in the expression, please correct me

Questions of concern

  1. What is Serverless
  2. Why is Serverless so popular
  3. Relationship with the front end
  4. What problems does it help the front end solve
  5. Should you use Serverless to host the business
  6. What is the scaling strategy

Due to the limited ability of the author, can not all answer ๐Ÿ˜„, the other to the comments section of the big bull

What is Serverless

Serverless is literally “Serverless”, but in reality it still requires a server, but the management and resource allocation parts of the server are not visible to users

Serverless architecture is the “Serverless” architecture, which is a brand new architecture mode and a revolutionary architecture mode in the era of cloud computing

Relevant concepts

English Chinese explain Contact the Serverless
FaaS

—-

Function as a Service
Function as a service A type of service-less computingIn the form of

Is an event-driven computational execution model that runs in a stateless container
In the form of
Function Compute Function to calculate Event-driven full hostingComputing services In the form of
Cloud Function โ˜ ๏ธ cloud function A function managed at โ˜๏ธ named

Traditional development

The development process

Problems outside of development

The demands on development teams are getting higher and higher

After the launch

  • Complex operations
  • Testing complex
  • Extended complex
  • Stable and safe operation

Solution to the above dilemma: Abstract + go to the cloud

Technological change, thought first ๐Ÿ‘

Definitions of terms (some concepts in cloud computing) :

  • On-premise: Local deployment
  • IaaS: Infrastructure as a service
  • CaaS: Communication as a service
  • PaaS: Platform as a service
  • SaaS: Software as a service

Cloud native features:

  • Business development gets lighter, thinner, and focused on business logic
  • Infrastructure gets heavier, thicker and more standardized

Some features of cloud computing:

  • Cost savings
  • Shorten application deployment time
  • Automatic System Capacity Expansion
  • Service upgrade is not interrupted
  • Automatic fault detection and location
  • . ๐Ÿ’ก

“Cloud” has become the only way of technological change in various industries

The future of the cloud – Serverless

The pursuit of lower psychological cost is ability closed loop

Serverless is probably the highest level of resource abstraction available today, opening up the possibility of capability closed-loop

The value of

The real value of Serverless is not cost saving, but time saving. The real value lies in time efficiency, not cost efficiency

The main difference between traditional cloud computing and Serverless cloud computing is whether customers pay for unused or underutilized resources

Previously, whether in the internal data center or on the cloud, we needed to anticipate capacity and resource requirements in advance and be prepared in advance

In traditional development, we need to start the server ahead of time so that we can perform the image resizing service at any time

In a Serverless configuration, you only need to adjust the timing of the code execution, that is, only when the function is called

The Serverless computing service takes the function as input, executes the logic, returns the output, and then closes. That is, you only Pay for the resources consumed by the actual execution of the function, pay-as-you-play, only for the resources actually used.

conclusion

Serverless is an idea, not necessarily FaaS + BaaS (Back end as a Service)

1. Why is Serverless so popular

In China, companies that can pay their bills have beaten 99% of companies

The cost of modern software development is very high, mainly because of “cost consciousness”.

Function as a Service (FaaS), as an important development direction in the Serverless era, can bring great value to developers (enterprises) from engineering efficiency, reliability, performance, cost and other aspects, especially can greatly improve the efficiency of research and development.

As a result, embracing FaaS has become an important technology area of concern for developers

2. What problems can the front-end solve

Node.js has made the front end cost conscious

Whether to use Mental activity of Node in the project:

  • Use: Have a full stack perspective, participate in more architecture decisions, have more means of optimization
  • Don’t: Worry about problems and high maintenance costs

Essential issues:

Relations of production and productivity

Node.js can solve simple capability autonomy, independent of back-end personnel (early in the business, when back-end personnel are small)

As services develop, mature services seek higher stability and gradually abandon Node.js

Node.js brings the problem of high operation and maintenance cost, which is an obstacle to the implementation of Node.js in enterprises

Ideally, developers only care about business logic:

  • Conventional application
    • Business logic (developer responsibility)
    • External service integration (developer responsibility)
    • Infrastructure management (developer responsibility)
  • Serverless application
    • Business logic (developer responsibility)
    • External service integration (cloud vendor)
    • Infrastructure Management (cloud vendor)

It is not necessary for front-end developers to know the Node Web framework just to want an interface, or to wrap an interface around it

Node.js becomes Eventloop and fails Eventloop. Eventloop itself is a black box. What kind of code is added to the development and it is difficult for you to cover all of it

With Serverless, you can effectively prevent Eventloop from blocking. For example, encryption is a common scenario, but the execution efficiency itself is very slow. If encryption and decryption are combined with your other tasks, it’s easy to cause the Eventloop to block

Serverless can greatly reduce the cost of front-end services that rely on Node services. Developers only need to focus on business logic, and do not need to worry about o&M, expansion, and Web framework

It is certainly a trend to develop a function locally and then publish it to the Serverless cloud via the CLI

reference

  • What is Serverless in nature
  • Jane ยท Cloud native
  • Introduction to Zhihu ยท Serverless function calculation and typical scenario practice
  • What is the Serverless architecture
  • The Practice and Thinking of Big Front-end Engineering

๐Ÿ† issue 7 | all things can be Serverless technology projects