How to Choose WebP Cloud Region? An Overview of WebP Cloud Services Regions
Sure, here is the translated article in English:
Many users might find it challenging to choose between the multiple regions available when using WebP Cloud.
This article will introduce the regional information of WebP Cloud Services and guide you on how to select the most suitable region for your needs.
Currently, WebP Cloud Services offers three services:
The first two are free public services. Since our services are built on Hetzner, we provide regional support within Hetzner’s supported regions. The regional information behind these three services is as follows:
Service Name | USA | Germany | Singapore |
---|---|---|---|
WebP Cloud | ✔ | ✔ | |
Fly | ✔ | ||
Public Services | ✔ | ✔ | ✔ |
Although WebP Cloud Services uses Cloudflare CDN, which can achieve low connection latency globally, we still need to pay attention to how WebP Cloud works.
When a user makes a request, the request will be routed through a nearby Cloudflare CDN edge node to the selected WebP Cloud region. If the WebP Cloud does not cache the requested resource, it will use Cloudflare Workers to fetch the original image from the source site, optimize it locally, and finally output the optimized image.
For example, if your source site (such as Cloudflare R2) is in Japan and you create a WebP Cloud Proxy in Germany, a user in the USA requesting an image would follow this path:
USA user -> USA Cloudflare Edge -> Germany WebP Cloud -> Japan Source Site
In the above path:
- There will be at least a 150ms delay between “USA Cloudflare Edge -> Germany WebP Cloud”.
- There will be an additional 240ms delay between “Germany WebP Cloud -> Japan Source Site”.
This path would result in a poor user experience.
Therefore, the principle of region selection should aim to minimize the latency between “the region where most visitors are located” and “the WebP Cloud region”, as well as between “the WebP Cloud region” and “the source site”. The former is more important because WebP Cloud will try to cache your images, so apart from the initial request, subsequent requests will only have the latency between “visitor” and “WebP Cloud”.
For example, in the above case, if the source site is in the USA and you create a WebP Cloud Proxy in the USA, the path would be:
USA user -> USA Cloudflare Edge -> USA WebP Cloud -> USA Source Site
This would result in a much better user experience.
For users in mainland China, since Cloudflare does not have edge nodes in mainland China, most requests will be routed to Cloudflare’s edge nodes in the USA at the time of writing. Therefore, we recommend creating a WebP Cloud Proxy in the USA for the best visitor experience if you are targeting users in mainland China.
A Little Spoiler
From the above process, we can understand that due to geographical limitations, we can never ensure a good experience for users globally. For instance, if the WebP Cloud Proxy and the source site are both in Germany, a user in the USA will always face an additional 300ms connection delay, which we also find undesirable.
Therefore, we are internally validating a new feature called “Multi-region cache replication”. Once this feature is launched, users will no longer have to worry about choosing a region. The WebP Cloud Proxy will offer an additional “Global” option. Under this option, we will respond to visitor requests from the closest region in the two continents we currently cover (America, Europe). The schematic diagram is as follows:
This feature is currently under internal development, and we have completed the basic PoC. The launch schedule will depend on user volume, our revenue situation, and user feedback. Currently, we plan to prioritize offering this feature to Plus/Lite users with demand after completing the basic development. If you are interested in this feature, feel free to register and use WebP Cloud~
The WebP Cloud Services team is a small team of three individuals from Shanghai and Helsingborg. Since we are not funded and have no profit pressure, we remain committed to doing what we believe is right. We strive to do our best within the scope of our resources and capabilities. We also engage in various activities without affecting the services we provide to the public, and we continuously explore novel ideas in our products.
If you find this service interesting, feel free to log in to the WebP Cloud Dashboard to experience it. If you’re curious about other magical features it offers, take a look at our WebP Cloud Services Docs. We hope everyone enjoys using it!
Discuss on Hacker News