- Newest
- Most votes
- Most comments
To address the high latency issues you're experiencing with your S3 Multi-Region Access Point (MRAP), it's important to understand how MRAP works and how to troubleshoot the discrepancies you're seeing between S3 access logs and client-side measurements.
MRAPs use AWS Global Accelerator to route requests dynamically to the nearest S3 bucket, considering factors like network congestion and the location of the requesting application. This can result in improved performance, especially for requests routed over the public internet.
The discrepancy between the S3 access logs and the client's HAR file is likely due to the way MRAP and Global Accelerator handle connections. The "Total Time" in S3 access logs indeed measures the time taken to transfer data between the AWS edge location and the S3 bucket, not the entire round trip from the client. This explains why the logs show completion times under 1 second while the client experiences much longer delays.
To get a more comprehensive view of the request flow:
-
Use AWS CloudTrail for logging MRAP requests. CloudTrail logs all requests made through a Multi-Region Access Point, including the hostname of the MRAP. To enable CloudTrail logging for MRAP operations, configure it in the US West (Oregon) Region, regardless of your location or the Regions supported by your MRAP.
-
Monitor Amazon CloudWatch metrics for your MRAP to get insights into its performance and usage patterns.
-
Consider using AWS X-Ray to trace requests as they travel through your application and AWS services, which can help identify bottlenecks in the request path.
To improve performance for your client in Asia:
-
Ensure that your MRAP is configured to route traffic efficiently. Check that the ap-northeast-1 bucket is set as active for that region.
-
Implement aggressive timeouts and retries in your client application. The AWS SDKs have configurable timeout and retry values that you can tune to your application's specific needs. This can help maintain consistent latency, as retried requests are likely to take a different path and succeed quickly.
-
If applicable, consider using byte-range fetches for large objects to reduce latency and improve overall performance.
-
Evaluate if adding another bucket in a region closer to your client's location could improve performance.
Remember that while MRAPs aim to optimize performance, factors like internet routing and local network conditions can still impact overall latency, especially for clients in regions with restricted internet access.
Sources
Multi Region Access Points – Amazon S3 Features – Amazon Web Services
Retry Requests for Latency-Sensitive Applications - Best Practices Design Patterns: Optimizing Amazon S3 Performance
Monitoring and logging requests made through a Multi-Region Access Point to underlying resources - Amazon Simple Storage Service
Relevant content
- asked 2 years ago
- Accepted Answerasked 2 years ago
- asked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 3 days ago
- AWS OFFICIALUpdated 6 months ago