Skip to content

Commit 0095821

Browse files
lidelmasih
authored andcommitted
fix: lower 404 ttl to decrease end user failures
The user adds content to IPFS node, then tries to fetch it in a browser before sharing link with a friend. For gateways backed by Saturn L1s (which use IPNI DHT proxy), we hit a problem. Different Saturn L1s will ask IPNI for the same CID multiple times. When one L1 fails, Caboose (Saturn Client) will retry using a different L1, and that will also fail due to cached 404. User will try to refresh the page, and it will fail again because there is no L1 that can find providers for the next ~300 seconds. User is unable to fetch content which is available on DHT for the next 6 minutes, and will report IPFS is slow / flakey, while in reality, a HTTP cache on centralized service is set too high, and that is all. Proposal: Lowering this to 5s should still protect you from unwanted load spikes, but will fix false-negative content routing errors for end users.
1 parent 360717f commit 0095821

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deploy/infrastructure/prod/us-east-2/cloudfront.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ resource "aws_cloudfront_distribution" "cdn" {
5353

5454
custom_error_response {
5555
error_code = 404
56-
error_caching_min_ttl = 300
56+
error_caching_min_ttl = 5
5757
}
5858

5959
default_cache_behavior {

0 commit comments

Comments
 (0)