How to optimize GET requests

To optimize GET requests, we can apply the same technique as with PUT requests. One is to parallelize GET requests, and the other is to use CloudFront to cache objects and reduce the number of GETs. This is because, as you already learned how the performance between S3 and CloudFront differs in How to measure throughput between S3 and CloudFront in the Chapter 5, Distributing Your Contents via CloudFront, CloudFront provides content with low-latency distributing for your content stored in your S3 bucket through a global network of edge locations.

We will see the difference of the performance using a simple curl command.

Getting ready

You need to complete the following set up in advance:

  • Sign up on AWS and be able to access ...

Get Amazon S3 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.