What Startups Should Know Before Choosing a CDN
Thanks to Jarrod Guthrie (Sr. Product Manager, AWS) for his contribution.
Performance of a website or application is one of the key factors today for determining the success of a business, and it’s all the more critical for startups. Users today are busier and less patient, and with every extra second delay in your site’s latency, you could be losing business.
Having worked with many different startups, I know that one of the quickest ways to improve the performance of a website or application is to use a Content Delivery Network (CDN). Although the performance of a website depends on various factors — such as how far away the user is from the server, the types and number of resources the web page contains and backend processing — using a CDN is a quick and easy way to improve the performance of your site. And you can do so without having to apply too much effort into troubleshooting, tweaking, or updating of your application code or architecture.
In this post, I don’t discuss what a CDN is or whether you should use a CDN to improve performance (you probably already know the answer to both). Rather, my goal here is to help you make an informed decision if you do choose to go with a CDN. Because there are many different CDN providers in the market today, choosing the right one based on your business needs is essential.
So how do you choose a CDN?
Understanding Your Website, Users, and Priorities
Before you consider any CDN, you should understand your website, your users and your priorities. You could conduct deep research and analysis to gain this understanding, but in my opinion most startups don’t need to spend a lot of time delving into the details. Instead, you can focus on a few key areas to quickly determine which CDN will be the best fit for your business. In the next sections, I discuss those areas.
Types of Resources Contained Within Your Webpage
A website can consist of static content such as images, .css files, and .js files, or it can be a mix of content that includes both static and dynamically generated content that is user-specific. Understanding what your website consists of is very important for improving its overall performance, because some CDNs are good for optimizing mostly static content delivery, while others are good with optimizing both static and dynamic content delivery.
You can easily improve performance of a (mostly) static website by simply caching the static content and serving it to the users out of cache. However, the equation completely changes if a big part of your site are dynamic, which requires much more than just plain caching, (because you cannot cache dynamic content). If your use case is dynamic, make sure that the CDN you select supports that use case or has the necessary features to boost your site’s performance.
Knowing how much of your website is static vs. dynamic content can help you decide what features you need most from a CDN. At the end of the day, you don’t want to pay a lot of money for features that you don’t need, or choose a provider who doesn’t have features that will actually improve the performance of your website.
Geolocation of Your Users
Knowing where your end users are geographically located can help you understand the geographic distribution of the incoming traffic toyour website. Make sure that the CDN you select has a presence in those countries where most (if not all) of your users are located. For example, if a high percentage of users visit your website from India, then make sure that the CDN you select has a presence in India or a nearby region.
Another key point to consider is future growth. If you expect that your global traffic will increase in the future, it might be wise to choose a global CDN now rather than having to negotiate a new agreement with a global CDN once you start seeing that increased global traffic.
Cost vs. Performance
It is very important to understand how a few milliseconds of latency might affect your user’s experience. If you are running a mission-critical website or application where a few hundred milliseconds makes a big impact to your business, you might want to choose a CDN that has the best possible performance. However, perhaps your website or application is not mission critical, and those few hundred milliseconds are invisible or inconsequential to your users. In that case, you could choose a CDN that costs less and has almost as good a performance against the best performing CDN. Hence, it is very important to prioritize both cost and performance before selecting a CDN.
There are other factors that might influence your decision. For example, you might want to self-provision and manage your content yourself. Or perhaps your developers will need programmatic access to the APIs. After you’ve identified the top priorities for your business, you’ll be ready to choose two or three CDNs for testing and evaluating.
Testing Methodologies
Once you identify a few of the top CDNs that match your needs and priorities, the next step is to test the CDNs and evaluate their performance. There are various ways you can monitor your website or application and test how it is performing via a CDN. However, not all tests represent the real user experience, so it’s important to understand how these tests monitor performance. Let’s look at some of those testing methodologies.
Synthetic Testing
One of the most common ways of monitoring performance is synthetic testing, which is typically used by third-party testing companies. In these tests, synthetic traffic is sent to your website (or application) at specific time intervals from external test agents that are located across the Internet to simulate real-life actions. These synthetic tests are scripted to perform a series of actions to mimic a real user’s behavior, such as steps a user might take to search for a product, view the product, and purchase the product. These tests gather information like response time, availability, error rates, and more, and are useful for identifying problems with the website, monitoring the website’s availability, and spotting performance trends over time.
Many start-ups use such tests before getting into production, and they also use the data to make updates to their application after production. However, keep in mind that these test agents don’t represent real users and their actual behavior.
To elaborate further, there are two types of synthetic testing:
Backbone Testing: In this type of testing, test agents are installed within several key data centers across the globe, and the tests are run from those data centers to the closest CDN server, which sometimes is located within the same datacenter or a nearby datacenter.
Because these test agents are installed within data centers, you should consider the following points:
- The network path chosen by these tests will mostly differ from the ones taken by your actual users.
- Often, a CDN server will be in the same data center or nearby data center where the test agents are installed. In such cases, the latency between the test agents and CDN node will be extremely low and will show very good performance. However, this does not represent the experience of actual users.
- Typically, test agents within the data centers will have much faster connections to the CDN node than real users would, and as a result will show better performance than that of real users.
Last Mile Testing: This type of testing is similar to backbone testing, except that here the test agents are placed within user networks rather than data centers. User networks are the networks managed by local ISPs through which users purchase their Internet service.
For monitoring a website’s performance, last mile testing is a better representation of the actual user performance than backbone testing because it’s more likely to follow the network path similar to the path used by a real user. However, it is still not the best representation of the real users. You should consider the following points:
- The accuracy of these tests depends on the coverage and placement of testing agents within the user networks. Often, these testing agents might not have complete coverage for the networks used by the real users.
- At times, certain CDNs might have a special peering relationship with the ASN (Autonomous System Numbers) that is being tested in a geolocation. This offers an advantage over other CDNs, which won’t be the actual representation of performance for real users.
Real User Monitoring (RUM)
RUM testing collects measurements from real users visiting a website or application. Hence, it is a more accurate representation of performance for real users. RUM uses your actual user traffic to measure download speeds. As a result, it provides accurate measurement data. Additionally, it runs the tests from the actual user devices, so it uses the same network paths that are used by real users.
RUM is the most accurate representation of user performance. However, there are few points that you should consider:
- Because RUM downloads test objects automatically when a user visits the website, you must take care that the user experience is not affected.
- To run RUM testing, you have to insert a code snippet within the web page that your users are visiting, so some kind of code modification is required.
As mentioned earlier, synthetic testing can help to monitor your website’s availability, identify problems, and spot performance trends. But synthetic users are not real users, and the testing can lead to assumptions about your visitors that might be erroneous. If you want to compare the performance of several CDNs, RUM testing provides the most accurate representation of the user experience and your website performance because you can see exactly how real users are experiencing your web site or application.
Conclusion
Using a CDN is a quick and easy way to boost your website’s performance. However, do a bit of homework first, and test the performance using the right methodologies to help you choose the CDN that provides the most value to your business and the best experience for your users.
Remember to consider the following points:
- Static vs. dynamic resources contained within your webpage — define the features you actually need to boost your website’s performance
- Geographical distribution of your users — define the countries where the CDN that you choose should have a presence.
- Prioritization of cost vs. performance — choose a CDN that delivers the most value to your business.
Additionally, keep in mind that even though synthetic testing provides a lot of valuable information about your website, RUM testing provides the most accurate representation of the real user experience and should always be used to evaluate a CDN performance.
相關推薦
What Startups Should Know Before Choosing a CDN
Thanks to Jarrod Guthrie (Sr. Product Manager, AWS) for his contribution. Performance of a website or application is one of the
What you should do before you new a project
1.設定IDE的encoding(即專案預設的encoding,建議UTF-8) ,以避免各個開發人員自己的IDE encoding不同,出現亂碼。 2.配置CVS伺服器,確定Project的檔案結構,特別注意哪些檔案不需要用CVS同步,比如自己的幾個測試檔案,臨時檔案等等。
Top Machine Learning Algorithms You Should Know to Become a Data Scientist
There are two ways to categorize Machine Learning algorithms you may come across in the field. Generally, both approaches are useful. However, we will focu
What You Should Know About the New Climate Change Report
What You Should Know About the New Climate Change ReportWe have the technological capability to stop our earth from warming further. But it looks like that
7 Key Factors to Consider before Choosing a Chatbot Platform
Artificial Intelligence & Machine Learning — The two words that are on the tip of every technophiles tongue. It is fair to say that AI and ML, over the
Ask HN: What programming languages a CS undergrad should know?
I am a faculty member of a CS department currently designing a new "Advanced Programming" course for undergraduate students in their 2nd year. What program
What every programmer should know about memory (Part 2-0) 譯
What Every Programmer Should Know About Memory Ulrich Drepper Red Hat, Inc. [email protected] November 21, 2007 2 Commodity Hardware
What every programmer should know about memory (Part 1) 譯
What Every Programmer Should Know About Memory Ulrich Drepper Red Hat, Inc. [email protected] November 21, 2007 Abstract As CPU cor
What every programmer should know about memory (Part 2-2) 譯
What Every Programmer Should Know About Memory Ulrich Drepper Red Hat, Inc. [email protected] November 21, 2007 2.2 DRAM Access Tech
What is NPS? And why you should know how it works
NPS, therefore ranges from -100 to +100.It looks complicated, but it is very easy and it will be explained below.The calculations:In the example below, the
Ask HN: Mojave, anything developers should know about before upgrading?
From what I've seen around the web, this upgrade seems less problematic than previous years, but has anyone spotted any gotchas that other developers could
What every computer science major should know
What every computer science major should know 轉載請註明出處:https://blog.csdn.net/jpch89/article/details/85276670 文章目錄 What every comp
【墮落獸人的專欄】A good developer should know that development is not just programming; a great developer should know that development i
A good developer should know that development is not just programming; a great developer should know...
Spring Aop例項@Aspect、@Before、@<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="69280f1d0c1b3b0c1d1c1b0700070e29281b061c070d">[e
用過spring框架進行開發的人,多多少少會使用過它的AOP功能,都知道有@Before、@Around和@After等advice。最近,為了實現專案中的輸出日誌和許可權控制這兩個需求,我也使用到了AOP功能。我使用到了@Before、@Around這兩個advice。但在
Juniper:“Please clean sorting before moving a policy”提示的解決
juniper 在Juniper防火墻添加訪問控制策略後,將策略“move to top”時,發現無法移動,出現提示:“Please clean sorting before moving a policy”。 解決辦法:在web界面點擊策略列表上方項目名右側的三角形,在彈出的菜單選擇“clean
10 Advanced Bing Search Tricks You Should Know
dia page layers main.c player arch trick should face Exclude Websites From Bing Search: wikipedia -wikipedia.org Excluding Keywords From
Advantages Of Choosing A Hot Asphalt Mix Plant
Often times you are going to use a project looming on the head that needs to be completed as soon as possible. IN this case, you are likely to wan
Asphalt Mix Plant Prices – Here's What You Must Know
In case you are running any kind of construction business that needs to make new driveways, sidewalks, or highways, then it’s really worth looking
What does the following mean as a nameTest2: () => void = null and nameTest3: () => void
Javascript裡有如下的寫法,可以用在定義方法時,或者定義方法時用在方法的引數上,非常靈活 // What does the following mean as a type: () => void = null https://stackoverflow.com/ques