📜 ⬆️ ⬇️

CDN for 70,000 sites with one button

What comes first to your mind when you hear the abbreviation CDN? Surely, "heavy content", "a lot of video", "terabytes of data", "millions of hits a day."

There are not so many projects in RuNet that are characterized by similar words. Oleg Bunin, the organizer of the HighLoad ++ conference (we trust him in matters of workload :)), recently gave this assessment: CDN is needed in Russia and at the same time economically justified by several dozen sites in Russia.

And what about the smaller sites (which - in fact - the vast majority: online stores, blogs, corporate sites, etc.)? Do they need a CDN? And if so, why is there no rush demand for this service? And is it possible to make a small revolution on the web with a single module in the CMS?
')
Answers to these questions - under the cut ...

Let's start with the question ...

Why ordinary sites do not connect CDN?

In short, it is expensive and difficult.

For example, in the company CDNvideo (one of the few Russian CDNs in general, which at the same time also have a clear price list for services on the site), tariffs start at 3,000 rubles. per month with traffic from 1 TB.

For the owner of the site, choosing between hosting, for example, for 300 and 500 rubles. - expensive.

The connection itself, it seems, should not cause difficulties (configure the DNS, replace local links with new ones), but the devil, as is well known, is in the details. How not to forget to replace all links (they can be generated dynamically by an application, be rigidly written on pages, can be specified in style files (css) and scripts (js))? How to keep development and debugging convenience while working on development servers with local copies? How to update the CDN cache when updating files? In general, everything is not too clear ...

If everything is expensive and difficult, then ...

Does CDN need a regular site?

On the usual site there is no heavy content, which literally “asks” itself in the CDN. Even the most progressive online stores that post on the site, for example, video reviews from customers, most likely just put links to YouTube, and do not keep everything at home.

However, a lot can be “moved” closer to the visitor: all pictures, style files (css), javascript (js), etc. - in fact, almost all static content can be transferred to the CDN. And this is an average of up to 80% of traffic.

In addition to speeding up the CDN network itself by distributing content from the servers closest to the visitors, the site that included the CDN receives additional acceleration on the client side (when the page is rendered by the browser) by distributing requests across different domains.

All modern browsers have a limit on the number of simultaneous connections to one domain (usually - no more than 6).


According to www.browserscope.org/?category=network

Thus, even if the server can render pages at maximum speed, and the client connection speed is high enough, anyway, the loading of all page elements (pictures, scripts, style files) will be carried out with a maximum of 6 threads.

When a CDN is connected, local links are replaced with different domains, and only each individual domain has a limit on the number of connections. Their actual maximum number becomes several times larger (according to the number of domains from which files are loaded).

Speed ​​win is seconds. And what is the practical use of this? For example, for an online store.

The main advantage in performance growth ...

1. On a fast site, higher conversion and more page views.

The longer the page of the site loads, the more likely that the most impatient visitors will not wait for it to load, leave the site and no longer return to it.

There are various studies in which attempts are made to find such potential customers that the site “loses”. For example, an infographic from 5coins says that 25% of site visitors leave a page that takes more than 4 seconds to load:



Having analyzed 150 million hits on 150 sites , GoMez specialists received the following figures: slowing down the page load by 1 second reduces the conversion by 7%, and the number of views by 11%.



All these studies, of course, are not indisputable, they raise questions and research methods, and the numbers obtained. But the main conclusion - “faster website - more views” - seems absolutely fair.

2. In search engines, the position of the fast site is higher.

Search algorithms and results ranking formulas are kept secret by each search engine. However, it is absolutely obvious that search robots indexing websites on the Internet, without waiting for the page to load, will not take it into account in the general search index. In addition, behavioral factors have an increasing importance on search results. And this means that a visitor who has left a “slow” page will automatically lower its weight for the search engine. And finally, representatives of almost all popular search engines in one way or another say that they directly take into account the speed of loading pages in the ranking formulas.

3. A slow site brings direct financial losses during ad campaigns.

You want to actively promote your project. Order for him contextual, banner advertising. Each click costs a certain amount of money. If a visitor to your site came to you on an advertisement, but did not wait for the page to load, then you simply paid for his click.

4. Connecting CDN reduces the load on the main servers of the site.

Since all static content is loaded by visitors to your site not directly from your servers, but from CDN nodes that can cache content very effectively, the number of direct calls to your servers is reduced. On average, for static content, the ratio of the number of requests to the site itself from CDN servers to the number of requests from live visitors to the site is 1:50.

And now - about the magic button for 70,000 sites ...

70,000 - just as many sites work on the 1C-Bitrix: Site Management platform.

A week ago , the release of a new version 12.0 was announced , which will be available to partners and customers in early November.

One of the key novelties of the new version is the integration of the platform with CDN , is available now.

From a client’s point of view, everything looks as simple as possible: first you need to install a new module “Bitrix Cloud Services” through the standard update system (yes, if you have a commercial license), and then in the administrative panel of the site in the “Settings” section - “Bitrix Cloud Services "-" Site Acceleration (CDN) "tick" Enable site acceleration "and save the changes.



Actually everything: after this, links to static site files (images, css style files, js scripts) will be replaced - instead of local URLs, the service names of the CDN servers will be used. You do not need to make any changes to the DNS and do not have to worry about flushing the CDN cache when updating files.

Directly for distribution of content, the network of the Russian CDN provider, CDNvideo , is used in the future , in partnership with which this service is implemented.



How much is?

Not at all. Zero.

The Site Acceleration (CDN) module is a free additional option for any active commercial license for 1C-Bitrix: Site Management. No additional charges other than the cost of the license itself or its renewal.

For each individual license, the monthly traffic limits are determined, which can be transferred through CDN nodes to end users:



And now - the details: how it all works inside.

The scheme of the CDN when connecting one site looks like this:



Each appeal of any site visitor to static content is directed to the nearest CDN site. During the first access, the necessary files are loaded from the source site or specifically for this dedicated node - the origin, and on subsequent calls they will be sent from the CDN server cache. Placing content on many CDN servers and giving it to visitors from the point closest to it reduces the network data transfer route and makes the site loading faster from the user's point of view.

All CDNs work on similar principles, and the source of the content, origin, must be one. How to organize it at once for many sites?

We organized a piece of our own cloud infrastructure (resilient and scalable):



Our small “cloud” in essence is such an origin for the CDN network, proxying the traffic of connected clients through itself and solving several important tasks:


The Site Acceleration (CDN) module itself, working directly on the client site, does the following things:



A small result.

A little more than a week ago, the Site Acceleration (CDN) module became available to developers — 1C-Bitrix partners. Two days ago we opened public access to it for all customers.

During this time about 600 sites were connected. Mostly - online shopping. As well as personal blogs, corporate sites, several large thematic portals.

If your site works on “1C-Bitrix: Site Management” - connect the CDN to it in a couple of clicks , please yourself and your visitors with the speed of work. :)

Source: https://habr.com/ru/post/156033/


All Articles