
Throughout the year, Russians regularly go on holidays – New Year holidays, May holidays, and other shorter weekends. This is a traditional time for binge-watching series, spontaneous purchases, and sales on Steam. The retail and logistics companies experience increased pressure during the pre-holiday period: people order gifts from online stores, pay for delivery, buy tickets for trips, and communicate. Calendar demand peaks serve as a good stress test for online cinemas, gaming portals, video hosting services, and streaming music services – during the holidays, all of them operate at full capacity.
We explain how the uninterrupted availability of content is organized, using the online cinema Okko as an example, which relies on the capabilities of the Linxdatacenter data center.
Previously, additional equipment for local hosting was purchased to handle seasonal spikes in consumption, often with a surplus. However, when the "Zero Hour" arrived, it often turned out that companies either could not or did not have time to properly configure servers and storage systems themselves. Addressing these issues amidst unexpected situations proved to be challenging. Over time, it became clear: demand peaks for content and online services can be efficiently managed with the help of third-party resources, which can be acquired on a pay-as-you-go model – paying for the volume actually consumed.
Today, almost all companies that anticipate a surge in demand for their resources during holidays (the so-called burst) order an expansion of bandwidth in advance. Those companies that host applications and databases on data center resources increase computing power in the cloud during holiday peaks, reordering the necessary virtual machines, storage volumes, etc., from data centers.
How to avoid miscalculations

To prepare for peak loads, coordinated work between the provider and the client is essential. Key points in this collaboration include accurate forecasting of load spikes in terms of timing and volume, careful planning, and the quality of interaction with colleagues inside the data center as well as with the IT specialists on the content provider's side.
Organizing a quick allocation of resources necessary to ensure that the new season of your favorite series streams smoothly on your tablet is supported by a range of solutions.
- Firstly, there are load balancers: these software solutions carefully monitor the server, storage system, and network load levels, allowing for the optimization of each system's performance for specific tasks. Balancers assess the availability of both hardware and of virtual machines, preventing system performance from dropping on one hand, and avoiding infrastructure 'overheating' and slowing down on the other. This maintains a certain level of resource reserve that can be quickly redirected to address urgent tasks (a sudden surge in requests to the video content portal, an increase in orders for a specific product, and so on).
- Secondly, there's CDN. This technology allows users to access content from the portal without buffering delays by providing access from the nearest geographical point to the user. Additionally, CDN mitigates the negative effects on data transmission caused by channel overloads, connection disruptions, packet losses at channel junctions, etc.
The all-seeing Okko

Consider the example of preparing for the holiday season at the online cinema Okko, utilizing our platforms in Moscow and St. Petersburg.
According to Alexey Golubev, the technical director of Okko, the company experiences high seasons around calendar holidays, as well as periods when major movie releases from studios are launched:
"Every year during the holiday season, Okko's traffic volume grows by approximately twice compared to the previous year. So, if the peak load last New Year's season was 80 Gbps, then for 2018/19 we expected 160 – a traditional doubling. However, we received over 200 Gbps!"
Okko always prepares for peak load slowly, throughout the year, under the project code-named 'New Year'. Previously, Okko used its own infrastructure, with a content delivery cluster on its own hardware and software. Throughout the year, Okko's technical specialists gradually purchased new servers, increased the bandwidth of their cluster, anticipating a doubling growth annually. Additionally, they connected new uplinks and operators – apart from major players like Rostelecom, Megafon, and MTS, they also connected traffic exchange points and smaller operators. This approach allowed them to deliver services to the maximum number of clients in the shortest route.
Last year, after analyzing the cost of equipment, labor for expansion, and comparing these with the cost of using third-party CDNs, Okko realized it was time to try a hybrid distribution model. Following a twofold increase during the New Year holidays, there is a drop in traffic, with February being the lowest season. Thus, their own equipment remains underutilized during this time. Traffic drops are mitigated by summer, and a new surge begins by the fall season. Therefore, in preparation for the new year of 2019, Okko took a different path: they improved their software to distribute the load not only to themselves but also to external CDNs. Two such CDNs were connected to handle excess traffic. Okko’s internal IT infrastructure bandwidth was prepared to withstand that double growth, but in case of resource overflow, partner CDNs were ready.
"The decision not to expand their own CDN saved Okko about 20% of the distribution budget in CAPEX. Plus, the company saved several person-months by shifting the equipment setup work to a partner." — comments Alexey Golubev.
The distribution cluster (internal CDN) at Okko is implemented on two sites: Linxdatacenter in Moscow and St. Petersburg. Complete mirroring of both content and its caching (distribution nodes) is ensured. Accordingly, the Moscow data center handles Moscow and several regions of Russia, while the St. Petersburg center covers the Northwest and the remaining territory of the country. Load balancing occurs not only regionally but also depending on the load of nodes in each particular data center, taking into account the film's availability in the cache and several other factors.
The consolidated architecture of the service looks like this in the diagram:

The physical service and product development support consist of approximately ten racks in St. Petersburg and several racks in Moscow. There are a couple of dozen servers for virtualization and almost two hundred 'iron' servers for everything else – distribution, service support, and the office's own infrastructure. The interaction between the content provider and the data center during peak loads does not differ from the usual operation. All communication is limited to a ticket to the support service, and in the event of an emergency situation, it is handled via a phone call.
Today, we are closer than ever to a truly 100% uninterrupted content consumption scenario online, as all the necessary technologies for this are already available. The development of online streaming is happening very quickly. The popularity of legal content consumption models is on the rise: Russian users are gradually getting used to the idea that they need to pay for content. This includes not only movies but also music, books, and educational materials online. In this context, delivering the most diverse content with the least network delays is a crucial criterion for online services. Our task, as a service provider, is to meet resource demands timely and with a buffer.
Source: habr.com
