3

What Is Azure Content Delivery Network Service?

 1 year ago
source link: https://dzone.com/articles/what-is-azure-content-delivery-network-service
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

What Is Azure Content Delivery Network Service?

A distributed network of servers known as the Azure CDN is used to cache and store material so that computers can view it worldwide.

Jan. 11, 23 · Review
Like (1)
761 Views

A distributed network of servers known as the Azure CDN is used to cache and store material so that it may be viewed by computers all over the world. Geographical separation between a website visitor and the server that hosts the site can significantly increase latency. With the goal of reducing latency, Azure CDN servers are situated close to end users. Azure CDN allows a client seeking that content to obtain it from the location to which they have the lowest latency and maximum bandwidth connection rather than retrieving it from a single site that may be on another continent or in another hemisphere. Point-of-presence (POP) locations are the server locations that house content repositories.

By utilizing various network optimizations with CDN POPs, such as route optimization to avoid Border Gateway Protocol (BGP), Azure CDN may also speed up dynamic material that cannot be cached.

Benefits of Using Microsoft Azure Content Delivery Network

  1. End users will experience better performance and a better user interface, especially when utilizing apps where loading material requires many round trips.
  2. Large scaling to better handle sudden high loads, such as the beginning of an event for a product launch.
  3. Distributing user requests and directly serving content from edge servers to reduce the amount of bandwidth going to the origin server

The Following Features Are Provided by Azure CDN

  1. Accelerate the distribution of dynamic files using a website.
  2. Support for HTTPS custom domains: Enable secure connections to unique domains like adatum.
  3. View the essential analytical data in the Azure diagnostics logs and transfer the information to a Log Analytics Workspace, an Azure Storage account, or an Azure Event Hub.
  4. File compression: Improve performance by lowering the amount of data traveling via the network.
  5. Geo-filtering: On your CDN endpoint, create rules that leverage pathways to allow or deny content from nations or regions.

Azure CDN Has Several Advantages

  • With big or streamed files, performance is better, and the user experience is smoother.
  • improved performance when using programs that send material across several round trips.
  • Greater scaling, especially when dealing with loads that spike quickly, like during worldwide launch events.
  • Decreased origin server traffic.

Workings of Azure Content Delivery Network

A dispersed network of computers known as a CDN is capable of effectively distributing online content to users. The way that Azure CDN functions is as follows.

Azure CDN functions
  1. A URL with a unique domain name, such as endpoint name>, is used by a user (Alice) to request a file (also known as an asset). azureedge.net. This name may be a custom domain or an endpoint hostname. The DNS directs the request to the POP that offers the best performance, which is typically the POP that is nearest to the user geographically.
  2. If none of the POP's edge servers have the file in their cache, the POP asks the origin server for it. An Azure web app, Azure Cloud Service, Azure Storage account, Azure IaaS virtual machine, or any other publicly accessible web server can act as the origin server.
  3. An edge server in the POP receives the file back from the origin server.
  4. The file is cached by an edge server in the POP, which then sends it back to the requester (Alice). Until the time-to-live (TTL) indicated by its HTTP headers expires, the file is still cached on the edge server in the POP. The default TTL is seven days if the origin server didn't specify a different one.
  5. The same file can then be requested by additional users by using the same URL that Alice used and by directing them to the same POP.
  6. The POP edge server returns the file immediately from the cache if the file's TTL hasn't run out. A quicker, more responsive user experience is the result of this approach. 

Azure CDN Cache Behavior

The files on a website that is published through Azure CDN are cached until their TTL has passed. The HTTP response from the origin server's Cache-Control header, which is included, establishes the TTL duration.

Azure CDN establishes a default TTL if you don't provide one for a file. However, if you have configured caching rules in Azure, you can override this default. The standard TTL values are as follows:

  1. Optimized general web delivery: seven days
  2. One day for large file optimization.
  3. Media streaming improvements: a year

An Azure CDN edge node will typically serve an asset until its TTL expires. When the TTL expires, and a client requests the same asset, the edge node re-connects to the origin server. The TTL will be reset as the node fetches a new copy of the object.

Any caching system must be able to manage when the material is refreshed because a cached resource may be ineffective or outdated (in comparison to a similar resource on the origin server). A cached resource isn't constantly compared to the one on the origin server to conserve time and traffic. Instead, the most recent version of a cached resource is deemed to be fresh and given immediately to the client.

There are two methods for caching files offered by Azure CDNs. These setup options, however, rely on the tier you've chosen. Caching rules in Azure CDN Standard for Microsoft are configured in three different ways at the endpoint level. More configuration choices are available in other tiers, including:

  • Caching rules: Caching rules can be either global (apply to all content from a specified endpoint) or custom. Custom rules apply to specific paths and file extensions.
  • Query string caching: Query string caching allows you to configure how Azure CDN responds to a query string. Query string caching has no effect on files that can't be cached.

Caching rules for the Azure CDN Standard for Microsoft tier is as straightforward as the following three possibilities:

  1. Neglect query strings: This setting serves as the default setting. On the initial request, a CDN POP simply forwards the request and any query strings to the origin server and caches the material. Until the TTL has passed, new requests for the same asset will disregard any query strings.
  2. Queries using query strings are sent straight from the client to the origin server without being cached.
  3. Every unique URL that is generated by a requesting client is cached. Each time this happens, the origin server receives the URL, and the response is cached with a unique TTL. Where each request is a distinct URL, this last strategy is ineffective since the percentage of cache hits decreases.

Compressing Files

Before delivering the files, Azure CDN can increase performance by compressing the files. Upon receipt, the receiving browser decompresses the files. If you activate compression on files stored on your origin server, Azure CDN transmits the compressed files without modification.

Uncompressed files on the origin server are dynamically compressed by Azure CDN (if the files are of a type that can be compressed). The compressed files are then kept on the POP. The client experience and site performance are enhanced by this method. 

Geo-filtering

Based on the country code, geo-filtering enables you to allow or ban information in particular nations or regions. Only the complete site can be allowed or blocked in the Azure CDN Standard for the Microsoft tier. Restrictions on directory paths can also be set up with the Verizon and Akamai tiers. See the list of recommended readings in the Summary unit for more information.

Select Geo-filtering from the endpoint's attributes to configure geo-filtering. Choose Allow or Block from the Geo-filtering box. Choose which nations or areas you want to allow or restrict from the list of country codes.

The Block setting is less lenient than allowed. Access is only given to the chosen nations and regions. The rationale behind Block is to permit access from all nations and locations except those that are restricted. 

Use Cases for Azure Content Delivery Network

  • Adatum can grow its services globally to meet the demand for emergency services during observable natural disasters thanks to several features that Azure CDN provides. The following ways that Azure CDN helps Adatum satisfy their needs
  • Azure CDN helps with massive scaling so that it can better handle huge loads that occur suddenly. Adatum will benefit from this functionality since it will make sure that emergency services may access imagery as a disaster develops and reduce the possibility that Adatum's services will become unavailable at a critical time.
  • As new clients sign up for the service, you can set up Azure CDN resources close to those clients. Adatum can set up a new POP in a location near the new customers rather than building new IaaS VMs to host catastrophic imagery all over the world.
  • Content can be sent to POPs that are proximate to the locations where customers need to access that data, thanks to Azure CDN. Adatum may make sure that a POP in Australia is filled with images relevant to a disaster that is developing there, while another POP in South America can be filled with images linked to situations that are developing there. To prevent customers from outside the region from accessing the data at the Australian POP, the traffic associated with each region's POP can also be geo-filtered. This lowers the possibility that the service will become unavailable due to high demand.

Why You Shouldn't Use Azure CDN

In general, CDNs work best with technologies that use a lot of huge static data, such as photographic pictures. Since natural disasters don't follow a set pattern, CDNs are most helpful in situations where you need to be able to provide content to numerous simultaneous users all around the world. Azure CDN wouldn't offer many benefits if Adatum's material was more dynamic, such as if it offered a service where satellite TV was streamed directly from Adatum servers. This is because, unlike static data, such as pre-recorded video files, real-time live streaming does not significantly benefit from being cached in many locations around the world.

Conclusion

A distributed network of servers known as the Azure CDN is used to cache and store material so that it may be viewed by computers all over the world. Geographical separation between a website visitor and the server that hosts the site can significantly increase latency. With the goal of reducing latency, Azure CDN servers are situated close to end users. 


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK