Soru

Zorluk: KolayServerless and Automated Scaling Architectures for Cost Efficiency

A company is designing a serverless backend for a new web application. The application will experience sudden, highly irregular spikes in database reads and writes, with long periods of zero traffic. The architect wants to minimize costs by ensuring that both compute and database resources scale automatically to zero when there is no traffic.

Which combination of AWS services and configurations will achieve this goal most cost-effectively?

  1. AWS Lambda for compute and Amazon DynamoDB configured with on-demand capacity mode.Cevap
  2. B
    AWS Lambda for compute and Amazon DynamoDB configured with provisioned capacity mode.
  3. C
    An AWS Lambda function configured to run continuously in a loop for compute and Amazon DynamoDB in on-demand capacity mode.
  4. D
    AWS Lambda for compute and Amazon S3 Standard-Infrequent Access (S3 Standard-IA) to temporarily store transactional tables that are deleted daily.

Cevap

AWS Lambda for compute and Amazon DynamoDB configured with on-demand capacity mode.
AWS Lambda and Amazon DynamoDB on-demand capacity mode are fully serverless offerings. Lambda charges only for the exact milliseconds of execution duration, and DynamoDB on-demand charges per request. When there is no incoming traffic, both services scale to zero active capacity and do not incur any compute or request charges, making them the most cost-effective solution for irregular spikes.

Adım Adım Çözüm

1
Analyze the scaling requirements of the compute tier.
AWS Lambda is selected because it runs only in response to requests, scales automatically, and charges nothing when there is no traffic.
To minimize costs for highly irregular traffic, compute resources must scale to zero during idle periods.
2
Analyze the capacity mode requirements of the database tier.
Amazon DynamoDB with on-demand capacity mode is selected because it charges per request and scales down to zero database request costs when idle.
Provisioned capacity mode charges a constant rate regardless of usage, which is cost-inefficient for unpredictable workloads with long idle periods.
3
Combine the compute and database services to verify the total cost-efficiency.
The combination of AWS Lambda and DynamoDB on-demand capacity mode ensures both tiers scale to zero cost when traffic is zero.
This achieves the target cost optimization goal with the least operational overhead.

Anahtar Kavram

Serverless architectures achieve cost efficiency by scaling both compute and database resources to zero when there is no traffic.
Bu soruyu puanla