编程知识 cdmana.com

Evolution of serverless architecture

The Serverless Framework ( No server architecture ) Allows you to expand automatically 、 Pay as you go 、 Deploy event driven functionality to any cloud . At present, we support AWS Lambda、Apache OpenWhisk、Microsoft Azure, And it's expanding to support other cloud providers .

Serverless Reduces the total cost of maintaining the application , Be able to build more logic faster . It's a command Row tool , Provide scaffolding 、 No architecture and no best practices for workflow server development . It can also be fully extended through plug-ins .

Traditional single application architecture

More than a decade ago, the mainstream application architecture was single application , The deployment form is a server plus a database , In this framework , The operation and maintenance personnel will carefully maintain the server , To ensure the availability of services .

Serverless  Evolution of Architecture Serverless  Evolution of Architecture

▲ Monomer architecture

Problems faced by single application architecture

As the business grows , This simplest single application architecture soon faces two problems . First , There's only one server here , If this server fails , For example, hardware damage , Then the whole service will be unavailable ; secondly , After the business volume has increased , A server's resources will soon be unable to carry all the traffic .

The most direct way to solve these two problems is to add a load equalizer at the traffic entrance , Single application can be deployed to multiple servers at the same time , In this way, the server's single point problem is solved , meanwhile , This single application also has the ability to scale horizontally .

Serverless  Evolution of Architecture Serverless  Evolution of Architecture

▲ Monomer architecture ( Horizontal expansion )

Microservice architecture

1. Microservice architecture is playing in and out of common services

As the business grows further , More R & D people join the team , Jointly develop features on monomer applications . Because the code in a single application has no clear physical boundary , You're going to have all kinds of conflicts soon , Manual coordination is required , And a lot of conflict merge operation , R & D efficiency has plummeted .

Therefore, we began to separate the single application into one, which can be developed independently 、 Independent testing 、 Independently deployed microservice applications , Services and services go through API Communications , Such as HTTP、GRPC perhaps DUBBO. Domain Driven Design Bounded Context The split microservice architecture can greatly improve the R & D efficiency of medium and large teams .

2. Microservice architecture brings challenges to operation and maintenance

Application evolves from monomer architecture to microservice architecture , From a physical point of view , Distributed is the default option , At this time, the application architect has to face the new challenges brought by the distribution . In the process , People will start using distributed services and frameworks , For example, caching services Redis, Configure the service ACM, State coordination service ZooKeeper, Message service Kafka, And communication frameworks like GRPC perhaps DUBBO, And distributed tracking systems .

In addition to the challenges of distributed environments , Microservice architecture also brings new challenges to operation and maintenance . R & D personnel only need to operate and maintain one application , Now it may be necessary to operate and maintain ten or more applications , It means security patch upgrade 、 Capacity assessment 、 The workload of fault diagnosis and other transactions has increased exponentially , At this time , Apply distribution standards 、 Life cycle criteria 、 Observation standard 、 The importance of capabilities such as automation flexibility is also more prominent .

Serverless  Evolution of Architecture Serverless  Evolution of Architecture

▲ Microservice architecture

Cloud native

1. Based on cloud product architecture

Whether an architecture is cloud native , It depends on whether the architecture grows on the cloud , That's right “ Cloud native ” A simple understanding of . This “ Grow on the cloud ” Not simply cloud IaaS Layer services , For example, simple ECS、OSS These basic computational storage ; It should be understood as whether there are distributed services on the cloud , such as Redis、Kafka etc. , These are the services that directly affect the business architecture . Microservices architecture , Distributed services are necessary , It turns out that we all develop such services by ourselves , Or based on the open source version of their own operation and maintenance of such services . And in the cloud age , Businesses can use cloud services directly .

The other two technologies that have to be mentioned are Docker and Kubenetes, among , The former standardizes the standards for application distribution , Whether it's Spring Boot The application of writing , still NodeJS The application of writing , It's all distributed in a mirror image ; The latter defines the standards of application life cycle in the former technology , An app goes from launch to launch , To the health check , And then go offline , There are unified standards .

2. Application lifecycle hosting

With standards for application distribution and lifecycle , The cloud can provide standardized application hosting services . Including version management of applications 、 Release 、 Observation after online 、 Self healing, etc . For example, for stateless applications , The failure of an underlying physical node will not affect R & D at all , Because the application hosting service based on the standardized application life cycle can automatically complete the move work , Offline the application container on the failed physical node , Start the same number of application containers on the new physical node . It can be seen that , Further unleashing the value of native cloud dividends .

On this basis , Because the application hosting service can perceive the data of the application runtime , For example, the concurrency of business traffic 、cpu load、 Memory usage, etc , Business can configure scaling rules based on these metrics , Then the platform implements these rules , Increase or decrease the number of containers according to the actual situation of business flow , This is the most basic auto scaling—— Automatic telescopic . This can help users avoid limiting resources in the low peak period of business , Cost savings , Improve operation and maintenance efficiency .

This paper summarizes

In the evolution of Architecture , R & D operation and maintenance personnel gradually shift their focus from the machine , It is hoped that more machines will be managed by the platform system , Instead of being run by people , This is a right Serverless A simple understanding of .

This paper addresses :https://www.linuxprobe.com/serverless.html

版权声明
本文为[That's how Linux should learn]所创,转载请带上原文链接,感谢
https://cdmana.com/2020/12/20201224172417466l.html

Scroll to Top