What is CDN and what for we need it?
CDN (Content Delivery Network or Content Distribution Network) is an geographically distributed infrastructure and cooperating servers, which are enabling use of internet services (such web, streaming, downloading etc.) with a set of optimised technics for faster access to data compare to storing them on the own server or compare with using the common hosting service.
Disadvantages of using a own server are latency in accessing the page from different geographical locations (waiting for the first answer), data downloading speed, difficulty with solving scalability by unexpected or short term increase of parallel accesses (accessibility of software actualization, live streaming etc.) and also the time needed for maintaining the own server and its security. Taking into consideration that the time nowadays is very important factor – for storing data on own server there is possibility of better hardware, paying for better access, improve proxy cache and so on – the question is if it would be more worthy lo leave this part CDN and care about improvement of own service. Although the enormous effort putting into the maintenance of the own server does not solve the problems of scalability and users access from different parts of the world, because “the server simply stays on one place”.
CDN is primarily used for hosting static content (entire CDN can be used also for the dynamically generated data). At first it was about web, software and its actualizations. Today, with spreading of OTT services, CDN is being used for distributing movies, which causing faster video stream delivery to users. Common OTT application requires big amount of metadata and pictures to create users interface. Delays with their downloading in mobile or Smart TVs applications bringing unsatisfied users and negative wating for the service.
CDN has an specific meaning for Smart TVs where (apart of Samsung platform) is necessary to host an application, it means an application is not installed in TV like it is with the mobile. On TV is only locally stored a small set of information: web URL (link to the hosting server), name of application, icon and some additional data. Application is always being downloaded when starts.
Basic CDN architecture
Every CDN consists of three basic elements – an origin server, edge servers and software for routing the requirements. The Origin server contents original data for distribution to users (films, installation packets, pictures). These data are redistributing through the vast edge server networks, which are places appropriately geographically and content an data copy from the origin server. The type and amount data replicated on edge server depend on geographical position (for example in case of OTT could be here more required movies with Czech subtitles) and on frequency of such data repeated requirements. Cache content is continuously updated and improved. Edge server can content even 100% copy of origin data. The third part CDN is routing the requirements, somehow an network intelligence. In practice it works that applications coming on CDN send DNS requirement for transferring CDN domain name on IP address. The difference from a common transfer is that by the transfer on IP address is important the user’s geographical location or server occupancy. DNS server valuates these information and returns edge server IP address back to an application, which supposed to be executed fastest. CDN can be used for routing requirements more tools like for example HTTP redirect:
GET /vod_io/f_7/7.ism/Manifest HTTP/1.1 User-Agent: samsungsmooth-agent/1.1 Host: 184.108.40.206:12222 Accept: */* Accept-Encoding: identity HTTP/1.1 307 Temporary Redirect Location: 220.127.116.11/kaz2lmei5qcig5gdartad0qitjnstzqg/0000002/GlobalManifest.ism/Manifest Cache-Control: no-cache GET /kaz2lmei5qcig5gdartad0qitjnstzqg/0000002/GlobalManifest.ism/Manifest HTTP/1.1 User-Agent: samsungsmooth-agent/1.1 Host: 18.104.22.168:1002 Accept: */* Accept-Encoding: identity HTTP/1.1 200 OK Server: BKS400 Date: Fri, 03 May 2013 06:29:09 GMT Content-Type: text/xml Content-Length: 4569 Connection: keep-alive Cache-Control: no-cache Expires: Fri, 03 May 2013 06:29:08 GMT
But it is important to realize that the CDN does not solve everything. An important factor in the distribution of content is the connection speed to the last section of the network, ie between CDN edge server and terminal equipment (sometimes referred to as the last mile). In this section is no effect by using CDN on the data transfer speed. Everything depends on quality and transfer speed provided by supplier of internet connection (cable operator, mobile network and so on). So the best optimized CDN solution will not enable video streaming if the user will connect by EDGE or if the speed on ADSL or WiFi drops down under 512 Kbps. The next CDN advantage is robustness – even during extensive outages connection can CDN, albeit more slowly, serve users finding other ways to send data. To care operator CDN may also be appropriate to entrust the complete content of origin server instead to maintain it by its own. Favorite service is Amazon S3, which is used inter alia by Netflix. The content here is regularly backed up and smooth running of the service do not jeopardize your own outages of server, which could be for example the physical damage to the storage device during flooding.
You will not find the price for traditional suppliers of CDN like Akamai, Limelight or Level3 on their websites – it is based on individual deal with every client. An opposite approach has Amazon CloudFront service, where could be the price calculated online. Similarly, the cost is “transparent” for smaller CDN or by the companies that are shortly on the market.