In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Author | Xu Jinmao (Luo Li) JAVA Development engineer
Introduction: in recent years, the word Serverless is getting hotter and hotter, and it has gradually become a new type of software design architecture. Unlike DevOps, which advocates a series of tools and automated technologies to reduce the difficulty of operation and maintenance and promote the integration of R & D, operation and maintenance, Serverless is more like a NoOps, that is, to solve the problem of "how to do it more efficiently" through "don't do it".
Overview of DevOps
DevOps is a general term for a set of processes, methods, and systems used to facilitate collaboration between developers and operators.
DevOps advocates reducing the gap between developers and operation and maintenance personnel through a series of technologies and tools, and automating the whole process from development to final deployment, so as to achieve the integration of development, operation and maintenance. By introducing the concept of DevOps into the development process of the whole system, it can significantly improve the efficiency of software development, shorten the cycle of software delivery, and better adapt to the rapid development of the Internet era.
When it comes to DevOps, continuous integration is bound to be mentioned. Continuous integration means that in the process of software development, software developers constantly merge the developed code with the code of other developers, compile and build automatically after each merge, and run automated tests to verify it, rather than wait until the final completion of their respective development.
Continuous integration can fundamentally improve the software development efficiency of a team. The introduction of continuous integration in the software development process can help the team to find the problems in the system in time and fix them quickly, which can not only shorten the time of software development, but also deliver a more quality system.
Implementation of a DevOps Development Environment based on Docker
A DevOps development environment needs to meet the following eight requirements.
Environmental consistency: features developed locally should achieve consistent results regardless of the environment in which they are deployed
Automatic code checking: in order to find problems as soon as possible, every time the code is submitted, the system should automatically check the code, identify potential problems early, and run automated tests
Continuous integration: the system can compile and package the code automatically after each code submission, without the need for operation and maintenance personnel to do it manually.
Continuous deployment: after the code is integrated, the system can automatically update the old version of the application in the running environment to the new version of the application and will not make the system unavailable during the whole process.
Continuous feedback: in the process of automatic code review, continuous integration, and continuous deployment, once a problem occurs, it should be able to feedback the problem to the developer and operation and maintenance personnel in a timely manner. Developers and operators will fix the problem in time after receiving feedback.
Quick rollback: when a problem is found in the version of this deployment, the system should be able to quickly roll back to the last available version
Auto scaling: when the number of visits to a service increases, the system should be able to quickly expand the capacity of the service to ensure user access. When the visit volume returns to normal, the system can release the expanded resources and realize the elastic scaling of the system according to the access situation.
Visual operation and maintenance: provides a visual page that can monitor the status of applications, clusters and hardware in real time.
In order to meet the above eight requirements, the DevOps development environment is designed as shown in the following figure.
The whole environment is mainly composed of six parts:
Code Warehouse Gitlab Container Technology Docker continuous Integration tool Jenkins Code quality Inspection platform SonarQube Image Warehouse Harbor container cluster management system Kubernetes
The running process of the whole environment is mainly divided into the following 6 steps:
After the developer has developed and verified the functionality locally, submit the code to the code repository
Through the pre-configured Webhook notification, when the developer has submitted the code, the continuous integration tool Jenkins deployed in the cloud will perceive it in real time and obtain the latest code from the code repository.
After obtaining the latest code, Jenkins will start the test platform SonarQube to check the latest code and execute the unit test, and generate the test report on the SonarQube platform after execution. If the test fails, notify the R & D staff by email to make changes and terminate the whole process. If the test passes, feedback the results to Jenkins and proceed to the next step
After the code review and the unit test pass, Jenkins sends the code to the continuous integration server, where it is compiled, built, and packaged into an image file that can run on the container environment. If there is a problem in the middle, notify the developer and operation staff by email to deal with it and terminate the entire process.
Upload the image file to the private image repository Harbor and save it
After the image is uploaded, Jenkins will start the continuous delivery server to update the version of the application running in the cloud environment, and the whole update process will ensure uninterrupted access to the service. The continuous delivery server will pull the latest image files into the Kubernetes cluster, and update the application by gradually replacing the container, and complete the update without interruption of service.
Through the above steps, we can simply implement a DevOps development environment to automate the whole process of code submission to final deployment.
But since AWS released ASW Lambda in 2014, the concept of Serverless has become more and more popular. Major cloud manufacturers have begun to launch their own Serverless products, such as Google's Cloud Functions, Ali Cloud's functional computing, Serverless application engine (SAE) and so on. What on earth is Serverless no-service computing?
What is Serverless?
According to the definition in the Serverless white paper released by CNCF (Cloud Native Computing Foundation):
Serverless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained deployment model where applications, bundled as one or more functions, are uploaded to a platform and then executed, scaled, and billed in response to the exact demand needed at the moment.
First of all, it needs to be emphasized that serverless computing does not mean that we no longer need to use the server to run the code, the code still needs to run on the server to provide services.
In the era of no-service computing, R & D personnel do not need to monitor, configure, update, expand and other operation and maintenance operations on the server. You only need to upload the code to the serverless computing platform provided by the cloud manufacturer. The cloud manufacturer will ensure that the code can run normally. When the traffic suddenly increases, the server will be automatically expanded, and when the traffic decreases, the server will be reduced.
Cdn.com/348b57cb1560dbb47e617afe1f0dd55e592a0e80.png ">
These operation and maintenance operations are black-box for R & D personnel, which will liberate developers from the tedious operation and maintenance work, and only need to pay for resources according to the running time.
Unlike DevOps, which advocates a series of tools and automated technologies to reduce the difficulty of operation and maintenance and promote the integration of R & D, operation and maintenance, Serverless is more like a NoOps, that is, to solve the problem of "how to do it more efficiently" through "don't do it".
Aliyun's practice on Serverless currently the products that implement Serverless technology on Aliyun include Serverless application engine and functional computing FaaS. Serverless application engine
Serverless application engine is an application-oriented Serverless PaaS platform, which abstracts the concept of application upward, supports popular development frameworks such as Spring Cloud, Apache Dubbo, HSF, and deploys applications through WAR packages, JAR packages, mirrors and other ways. Its use can be seen in the following picture.
Function computing FaaS is another form of services provided by Serverless. Take Ali cloud function calculation as an example, the flow of Ali cloud function calculation is roughly shown in the following figure.
Developers write code locally
After the code is developed, it is uploaded to the Ali Cloud function Computing platform through the command line tools fcli, fun or the visual interface console.
After the developer uploads the code, the platform automatically starts the Docker-based DevOps process, compiles the code and packages it into an image file. And upload it to the image warehouse
Developers configure event triggers on the platform. At present, Aliyun already supports OSS, HTTP, CDN, SLS, scheduled tasks and other forms of triggers.
When the trigger is triggered, it reaches the event scheduler. The platform will quickly launch the image into a container and execute the code, automatically scaling the service according to the traffic. Ensure that the code is normal and executed.
Berkeley's prediction of the future of Serverless
Although there are still many challenges in Serverless, we believe that with the continuous expansion of the market size, these challenges will be gradually resolved. UC Berkeley made the following forecasts for the development trend of Serverless in the next decade.
New BaSS storage services will be created so that more types of applications can be migrated to the Serverless platform. The performance of this storage service is comparable to that of local storage and provides both long-term and short-term storage. More hardware suitable for Serverless platform will be used.
Due to higher levels of programming abstraction and finer-grained resource isolation, code running on serverless computing platforms will be more secure and reliable than traditional methods.
With the continuous development of serverless computing charging model, the cost of almost any application migrating to serverless computing platform will be lower than the original serverless computing method.
Server computing will promote the development of BaaS in the future.
Although the existing server computing will not disappear, with the continuous development of Serverless r technology, the proportion of server computing in the cloud will decrease year by year.
Serverless computing will become the default programming method in the cloud era, which will replace the traditional server-based programming method on a large scale and end the traditional Cmax S architecture. Summary
At present, the resource utilization of the data center is still at a low level, especially for online business, the average daily resource utilization rate is only about 10%, mainly because today's resources are exclusive, regardless of whether you use them or not. These resources need to be retained.
Once Serverless is used on a large scale, the use of resources will be uniformly dispatched by the platform and used on demand, the overall resource utilization will be greatly improved, and the cost of using cloud computing resources will undoubtedly be greatly reduced.
With the continuous development of Serverless, the future programming methods will be very different. No matter from the perspective of cost or use, we have reason to believe that the next era is the era of Serverless, and we should continue to explore in this direction.
Brief introduction of the author: Xu Jinmao (Luo Li) Java development engineer. Now works in Aliyun Intelligent Infrastructure Division, mainly responsible for the research and development of Alibaba data center operation platform.
"Alibaba Yun × × icloudnative × × erverless, containers, Service Mesh and other technical fields, focusing on cloud native popular technology trends, cloud native large-scale landing practice, to do the best understanding of cloud native development × ×
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.