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.

Prefaces

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:

  • Scheduled script tasks, which executes based on a particular schedule such as regularly changing access key secret for cloud services, periodically checking the ports exposed by ECS etc.
  • Event Driven Scripts which does the emergency handling of alarm events, such as an abnormal restart of an ECS instance.

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.

Function Compute

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:

  • No infrastructure - No need to purchase and manage servers
  • Flexible Pricing - Pay-as-you-go, for example, for low-frequency operation calls there can be financial costs savings of more than 90%.
  • Focus on Business - Focusing on the development of business logic can greatly improve development efficiency, such as Deploy a flexible and highly available image processing service within 10 minutes.
  • Stable and Reliable - Stable , Highly availability, millisecond-level elastic scaling to cope up with peak demand pressure.
  • Traceable - Provide log query, performance monitoring, alarm and other functions to quickly troubleshoot.

Function Compute meets automated operation

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:

image

Scheduled Task Example

Scheduled Task Example 1

Some cloud service accounts access key secrets need to be replaced periodically to ensure access key security

Scheduled Task Example 2

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.

Function Compute for automated operation sample 1 - timed task

Event-riven example

Event-driven example 1

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.

Function Compute for automated operation sample 2 - event triggered epic automatic transfer

Event-driven example 2

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.

Function Compute for automated operation sample 3 - event triggered automatically create snapshot of ECS

Summary

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.

相关实践学习
基于函数计算一键部署掌上游戏机
本场景介绍如何使用阿里云计算服务命令快速搭建一个掌上游戏机。
建立 Serverless 思维
本课程包括: Serverless 应用引擎的概念, 为开发者带来的实际价值, 以及让您了解常见的 Serverless 架构模式
目录
相关文章
|
4月前
|
数据采集 Serverless API
在函数计算(Function Compute,FC)中部署Stable Diffusion(SD)
在函数计算(Function Compute,FC)中部署Stable Diffusion(SD)
283 2
|
3月前
|
运维 监控 Dubbo
SAE(Serverless App Engine)和FC(Function Compute)
【1月更文挑战第18天】【1月更文挑战第89篇】SAE(Serverless App Engine)和FC(Function Compute)
86 1
|
4月前
|
存储 Serverless
在阿里云函数计算(Function Compute)中,上传模型的步骤如下
在阿里云函数计算(Function Compute)中,上传模型的步骤如下
232 2
|
5月前
|
监控 前端开发 Serverless
阿里云函数计算(Function Compute,FC)是一种事件驱动的计算服务
阿里云函数计算(Function Compute,FC)是一种事件驱动的计算服务
320 1
|
8月前
|
运维 JavaScript Serverless
Function Compute
函数计算(Function Compute)是云计算领域的一种服务模型,由云服务提供商(例如阿里云、AWS、Google Cloud 等)提供。它是一种无服务器计算服务,允许开发者编写和部署函数,以响应事件触发,而无需管理底层的服务器和基础设施。函数计算提供了弹性的计算资源分配、按需计费、自动扩缩容等特性,使开发者能够聚焦于编写函数逻辑而不必担心底层的运维工作。
190 2
|
9月前
|
Serverless
函数计算(Function Compute)部署失败可能有多种原因
函数计算(Function Compute)部署失败可能有多种原因
114 2
|
10月前
|
弹性计算 监控 负载均衡
阿里云函数计算(Function Compute):快速高效的事件驱动计算
阿里云函数计算(Function Compute)是一种事件驱动计算服务,能够在阿里云上运行代码,且只按照实际使用时间付费。它无需管理服务器和基础架构,并可以与其他阿里云产品以及第三方服务集成,为用户提供了快速、高效、低成本、弹性的云计算能力。
|
数据采集 消息中间件 监控
Function Compute构建高弹性大数据采集系统
解决问题: 1.利用服务器自建数据采集系统成本高,弹性不足。 2.利用服务器自建数据采集系统运维复杂,成本高。
Function Compute构建高弹性大数据采集系统
|
对象存储
Guidelines for Function Compute Development -- OSS Trigger
Preface Terms and descriptions: Function Compute: Alibaba Cloud Function Compute is an event-driven computing service that dynamically allocates resources after you write and upload code.
1095 0
|
SQL 数据库 索引
Using Python to Connect Function Compute to SQL Server
Normally, a third-party module is required for establishing Python-based database connections. To connect to Microsoft SQL Server, pymssql is required.
12596 0