We always want the best experience for our users so they will keep running back to our services. These days I spend more of my time as a developer optimizing and delivering content efficiently, than I do writing the actual code.
Writing an efficient and performant code is just one step, but unfortunately that is not all. The content we deliver and how we deliver it can ruin our day no matter how clean our code base is. This is always the case when we are dealing with media files. Unfortunately, images make up about 60% of downloaded content on most websites.
Most likely, you are already doing a great job with managing these files by outsourcing the responsibility to a third party CDN or doing so internally using your own servers. Bad news is, your web application server or the single CDN will still not deliver this content at an expected time if your users are spread all over the world.
Let’s have a look at delivering content more efficiently with Cloudinary’s multiple CDNs feature.
CDN or Not?
One of the most frustrating experiences for every user is having to wait for the browser loading spinner to stop dancing and deliver content. This wait period, from when a request is made to when it is completed, to when the response is produced is known as latency.
Latency is an evil we must live with as long as we make use of the web because the request-response cycle is the web’s natural behavior. We can curtail latency, thereby reducing the amount of time users wait. One strategy is using CDNs.
A CDN (Content Delivery Network) is a solution that is independent of your application and server but can be used to deliver content to your website rather than delivering directly from your servers. The good thing about this is CDNs offer more sophisticated and powerful tools to handle and optimize content and content delivery, thereby relieving the heavy-lifting responsibilities from your server.
As shown in the illustration above, contents are cached/stored on the CDN and delivered to the users for subsequent requests. The server will no longer be responsible for serving the data. This is a healthy practice for your server and an awesome user experience because CDNs are faster.
The Story of Physical Distance
CDNs as we have seen are better options for delivering contents especially media files. But there is still a huge challenge. As we discussed earlier, a single CDN still does not guarantee a fast request because of physical distance.
A situation where you have your CDN server in Bangkok and you have users around the world making request to that server from different countries on different continents. Users closer to Bangkok and in Asia will have a minimized latency than those in London and the US. This is caused by the distance between the user and the server known as physical distance. The farther the distance, the more network activities and routing will occur. This means more users must wait for the process to complete.
The strategy used by CDN providers is to deliver content using multiple CDNs located in different parts of the world. The implication is, when a user in Africa makes a request, a CDN server in Africa delivers, same with Asia, UK, and so on.
Leading media websites like Twitter, Facebook, and Netflix have adopted the multi-CDN approach to more efficiently serve media throughout the world – Cloudinary can now do that for you too!
Cloudinary’s Multiple CDN Feature
Today, Cloudinary does not just offer media storage, manipulation, and administration but now offers multiple CDN for your media files. This means you get the following services at an extremely fast delivery rate:
- On-the-fly image manipulation via CDN URLs
- Adaptive format adaptation for any browser
- Automatic image optimization with Save Data support
- SEO friendly URLs with dynamic suffix
- Automatic width and DPR using Client Hints
- Transparent and automatic invalidations
- Custom domain (CNAME), SSL support, HTTP/2 support
- Video streaming with on-the-fly transcoding
You no longer need to select the best CDN, handle the technical integration, fit the CDN to your needs – Cloudinary does it all for you! Each of Cloudinary’s supported CDNs has different advantages and special features; Cloudinary maps your requirements to the best matching CDN.
This multi CDN approach enables developers to improve the end-user experience by:
- Leveraging strengths of various CDNs to offer the best-of-breed performance and coverage for all users.
- Improving the quality of service - performance, reliability and availability - specifically for users that otherwise would not be as close to a server.
- Eliminating operational overhead of managing and maintaining CDN solutions, such integration, maintenance and contracts.
Cloudinary uses real-time monitoring and performance data, to dynamically switch between different CDN providers and networks to match the user characteristics, request by request.
Get Started Today
My experience, and that of my users, in building web apps and using them respectively have been great because of the Cloudinary techniques employed to manage media files. Content delivery just got better with the introduction of Cloudinary’s multi CDNs feature. Get started and give your users the experience they deserve and keep them coming back