Bỏ qua tới nội dung
CloudDojo
Phần 4/7 · 4 phút

Edge location: CloudFront cache nội dung, S3 Transfer Acceleration tăng tốc truyền tới và từ bucket

0/9
Từ khóa của phần nàyChọn một từ để xem nghĩa trước khi đọc

Người dùng ở xa origin chịu độ trễ cao hơn vì dữ liệu đi qua quãng đường dài; AWS rút ngắn quãng đường này bằng các point of presence đặt gần người dùng, gọi là edge location.

Edge location là các point of presence (điểm hiện diện) của AWS đặt gần người dùng, với số lượng lớn hơn nhiều so với số Region. CloudFront cache nội dung tại các điểm này; origin có thể là S3 bucket, ALB hoặc HTTP server on-premises (custom origin). Ảnh sản phẩm của MFTECH được lưu tại S3 Singapore. Truy xuất ảnh hai lần để so sánh kết quả.

gần, vài trăm kmxa hơn, tới RegionNgười dùngTP.HCMEdge location (CloudFront)cache: trốngS3 bucketSingaporeorigin
  • sẵn sàngCache tại edge location đang trống. Chọn "Người dùng mở ảnh sản phẩm".

S3 Transfer Acceleration cũng dùng edge location nhưng không nhằm cache nội dung: dữ liệu đi vào edge location gần client, sau đó truyền qua đường mạng tối ưu của AWS tới bucket. Theo S3 FAQ, Transfer Acceleration tăng tốc truyền dữ liệu đường dài tới và từ một bucket, tức cả tải lên (PUT) lẫn tải xuống (GET), và phát huy rõ nhất với object lớn. Khi nhà cung cấp ở nhiều châu lục vừa tải lên vừa tải xuống video tới 10 GB từ bucket Singapore, chỉ cần bật Transfer Acceleration là cải thiện được cả hai chiều; tải lên tệp lớn thường kết hợp thêm multipart upload. AWS khuyến nghị cân nhắc PUT/POST qua CloudFront khi object hoặc tập dữ liệu nhỏ hơn 1 GB; với tệp lớn hơn, Transfer Acceleration cho throughput cao hơn.

Ghi nhớ:
  • Nhiều người dùng ở xa xem lặp lại cùng một nội dung: CloudFront cache tại edge location (kể cả khi backend phải duy trì tại vị trí hiện tại).
  • Truyền tệp lớn (từ khoảng 1 GB) qua khoảng cách xa tới hoặc từ một bucket S3, cả tải lên lẫn tải xuống: S3 Transfer Acceleration (tải lên kết hợp multipart upload).
  • Tệp nhỏ hơn 1 GB: cân nhắc PUT/POST qua CloudFront.
Part 4/7 · 4 phút

Edge locations: CloudFront caches content, S3 Transfer Acceleration speeds transfers to and from a bucket

0/9
Từ khóa của phần nàyChọn một từ để xem nghĩa trước khi đọc

Users far from the origin see higher latency because data travels a long way; AWS shortens that distance with points of presence near users, called edge locations.

Edge locations are AWS points of presence located close to users, far more numerous than Regions. CloudFront caches content at these locations; the origin can be an S3 bucket, an ALB or an on-premises HTTP server (custom origin). MFTECH’s product images are stored in S3 in Singapore. Fetch an image twice to compare the results.

gần, vài trăm kmxa hơn, tới RegionNgười dùngTP.HCMEdge location (CloudFront)cache: trốngS3 bucketSingaporeorigin
  • sẵn sàngCache tại edge location đang trống. Chọn "Người dùng mở ảnh sản phẩm".

S3 Transfer Acceleration also uses edge locations, but not to cache content: data enters the edge location close to the client, then travels over an optimized AWS network path to the bucket. According to the S3 FAQs, Transfer Acceleration speeds up long-distance transfers to and from a single bucket, meaning both uploads (PUT) and downloads (GET), and helps most with larger objects. When suppliers on several continents both upload and download videos of up to 10 GB from the Singapore bucket, enabling Transfer Acceleration alone improves both directions; large uploads are usually combined with multipart upload. AWS suggests considering CloudFront’s PUT/POST when objects or the data set are smaller than 1 GB; for larger files, Transfer Acceleration gives higher throughput.

Ghi nhớ:
  • Many distant users repeatedly fetching the same content: CloudFront caches it at edge locations (even when the backend must stay where it is).
  • Large files (about 1 GB and up) moved over long distances to or from an S3 bucket, uploads and downloads alike: S3 Transfer Acceleration (combine uploads with multipart upload).
  • Files under 1 GB: consider CloudFront PUT/POST.

Kiểm tra nhanh

Trả lời để ghi nhận đã đọc phần này. Câu trả lời sai sẽ được nhắc ôn lại vào những ngày sau.

Người dùng ở châu Âu xem lặp lại cùng ảnh sản phẩm của MFTECH và chịu độ trễ cao; backend phải giữ nguyên tại Singapore. Chọn gì?
Đối tác ở xa tải tệp khoảng 5 GB lên bucket S3 của MFTECH tại Singapore và tốc độ rất chậm. Chọn gì?

Đã trả lời 0/2 câu