Skip to content

Is it possible to reduce latency through hedged requests toward S3 replicas?

0

I am just curious whether reducing tail latency by sending hedged requests toward S3 replicas would be possible. So let's say the first request toward the closest replica reaches a certain latency threshold, the program would send a second request toward another replica, and so on. The first response that comes back is received and the other requests are then subsequently cancelled.

Also, a prerequisite for this would probably be the question of whether is it possible to route my request to a specific replica?

asked a year ago248 views
2 Answers
2

Hi,

Did you envision so-called AWS S3 "Multi-Region Access Point request routing": see https://docs.aws.amazon.com/AmazonS3/latest/userguide/MultiRegionAccessPointRequestRouting.html

It was designed to achieve exactly what you want to obtain: shortest S3 response time for S3 content in multiple replicas. It's like CloudFront for S3. If you couple it with S3-provided automatic bucket replication. You are all done.

When you make a request through a Multi-Region Access Point, Amazon S3 determines 
which of the buckets that are associated with the Multi-Region Access Point is closest to 
you. Amazon S3 then directs the request to that bucket, regardless of the AWS Region it 
is located in.

After the Multi-Region Access Point routes the request to the closest-proximity bucket, 
Amazon S3 processes the request as if you made it directly to that bucket. Multi-Region 
Access Points aren't aware of the data contents of an Amazon S3 bucket. Therefore, the 
bucket that gets the request might not contain the requested data. To create consistent 
datasets in the Amazon S3 buckets that are associated with a Multi-Region Access Point, 
you can configure S3 Cross-Region Replication (CRR). Then any bucket can fulfill the request
successfully.

Best,

Didier

EXPERT
answered a year ago
EXPERT
reviewed a year ago
0

Hello Zyyeric,

Directly sending hedged requests to specific S3 replicas is not feasible due to the abstraction provided by S3’s architecture. About Indirect Hedging While you can implement a form of hedging by querying multiple regions or buckets, this introduces additional complexity and potential issues. Alternative Strategies is to Consider caching, optimizing performance, and monitoring as more practical approaches to reduce latency when working with Amazon S3. In general, AWS services are designed to handle replication and routing transparently to provide high availability and durability, so your focus might be better placed on optimizing application-level strategies rather than trying to control individual request routing.

I hope this helps an if it does kindly accept the answer to benefit others

EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.