System Design > Backends For Frontend subtopic resource properly renamed but valid content exists at URI with typo
What is the URL where the issue is happening
https://roadmap.sh/system-design/backends-for-frontend@n4It-lr7FFtSY83DcGydX
What browsers are you seeing the problem on?
Chrome
Describe the Bug
- In PR #8129 , I fixed the typo that existed in the Backends For Frontend .md file (backens-for-frontend@n4It-lr7FFtSY83DcGydX --> backends-for-frontend@n4It-lr7FFtSY83DcGydX)
- I also double-checked the rest of the repo to see if backends (corrected spelling) was indeed used anywhere relevant, notably in the
system-design.jsonfile and themigration-mapping.jsonfiles. The spelling seen there is backends. - However, I can see the resource is still not found.
- The resource that is being fetched is still located at https://roadmap.sh/system-design/backends-for-frontend@n4It-lr7FFtSY83DcGydX
- The resource we want is located at the URL with typo: https://roadmap.sh/system-design/backens-for-frontend@n4It-lr7FFtSY83DcGydX
I further investigated the different request/response headers, especially the ones relating to AWS CloudFront:
Request URL:
https://roadmap.sh/system-design/backends-for-frontend@n4It-lr7FFtSY83DcGydX
Request Method: GET
Status Code: 404 Not Found
Remote Address: 3.165.136.72:443
Referrer Policy: strict-origin-when-cross-origin
age: 59180
cache-control: max-age=0, must-revalidate
content-encoding: br
content-type: text/html; charset=UTF-8
date: Mon, 27 Jan 2025 23:32:56 GMT
etag: W/"c9a1-194aa177455"
last-modified: Mon, 27 Jan 2025 23:27:31 GMT
server: nginx/1.18.0 (Ubuntu)
vary: Accept-Encoding
via: 1.1 c40f54ba68fc84418ef3fa6fd68bc010.cloudfront.net (CloudFront)
x-amz-cf-id: oPL141bf7fzYCUPG4qPVxjNTgQJwkn8vz_NyY2djTI9pQ1RPZf417w==
x-amz-cf-pop: CDG52-P3
x-cache: Error from cloudfront
x-frame-options: SAMEORIGIN
:authority: roadmap.sh
:method: GET
:path: /system-design/backends-for-frontend@n4It-lr7FFtSY83DcGydX
:scheme: https
accept: text/html
accept-encoding: gzip, deflate, br, zstd
accept-language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7,pl;q=0.6
authorization: Bearer undefined
content-type: application/json
referer: https://roadmap.sh/system-design
I investigated further the Error from cloudfront in the context of 404 Resource Not Found, which indeed seems to be the fact that the URL is pointing to a resource that doesn't seem to exist in CloudFront.
I wanted to know if there was maybe some resource renaming on the CloudFront side of things that needed doing. I am new to large websites CDN, I don't exactly know how the URI/URL renaming mechanisms work in CloudFront - I found this Medium article that talks about URL rewriting using a lambda function (in the author's use case, they do so to systematically drop a specific portion of the URL): https://serprime.medium.com/aws-cloudfront-url-rewriting-422d4868b282.
For roadmap.sh, is there any content update pull/push mechanisms triggered between the content of the repo - in this case, the .md file resource itself - and the corresponding CloudFront content? Or is the renaming workflow following another mechanism?
Thanks in advance,
Output from browser console (if any)
No response
Participation
- [x] I am willing to submit a pull request for this issue.
@alicecommits looking into it
@alicecommits looking into it
@worldcosmo56 : @kamranahmedse refreshed CloudFront and its cache about a week ago (see the job done in GitHub actions), which I think led the CloudFront URI to actually be refreshed too and now the "Backends For Frontend" card open to the right URI in the official website, I have just checked.
I left the issue open though because I was curious to learn if there was any specific mechanism of update behind the CDN.
Thanks for looking into it, let me know if you have any feedback or find anything interesting!
Cheers, Alice
In the above screen shot I can see that the GET service URI path typo is not updated to-
https://roadmap.sh/system-design/backends-for-frontend@n4It-lr7FFtSY83DcGydX
Why still I can see the earlier service URI path on the Official Website!
@worldcosmo56 I find it interesting since on my end, I get a 200 OK when I click the 'Backends For Frontend' topic for the 1st time (so when it's not yet cached by CloudFront) with the updated URI:
And I still get it alright via the CloudFront cache (receiving an 304 Not Modified this time and X-Cache showing "Hit from CloudFront").
In my case, I understand that the server that delivers such content to me is the one which is the closest to me in the CloudFront CDN, namely CDG52-P3 (see X-Amz-Cf-Pop Response header), which is different than yours (yours seems located in India, mine in Europe).
So could it be due to a refresh or caching strategy that didn't happen equally across our regions? @kamranahmedse could you help on this?
Thanks in advance, Cheers
Alice
@iamsurajitmishra2025 , do you still have the URI with the typo served to your region? Or has it evolved?
This has been fixed. Thank you!
Hi @kamranahmedse no problem! Was it the CDN content that was stale then? I'm curious to know Thanks in advance,