Automated operation of Function Compute
摘要： Alibaba Cloud Function Compute is an event-driven and fully-managed compute service. With Function Compute, you can quickly build any type of application.
A decade ago, cloud servers abstracted away physical servers paving the way for more technological advancements. Serverless computing is a cloud-computing execution model in which the cloud provider acts as the server, dynamically managing the allocation of machine resources. Serverless Computing abstracts the underlying servers and is considered as a form of utility computing.
The name "serverless computing" is used because the server management and capacity planning decisions are completely hidden from the developer or operator. A serverless code can be used in conjunction with code deployed in traditional styles, such as microservices.
In general, there are two types of automated operations:
Traditionally, the processing of the Scheduled tasks are usually implemented using a crontab script, but as the number of managed servers increase, the scripts will have to be centrally managed. At this point, the availability of the scattered machines that centrally manage the script, relevant information such as plaintext password and records of scheduled task execution are a big challenge. As for event-driven alarm processing, either a standard message notification service like SMS or a custom-built service is required to process the alarm information.
Either way, both the financial cost and operation cost are substantial. This article explores a new method of operation by using function compute to perform an automated process, providing an highly reliable and high-quality operation and service at an extremely low cost.
Alibaba Cloud Function Compute is an event-driven and fully-managed compute service that allows developers to run code without provisioning servers and could form a crucial missing piece of the DevOps equation. With Function Compute, you can quickly build any type of applications or services without considering management or O&M. You can complete a set of backend services for processing multimedia data in a few minutes without having to manage the underlying infrastructure thereby concentrating on the business logic. It's as simple as writing code to respond to an event and upload it to Function Compute. The function Compute will prepare the computing resources for you to run your code elastically and reliably, as follows:
Function Compute gives the users great freedom through implementing the custom function. Once it meets the custom automation operation, it will knock spark. The following article makes a comparison between the traditional automated operation and Function Compute for automated operation in two different types of dimensions:
Some cloud service accounts access key secrets need to be replaced periodically to ensure access key security
Regularly check your ECS for the exposed ports to ensure safety. For example, if your ECS is a web server, you may only need expose port 80 externally. If there is a vulnerability of 0.0.0.0./0 that allows everyone to access, an alarm or automated repair is required.
Assume that there are two ECS machines A and B, and machine A goes down. At this time, the EIP on machine A needs to be migrated to the standby machine B. The cloud monitoring alarm, and Function Compute can be used to realize the automatic migration of epi by cloud monitoring. The event of A downtime is detected, and then the function execution is triggered and implements automatic migration of EIP.
Assuming that an ECS had a system error and restarts, the users may urgently need to do some verification or create a snapshot. In the following actual sample, A machine that restarts due to a system error instance or restarts due to an instance error, we are going to automatically respond by creating a snapshot process after a successful restart.
By Using a Function Compute for automated operations, you have acccess to a computing environment which is flexible, highly available, highly secure that is visually monitored and managed. At the same time, Cloud monitoring provides rich events, and events are getting richer(Cloud product system event monitoring). Rich events that can trigger custom functions and high-availability timers can make automated operations much more perfect.
If you are interested in the topic of
Automated operation of Function Compute, please click to bookmark this page, we will continue to update the relevant content and actual cases on the topic of automated operation.