သဘောတရား · CLF-C02 အပေါ် ဆက်လေ့လာရန်
CDN and edge caching for cost
A CDN pays off when many requests are served from cache. Tune the hit ratio and the price class.
ဒီသင်ခန်းစာကို မြန်မာဘာသာ မပြန်ရသေးလို့ အင်္ဂလိပ်လို ပြထားပါတယ်။
Cloud Practitioner မှ သင်သိပြီးသားများ
- CloudFront caches content at edge locations.
- Users get lower latency.
- It works with S3 and other origins.
- Helps by
- Caching near users
- Cost shape
- Per GB out and requests
- Helps by
- Faster routes, static IPs
- Cost shape
- Hourly plus per GB
- Helps by
- Naming and routing
- Cost shape
- Per query, alias free
| Service | Helps by | Cost shape |
|---|---|---|
| Caching near users | Per GB out and requests | |
| Faster routes, static IPs | Hourly plus per GB | |
| Naming and routing | Per query, alias free |
ဘာလဲ
CloudFront egress costs less per GB than sending the same data directly from EC2 or S3, and traffic from an AWS origin to CloudFront is free. Each cache hit also saves a request to the origin. So it lowers cost when content repeats: images, scripts, video and downloads. For one-off or private data it adds little.
ဘာလဲ
Raise the cache hit ratio with longer TTLs, fewer cache key variants (limit the query strings, headers and cookies in the key) and compression. Origin Shield adds a central cache layer in front of the origin, so misses from many edge locations become one request. It costs per request, and helps most when the origin is slow or costly. Price classes limit which edge locations serve you. Price Class 100 uses the cheapest locations, in North America and Europe. Price Class 200 adds more Regions, and All uses every location. Fewer locations lowers the price and raises latency for far-away users.
ဘာလဲ
Other edge services have a different cost shape. AWS Global Accelerator has an hourly fee plus a per-GB premium. It speeds up and steadies traffic over the AWS network, and gives static IP addresses, but it does not cache, so it is not a way to cut cost. Amazon Route 53 bills per hosted zone and per million queries. Alias records that point to AWS resources, such as CloudFront and load balancers, are free to query. CNAME records are billed. Longer TTLs mean fewer queries.
မှတ်ထားရန်
- CloudFront pays off with repeated content and a high cache hit ratio.
- Transfer from an AWS origin to CloudFront is free. CloudFront egress is usually cheaper than direct egress.
- Raise the hit ratio: longer TTLs, small cache keys, compression.
- Origin Shield: an extra cache layer that cuts origin requests. It bills per request.
မှတ်ထားရန်
- Price classes: fewer edge locations, lower price, higher latency far away.
- Global Accelerator is for performance, not cost. Route 53 alias queries to AWS resources are free.
စာမေးပွဲမှာ
- “Global users download the same static files, reduce egress cost” points to CloudFront.
- “Many edge locations hit one slow origin” points to Origin Shield.
- “Most users are in North America and Europe, lower the CDN cost” points to Price Class 100.
- “Static IP addresses and faster routing for TCP or UDP, no caching” points to Global Accelerator.
ဒါတွေနဲ့ မရောပါနဲ့
Amazon CloudFrontA CDN with cache rules, private S3 origins, origin failover, signed access and code at the edge.
AWS Global AcceleratorTwo static anycast IP addresses and the AWS network for TCP and UDP traffic, with fast Regional failover.
Amazon Route 53Pick the routing policy that matches the clue, alias records, the three kinds of health check, and private DNS.
ဒီ task ထဲမှာ · 4.4
- Data transfer cost design
- NAT gateway cost design
- Cost of network connectivity
- CDN and edge caching for cost
- Throttling strategies
Organizations
- Subnets, route tables, gateways and NAT
- VPC endpoints
Load Balancing
Route 53
- Service Quotas
- VPC peering
Transit Gateway
PrivateLink
NLB and GWLB
CloudFront
Global Accelerator
- Hybrid connectivity decision
Direct Connect
Site-to-Site VPN
- Cost allocation tags
Cost Explorer
Budgets
Cost and Usage Reports
- Multi-account billing