Hi everyone,
I am currently optimizing the distribution pipeline for a media tool that I am hosting. We rely on IPinfo for location detection and automatic redirection to the closest regional mirror for fast download times.
Recently, I have been testing the process for mac capcut users in particular (the DMG file is rather large), and I have noticed some inconsistencies. For users on certain residential ISPs in Southeast Asia, our system, which relies on the IPinfo API, sometimes incorrectly identifies the country code, which then falls back to our US-East server instead of the Singapore mirror.
This causes a couple of related problems that I would like the community to help me consider:
Anycast vs. Unicast Detection: Do any of you use the is_anycast flag to modify how you handle regional redirection for software downloads? I am wondering if anycast IP addresses are causing our logic to fall back to a secondary location.
Accuracy for Residential Proxies: I have noticed that some users downloading mac capcut may be behind corporate VPNs or residential proxies. Is there a “best practice” for when to rely on the country field versus the privacy data to avoid sending a user to a high-latency mirror?
Caching Logic: For those of you hosting large binaries, how long are you caching the IP lookup results on the client-side? I don’t want to blow through my API limit, but I also don’t want to leave a user “stuck” on a slow mirror if their IP changes to a different region.
I’m absolutely loving the speed of the API, but I want to make sure the mac capcut installation process is as smooth as possible no matter what region the user is logging in from. If anyone has a code snippet for dealing with “uncertain” geolocations in a CDN redirect script, I’d love to see it!
