Files
nexus/wiki/concepts/Serverless-Computing.md

3.1 KiB
Raw Blame History

title, type, tags, sources, last_updated
title type tags sources last_updated
Serverless Computing concept
Cloud
Serverless
AWS
DevOps
public-cloud-learning-sessions-opentext-serverless-computing-20240903-160139-mee
2026-04-14

Definition

Serverless Computing无服务器计算是一种云原生执行模型在该模式下云厂商承担底层基础设施的全部运维责任负载均衡、自动扩展、安全补丁、容量管理开发者只需专注编写业务逻辑代码。Serverless 并非"无服务器",而是将服务器管理抽象给云厂商。

Core Characteristics

特性 描述
无运维 云厂商管理服务器操作系统、运行时和安全补丁
事件驱动 函数由事件触发,事件即资源状态的任何变化
按需付费 仅在函数执行时计费(按调用次数和执行时长)
自动扩展 云厂商根据请求量自动水平扩展,无需人工干预
内置安全 云厂商提供基础安全能力网络隔离、IAM 权限控制)

Business Value

企业采用 Serverless 的核心驱动因素:

  • 更快上市时间Faster Time to Market开发团队专注业务逻辑无需管理基础设施
  • 业务聚焦Business Focus将非核心运维任务外包给云厂商
  • 更低 TCOTotal Cost of Ownership按需付费空闲时零成本
  • 弹性扩展Elastic Scalability从零到百万并发自动应对
  • 内置安全Built-in Security云厂商持续更新安全补丁

AWS Serverless Ecosystem

AWS 提供完整的 Serverless 服务矩阵:

服务 作用 关系
AWS-Lambda 无服务器计算核心 函数执行层
Amazon-API-Gateway API 创建、发布、安全 API 暴露层
AWS-Step-Functions 工作流编排 流程编排层
Amazon-EventBridge 事件总线 事件路由层
AWS-Fargate 无服务器容器 容器层的 Serverless
Amazon-DynamoDB 无服务器数据库 数据持久层
SAM-Serverless-Application-Model 本地开发和部署工具 开发工具层

Shared Responsibility Model

在 Serverless 环境中AWS 与客户共担运维责任:

  • AWS 负责:基础设施、服务器硬件、网络、运行时环境、安全补丁、负载均衡、自动扩展
  • 客户负责业务代码、依赖管理、权限配置IAM、应用程序级别的安全

Event-Driven Architecture Connection

Serverless 天然契合 Event-Driven-Architecture 模式:

  1. 事件源Event SourceS3、API Gateway、EventBridge、DynamoDB Stream 等
  2. 事件路由器Event RouterEventBridge、SNS 等筛选和路由事件
  3. Lambda 函数Function消费事件执行业务逻辑
  4. 下游服务DownstreamDynamoDB、SQS、SNS 等处理结果