Symptoms:
- There's a need to replicate data across servers in various locations globally.
- How can I ensure my files uploaded in the United States are also readily accessible around the world?
Cause:
Developers aim to optimize file availability by hosting content on servers closer to their users. This minimizes latency, resulting in faster and more efficient file delivery.
Resolution:
Cloud Content Delivery (CCD) uses its Cloud Delivery Network (CDN) to automatically synchronize and replicate files to multiple servers worldwide, ensuring global accessibility with minimal delays.
An example of a user in Japan downloading files from CCD:
- First file request from a user in Japan
- CCD/CDN doesn't find the file on Japan servers
- CCD/CDN retrieves the file from the US
- CCD/CDN stores a copy in Japan
- The file is delivered (first time slower)
- Following requests from Japan will be much faster.
Alternative solution:
To avoid slower initial downloads, you can manually prefetch the file in the critical region so it’s already cached locally. This ensures users experience fast delivery, and as long as there’s ongoing traffic in that region, the file remains in the cache for quick access.
NB:
- Pre-caching does not guarantee that the cache will be available at the time of the request.
- There are some edge nodes that may not cache content. In other words, even if you pre-cache the content, it may still take time to load in certain locations.
More information:
https://docs.unity.com/ugs/en-us/manual/ccd/manual/UnityCCD