You have Cookie disabled in your browser. Displaying the site will be incorrect!

How to speed up dynamic content delivery using CDN

CDN is believed to be an ideal tool for fast static content delivery, while being unable to speed up dynamic applications.

CDN makes your web resources run faster mainly due to caching. Your content is stored on the cache servers that are the closest to the users, and all secondary requests receive information from the nearest points of presence instead of being sent to the origin server.

Dynamic content is unique for each user and can’t be cached. Does it mean that speeding up dynamic content delivery is impossible?

The truth is that if CDN supports certain features, it can also speed up dynamic content delivery. G-Core Labs CDN supports everything that is necessary for it.

Let’s discuss 8 technologies that help us deliver dynamic content just as quickly as static content.

1. Excellent connectivity

Content delivery speed is highly dependent on the network connectivity.

The more peering partners CDN has, the better the connectivity and the shorter the route from the origin server to the user. And the shorter the route, the faster the data delivery.

The route from the origin server to the user

We have over 6,000 peering partners. This means that we can build the most optimal route and convey information from the origin server to the users as quickly as possible.

2. HTTP/2 support

HTTP/2 is the latest version of the HTTP protocol released in 2015.

Using this version helps us speed up content delivery, mainly due to multiplexing, i.e., sending multiple data streams over one channel.

To send data, HTTP first needs to establish a TCP connection that requires a “three-way handshake”:

  1. The sender requests to establish a connection by sending a SYN message with the sequence number of the transmitted byte.
  2. The recipient replies with a SYN message, confirms data acquisition with an ACK message, and sends the byte number that is supposed to be received next.
  3. The sender also confirms data acquisition and sends the number of the next byte.

Only after these three steps have been carried out, the connection is considered to have been established.

TCP connection diagram

In the previous HTTP versions, transferring every single element (jаvascript, CSS, images, etc.) required establishing a separate TCP connection and a “three-way handshake.” This slowed down the content delivery process immensely.

HTTP/2 establishes one TCP connection to transfer all these data, i.e., different types of information can be sent simultaneously. This saves a lot of time while transferring content.

Data transfer over HTTP 1.1 and over HTTP/2

Other reasons why using HTTP/2 can speed up content delivery:

  • This is a binary protocol. Using a binary format instead of a text format facilitates command execution immensely. These protocols have fewer errors and reduce network load, thus decreasing the latency rate.
  • It can compress headings. Each heading consists of some data. The more data you need to transfer, the more time it takes to deliver them to the user. HTTP/2 compresses headings using the Huffman algorithm and omits duplicate headings.
  • It can prioritize requests. You can assign a priority to certain information, and it will be sent first and loaded faster. It is advisable to prioritize the most important page elements that should be displayed to the user from the very beginning.
  • Server Push feature. It allows you to predict what kind of data your client will need. As a result, you can send these data to your clients before actually receiving the request. This speeds up the loading process, reduces the number of the requests received, and decreases the source server load.

We care not only about delivery speed but also about data safety. Our CDN has a feature that enables a forced redirect to HTTPS. You can enable it in the resource settings in the control panel.

This means that you can deliver content securely using our network even if the origin server doesn’t allow HTTPS transmission.

You can either use your own SSL certificates or get a free Let’s Encrypt certificate from us.

Thanks to the use of HTTP/2 and TLS 1.3, the secure connection won’t slow down the content delivery process. Your web application will run quickly and securely.

3. WebSocket support

WebSocket is an independent TCP-based protocol enabling real-time message exchange between the client and the server.

It differs from HTTP mainly in that the clients don’t have to send requests to the server every time they need to get some information.

For example, imagine a chat. To inform the client of a newly received message, the browser needs to send regular requests to the server in order to find out if any new information has been received.

The disadvantages of such an approach are as follows:

  • Increased number of server requests. This intensifies server load and reduces request processing speed.
  • Slower information updates. Since the browser sends requests at regular intervals, it may not be able to send a new message to the client immediately. This results in content delivery delays.

WebSocket, on the contrary, establishes and supports a constant connection. When a new message appears, the server sends it to the client immediately.

HTTP vs WebSocket

This results in reduced request numbers and in increased data delivery speed.

If you need to deliver dynamic content that is frequently changing (e.g., chat messages, push notifications, or any other data that are constantly updated on the website), using WebSocket is a must.

You can select the data transmission protocol in our CDN control panel.

4. Using IPv6

IPv6 is a modern version of the IP protocol. It was developed mainly to address the issue of lacking IP addresses. To create an address, IPv4 and IPv6 use a 32-bit and a 128-bit system respectively.

An IPv6 address consists of eight 16-bit blocks separated by colons. The total number of IP addresses that can be created is 2,128, i.e., more than 300 million addresses for every person living on our planet. Such an amount is supposed to be enough for any device.

In addition to recording IP addresses, other changes were introduced to the updated protocol version, thus making it a more efficient data delivery tool.

Reduced network equipment load. This protocol version doesn’t use NAT (a technology for transforming private addresses into public ones).

IPv4 needed NAT because of the lack of addresses. Within the local network, each device had a private IP address that was used for local data transfer, e.g., between the devices within the same company. Yet interaction with other resources in the world wide web required a publicly available address.

NAT transformed private addresses into public ones. This process is called translation. It was necessary not only to transform addresses but also to store the information about the established connections. This increased equipment load, resulting in reduced speed during peak traffic spikes.

IPv6 doesn’t require translation. There is no need to store information about connections. This results in reduced equipment load, and the speed remains stable.

Simplified package headers. In the new version, non-essential elements have been removed from the package headers. This measure has simplified data processing, reduced the router load, and decreased the amount of data to be conveyed.

Faster routing. The structure of the IPv6 address is designed in such a way that the routers at each network level (large providers, subnets, corporate networks) process only some part instead of processing the entire address. This reduces the routing table size and the time needed for processing.

Identifying the packages that are sensitive to delays and transmitting them first. This has become possible thanks to the QoS (Quality of Service) function. It is a special technology that can prioritize traffic basing on its type.

As you can see, IPv6 is far more efficient than IPv4 and conveys data much faster. Yet you’ll need to modernize your infrastructure first if you decide to start using it.

However, this is not necessary if you are connected to our CDN. We can use IPv6 for the means of content delivery even if your hardware hasn’t been updated to meet this protocol yet.

As a result, dynamic content is delivered quickly, and you don’t need to waste your resources on numerous upgrades.

5. On-the-fly data compression

The less your content weighs, the faster it will be delivered to the users. Yet sacrificing important elements to achieve the desirable content size is not a good idea.

This problem can be solved by using modern compression algorithms, such as Gzip, Brotli, and WebP.

Gzip is designed for text content compression. It finds identical lines in your files and unites them, reducing the file size by 60–70%.

Brotli can reduce the size of any content type. It compresses data using a built-in user browser dictionary including over 100,000 most common elements that can be found on the Internet. The algorithm looks for these elements in the transmitted data, finds and sends unique fragments only, while adding nonunique fragments from the dictionary. Brotli is 20–25% more efficient than Gzip.

WebP is a new image compression algorithm. It fulfills lossless compression by 26% better than PNG and carries out compression with reduced image quality by 25–34% better than JPG.

However, the main advantage of these algorithms is that they can compress files while actually delivering the content to the users.

On-the-fly compression

And if you use our CDN, you won’t need to change any settings or to write code. You can just upload files to the source server in their original form, and CDN will resize them automatically while delivering them to the users.

6. Flexible caching settings

Generally speaking, dynamic content can’t be cached, but there are some exceptions. Some data can be stored for a short period of time, while remaining relevant to the users.

It is very important to adjust the caching settings in order to make them meet the parameters of your web resource. With our CDN, this becomes possible.

You can set any caching time or even disable it.

Caching settings in the control panel

We also have a cache clearing function available. You can clear the whole cache or some parts of it, use it for just one file or for a group of files. You can adjust cache clearing settings in the control panel or via the API.

7. Provider’s authentication functions

If you want to limit access to your content, you can have CDN fulfill the authentication functions. This will reduce excessive server load, thus increasing content delivery speed.

Our CDN offers a Secure Token feature. It allows you to create temporary personal links that contain a special hash key. The users will be able to download your content only if their requests also contain this key.

This protects your content from unauthorized downloads, illegal connection, and copying.

Your content will be accessible only to the authorized users. User identity will be verified by CDN, which reduces excess server load.

8. Cloud storage

It’s not only content delivery but also content storage that matters a lot. For example, imagine an online store. If you want to show an individual selection of recommended products to the buyer, you’ll need to upload product photos among all other data. Storing such content requires a lot of memory. When a client sends a request, your website must quickly find the necessary files, generate a response, and return it in the desired form.

Content storage can induce heavy server load and requires high computing performance. Renting a cloud object storage is far more efficient than hosting files on your servers.

Unlike other cloud storage types, an object storage has no hierarchy. The files get extracted directly, which reduces the time needed to return them.

How is this connected with using CDN? G-Core Labs has an object storage where you can store as much information as you want. You can also retrieve and deliver these data as quickly as possible. The storage is optimized for working with dynamic web resources. You can enable it together with CDN and manage it using an integrated control panel.

Let’s sum it up

  1. It is generally believed that CDN can only speed up static content delivery and does not work well with dynamic content. In fact, the network can speed up dynamic content delivery if it supports certain functions. For example, G-Core Labs CDN delivers dynamic and static content equally quickly.
  2. We have 6,000+ peering partners and excellent connectivity. This gives us the opportunity to build the best content delivery routes and transfer data as quickly as possible.
  3. We use the HTTP/2 protocol that is much more efficient than all previous HTTP versions. Its main advantage is that it establishes only one TCP connection to transfer all file types.
  4. Our CDN supports WebSocket, a real-time data transfer protocol. If you deliver dynamic content that is constantly changing, using WebSocket is a must.
  5. We also use the IPv6 protocol that works faster than IPv4. You can use this version on our CDN even if your equipment hasn’t been optimized for IPv6 yet.
  6. We know how to compress content on the go using CDN. This happens during the content delivery process thanks to using such algorithms as Brotli, Gzip, and WebP.
  7. We have flexible caching settings. While we also care about content security and can take over user authentication functions to reduce server load.
  8. Together with CDN, you can enable an object storage allowing you not only to deliver data fast but also to store them.

Use our CDN to deliver dynamic content faster than your competitors. Subscribe to a free plan or use a free trial period on any plan to experience excellent content delivery speed.

If you don’t know which plan to choose, schedule a free consultation with our managers.

Subscribe to a useful newsletter

Favorable offers and important news once a month. No spam