Soru

Zorluk: KolayServerless and Automated Scaling Architectures for Cost Efficiency

A startup is deploying a data ingestion application that must run continuously 24 hours a day, 7 days a week, to consume a steady stream of updates from an external API. The processing load is constant and predictable. The startup wants to minimize compute costs for running this worker.

Which compute option is the MOST cost-effective solution for this workload?

  1. A
    An AWS Lambda function invoked every minute by an Amazon EventBridge scheduled rule.
  2. Amazon ECS tasks on AWS Fargate with a Compute Savings Plan.Cevap
  3. C
    An AWS Lambda function configured with Provisioned Concurrency to keep the execution environment active.
  4. D
    An AWS Lambda function triggered by an Amazon SQS standard queue to process messages individually.

Cevap

Amazon ECS tasks on AWS Fargate with a Compute Savings Plan
Running a continuous, predictable 24/7 worker in Amazon ECS on AWS Fargate is the most cost-effective option because it provides a consistent, lower hourly rate for compute capacity, which can be further optimized with a Compute Savings Plan. In contrast, serverless functions like AWS Lambda are designed for ephemeral, event-driven tasks and charge a premium for invocation and execution time when run continuously.

Adım Adım Çözüm

1
Analyze the workload characteristics and requirements.
The workload is a data ingestion worker that runs continuously 24/7 with a constant and predictable processing load.
Understanding whether a workload is steady/predictable or spiky/idle is the first step in selecting the most cost-effective compute option.
2
Evaluate AWS Lambda's billing model against the workload.
AWS Lambda is billed per execution and duration. Running a function continuously 24/7 incurs continuous duration charges, which are much higher than running containers or instances continuously.
Evaluating Lambda helps identify if a serverless function is suitable for a long-running, continuous workload.
3
Evaluate containerized compute options on ECS Fargate with savings models.
Amazon ECS on AWS Fargate provides container hosting without EC2 management. Since the workload is continuous and predictable, a Compute Savings Plan can be applied to Fargate to achieve the lowest hourly rate for the required CPU and memory.
Matching containerized compute with savings plans provides the most cost-effective solution for steady-state workloads.

Anahtar Kavram

Matching workload patterns (continuous vs. ephemeral) to the correct compute billing model for cost optimization
Tahmini Süre:45s
Bu soruyu puanla