Cloud Service Model
Cloud Service Model
云服务模式
- Infrastructure as a service (laas): A form of cloud computing that delivers fundamental compute, network, and storage resources to consumers on-demand, over the internet, and on a pay-as-you-go basis.
- Platform as a service (paas): Provides customers a development and hosting platform for deploying customer-created applications.
- Software as a service (saas): A model of software deployment where an application is hosted (in a cloud center) as a service provided to customers across the internet.
- laas:亚马逊弹性计算云(ec2)、谷歌计算引擎(gce)、微软azure laas、阿里巴巴云弹性计算服务(ecs)、.NET、微软云计算服务(laas)。
- Caas(laas 的另一种形式):亚马逊弹性容器服务(ecs)、谷歌 kubernetes 引擎(gke)、docker 云、azure kubernetes 服务(aks)、腾讯 kubernetes 引擎
- Paas:谷歌应用程序引擎(gae),aws 弹性beanstalk,微软azure,..
- Faas(“轻量级 paas”):aws lambda、google 云函数、azure 函数、ibm 云函数。
IAAS
允许不同的虚拟机(VM)共享底层物理机资源,每个虚拟机运行自己的操作系统。
虚拟化资源:虚拟CPU(vCPU)、虚拟网络接口(vNIC)、虚拟磁盘等。
- Virtualized Network Interface (vNIC)
- 看起来很像任何物理以太网 NIC。
- "Virtualized" MAC = address MAC address "assigned"to vNIC (eth0)
- Use of software bridge or virtual switch to emulate a hardware bridge
提示
VIF 表示虚拟机上的虚拟网卡
IAAS-EC2
- An AWS EC2 Instance is nothing but a virtual machine in the AWS cloud「An AWS EC2 Instance is nothing but a virtual machine in the AWS cloud」
- Amazon Machine Image (AMI) = preconfigured server templates, which 提供启动 EC2 实例所需的信息
Choose an Amazon Machine Image (AMI):
- Instance type:small,medium,micro,large,.
- Operating system:Linux,Windows...
- Architecture 32-bit or 64-bit
- Region:Asia Pacific,US,EU,
- Launch permissions:public/explicit/implicit
- Storage for the Root Device
CAAS
Container Technologies
容器位于物理服务器及其主机操作系统(通常为 Linux 或 Windows)之上。前言:谷歌使用容器运行几乎所有谷歌应用程序(如 Gmail、YouTube)
A “container” = a virtualized server
CaaS typically refers to a complete container environment「完整的容器环境」,including orchestration tools「编排工具」 (e.g.,Kubernetes), an image catalog「镜像目录」 (Registry), cluster management software 「集群管理软件」,and a set of developer tools and APls.
Container Orchestration
容器协调器:实现容器生命周期管理自动化(创建/终止、资源分配、联网、自动扩展、故障恢复......)。
Tasks done by Container Orchestration
- Provisioning「调配」 and deployment「部署」 of s containers
- Redundancy「冗余」 and availability「可用性」 of containers
- 扩展或移除容器,以便在主机基础设施上均匀分布应用程序负载
- 在主机资源短缺或主机死亡的情况下,将容器从一台主机转移到另一台主机
- Allocation of resources between containers
- Load balancing between containers
- Health monitoring of containers and hosts
- Configuration of an application in relation to the containers running it
AWS EC2 vs. AWS Fargate
AWS EC2(laaS)
- Deploy and manage your own cluster of EC2 instances for running the containers.(more human cost)
- Billing is based on the cost of the underlying EC2 instances.
- Suitable for: Large workload optimized for running cost.
AWS Fargate (CaaS):
- "Serverless":No need for choosing EC2 instances and cluster capacity reduce human cost (auto-scaling,auto-failover).
- Billing is based on how many vCPU and size of memory_your task consumed.
- Suitable for
- Tiny workload (e.g.,FaaS)
- Small workload,with occasional bursts
- Periodic tasks (e.g.,cron job that runs once an hour)
PAAS
Cloud providers offer an Internet-based platform to developers who want to create services but don't want to build their own Cloud infrastructure.
- Target users = Cloud services/application developers
- Internet-based platform: a set of web-based development tools hosted on a cloud provider's infrastructure.
The custome interacts(e.g.,compile,debug,deploy) with the platform through the provided APl
- customer only needs to take care of data and application,the management of rest of the layers (e.g.,VMs/containers, software) lies in hands of the PaaS service provider.
PaaS Example: Amazon Elastic Beanstalk
You simply upload your application,and AEB automatically handles the deployment from capacity provisioning「容量配置」,load balancing 「负载均衡」,scaling「缩放」, and application health monitoring.
FAAS
- 应用程序被分成不同的功能,这些功能由事件触发。
- Event-driven ("If X happens then do Y"): functions are invoked on-demand.
- "Pay-per-execution'"pricing model:
- You pay for the resources your functions use,not VM instance type and used hours.
- "Serverless":Zero administration
- 开发人员无需关心服务器(虚拟机容器)的设置和管理,Faas 提供商会为您构建和管理它们!(与 Fargate 的概念相同)。
- Auto-scaling: instantly scaled depending on the load.
- Horizontal scaling: +- number of containers/Pods;
- Vertical Scaling +-CPU Memory ;
- Cluster scaling: +- number of servers.
- Short-lived, provisioning time (charged) in milliseconds
- 用于运行功能的容器会在收到请求时启动,并在执行结束后立即退出_(仅持续一次创新)。
Example: AWS Lambda
- An event-driven,serverless computing platform
- 使用 Node.js、Python、Java、Go、Ruby、C# 编写函数作为 zip 文件上传(代码、库和依赖项)
- 作为 zip 文件上传(代码、库和依赖项)
Using AWS Lambda with Amazon API Gateway
- Amazon API 网关用作 HTTP 服务器,用于将请求重定向到 Lambda 函数。
- 您可以创建 REST 和 WebSocket API,充当应用程序访问 Lambda 函数的“前门”
FaaS vs. PaaS Comparison
- PaaS:deploy an entire application
- PaaS 包括基础设施(服务器、存储和网络)以及中间件、开发工具、数据库管理系统和电子计算机。
- 旨在支持基于网络的应用程序的整个生命周期:构建、测试、部署、管理和更新
- 通常始终至少在一台服务器(虚拟机实例)上运行
- FaaS: deploy a single function,or part of an application
- 设计为无服务器架构(按需调用函数)--最好是在 CaaS 上。
- 介于 Saas 和 Paas 之间(有些人认为 FaaS 只是另一种 PaaS)。
SAAS
A model of software deployment where an application is hosted as a service provided to customers across the Internet. 「一种软件部署模式,将应用程序托管为一项服务,通过互联网提供给客户。」
- Deployment/Delivery Model
- Hosted and managed by vendor「供应商」
- Delivered across the Internet
- Usage-based pricing
- Per user per month
- Per transaction
- Per GB of storage per month
Examples: Google Drive,YouTube,Gmail, Microsoft Office 365,DropBox,Photoshop Online, IBM Marketing Center,Facebook,On-line shopping,…
Example
Cloud Gaming
AIaaS
Artificial Intelligence as a Service
IoT Cloud
- Cloud loT Core:supports the standard MQTT and HTTP protocols
- Cloud Functions:enable backend code to run in response to events
BaaS
Blockchain as a Service
允许客户利用基于云的解决方案来构建、托管和使用自己的区块链应用程序、智能合约和功能(基于云的服务提供商管理所有必要的任务和活动,以保持基础设施的灵活性和可操作性)。