服务 · 无服务器
AWS Fargate
Serverless compute for containers: no servers or clusters of instances to manage.
本课尚未翻译,暂以英文显示。
- 1You define a task or pod with the CPU and memory it needs, and give it to ECS or EKS.
- 2Fargate provides the compute and runs it in its own isolated environment.
- 3You pay for the resources it requested, only while it runs.
分步说明
- 1You define a task or pod with the CPU and memory it needs, and give it to ECS or EKS.
- 2Fargate provides the compute and runs it in its own isolated environment.
- 3You pay for the resources it requested, only while it runs.
How a container runs on Fargate.
Servers
- On Fargate
- None for you to manage
- On EC2 instances
- Instances in your account, managed by you or by AWS
You pay for
- On Fargate
- The CPU and memory each task requests, while it runs
- On EC2 instances
- The instances, even when they are not fully used
A good fit for
- On Fargate
- Less operational work, with no servers to patch
- On EC2 instances
- GPUs, specific instance types, or full control of the hosts
| 比较项 | On Fargate | On EC2 instances |
|---|---|---|
| Servers | None for you to manage | Instances in your account, managed by you or by AWS |
| You pay for | The CPU and memory each task requests, while it runs | The instances, even when they are not fully used |
| A good fit for | Less operational work, with no servers to patch | GPUs, specific instance types, or full control of the hosts |
1 / 2
Servers
- On Fargate
- None for you to manage
- On EC2 instances
- Instances in your account, managed by you or by AWS
You pay for
- On Fargate
- The CPU and memory each task requests, while it runs
- On EC2 instances
- The instances, even when they are not fully used
| 比较项 | On Fargate | On EC2 instances |
|---|---|---|
| Servers | None for you to manage | Instances in your account, managed by you or by AWS |
| You pay for | The CPU and memory each task requests, while it runs | The instances, even when they are not fully used |
2 / 2
A good fit for
- On Fargate
- Less operational work, with no servers to patch
- On EC2 instances
- GPUs, specific instance types, or full control of the hosts
| 比较项 | On Fargate | On EC2 instances |
|---|---|---|
| A good fit for | Less operational work, with no servers to patch | GPUs, specific instance types, or full control of the hosts |
是什么
AWS Fargate is a serverless compute engine for containers. It works with Amazon Elastic Container Service (Amazon ECS), Amazon Elastic Kubernetes Service (Amazon EKS) and AWS Batch. You say how much CPU and memory each task or pod needs, and Fargate runs it. You never choose, patch or scale the servers underneath.
Each task or pod runs in its own isolated environment. You pay for the CPU and memory that your tasks request, while they run, so there is no idle server to pay for.
是什么
Fargate and AWS Lambda are both serverless. Choose Fargate when your application is already packaged as containers, or runs for a long time. Choose containers on Amazon EC2 instances instead when you need GPUs or specific instance types.
要记住
- Serverless containers: no EC2 instances to manage.
- Works with Amazon ECS, Amazon EKS and AWS Batch.
- You set the CPU and memory per task. Fargate provides the capacity.
- Each task or pod is isolated in its own environment.
- You pay for the resources your tasks request, while they run.
考试中
- “Run containers without managing servers or clusters” points to AWS Fargate.
- “Run code without managing servers”, with no mention of containers, points to AWS Lambda instead.