Not sure if this is the right platform but would like to give it a shot here as there are many legendary folks that live in stackoverflow domain.
We have a typical ecommerce website hosted in India. The architectural touch points can be summarized below
- Static content is loaded from AWS CDN
- The first point of entry is the AWS application load balancer
- Search functionality using elastic search
- Redis caching enabled
- business functionality implemented using nodejs, typescript, javascript and hosted in kubernetes cluster
The website is pretty fast anywhere but China because of the Great firewall of china
Solutions which we have tried
We have tried using the Alibaba Global accelerator with AWS geolocation record routing policy to ensure that traffic originating from China should come from the Global accelerator instead from the main internet.
We have also tried Huawei Cloud Connect again with Geo location to route traffic via Cloud connect going through the NAT gateway from HongKong to Singapore and then behaving as if the traffic is originated from Singapore
Performance wise the Huawei cloud connect seems to be performing better. However the static content which is loaded from AWS CDN is still slow as it tries to get from nearest AWS CDN node which is Japan.
How can we accelerate the CDN for the images ?
Any thoughts are welcome.
Please collect better data from a person based inside China using Chrome's Lighthouse feature accessible via Dev Tools or as an extension, and share key metrics that Lighthouse flags as "needing attention" on this thread.
Check at least the following common (mis)configurations
Is the origin server setting the correct time-to-live for every image, JS, and CSS file? AWS docs. Check S3 file-level metadata specifically if S3 is in use, or your application server's HTTP response to AWS CloudFront for static resources.
Are all intermediary CDNs and application-level proxies passing through the above
Cache-Controlandmax-agedirectives to downstream users?Using your browser's dev tools, are you able to observe the above headers once you set or edit them at the origin server? Is a typical user in mainland China able to observe these headers?
Examine non-standard
X-From-Cacheheaders (or similar) inserted by CDN networks or caching proxies to see which intermediary is misconfigured.