Load Resistance

DIAFAN.CMS has always been very popular thanks to its speed, hosting efficiency and small size of the installation package. The system showed effective results during internal testing, and now independent experts have confirmed this quality.

Load resistance: Round 1

In November 2014, the CMS Magazine portal published the results of a research conducted by specialists from load testing service loaddy.com. The results showed that DIAFAN.CMS was ranked first in terms of load resistance.

Results of the first round of load testing of DIAFAN.CMS

The different CMSs that were load tested criticized the methodology of the tests adopted. They noted that each content management system must be optimized and adjusted to achieve high loads. Therefore, loaddy.com decided to hold a second round of load testing, this time incorporating the wishes of the test participants, and, moreover, allowing participants to configure their systems as they want.

Load resistance: Round 2

The second round of testing was held in April. Before the load testing was carried out, each of the CMSs optimized their system on a separate dedicated server. Running ahead, DIAFAN.CMS was again ranked first in the second round. However, the performance this time around was much higher than the first round. Second round results

Results of the second round of load testing of DIAFAN.CMS

In the second round, DIAFAN.CMS specialists were allowed to access the server under load. Moreover, loaddy.com provided «traffic» of 1000 concurrent users. Therefore, the DIAFAN.CMS team were able to develop and deploy a feature dubbed «Extreme caching» in DIAFAN.CMS.

The performance of this new «Extreme caching» option in DIAFAN.CMS surprised even the most seasoned administrators at loaddy.com

In the first round when «extreme caching» wasn't there, DIAFAN.CMS hardly withstood up to 500 concurrent users (which was nevertheless the best result among other CMSs in the first round) with a response time of 3.89 seconds.

First round of load testing of DIAFAN.CMS

In the second round, «extreme caching» enabled the system to withstand a load of 1000 concurrent users with a response time of 0.4 seconds!

Second round of load testing of DIAFAN.CMS

This indicates that with 1,000 concurrent visitors, DIAFAN.CMS feels completely at ease and the hosting server is almost not loaded.

«Extreme caching» algorithm

Of course, «extreme caching» has some shortcomings. This option is not recommended for use for a «live» and active frequently updated website. But it will be suitable as a tool for significant reduction of load on the hosting server during a surge in site traffic.

To understand how «extreme caching» works, you need to know how a normal caching works in DIAFAN.CMS. In summary, DIAFAN.CMS saves parts of a site in the /cache/ folder in the form of static files. It then uses these site parts when constructing the site. Some of these parts are: site blocks, module blocks, lists of comments branches, etc.

So what really starts happening when the «extreme caching» option is enabled? In the DIAFAN.CMS kernel, the system checks whether the page requested for by the user is present in the extreme cache. If present, the page will certainly be displayed and and the code will stop. If the requested address is not in the cache, the site page will be generated classically but its full copy will be immediately saved in the cache in a static form. Completely. That is, if a user opened a page of any product item for the first time, that page is saved in the extreme cache. Then it will be subsequently showed to all other users from there. So a page is generated in a normal way only once with a full load on the hosting server. For the other remaining 999 times, the page is not generated again and thus the hosting server witnesses no load. The page will be loaded as a static HTML file, without any load on the mySQL and hosting servers.

If something is updated in a page stored in the cache, for example, a comment is added, that page is deleted from the extreme cache to be generated all over gain. The extreme cache is cleared whenever the site administrator does something in the administrative part, such as adding a product, news, or when he provides some answers to questions. In these cases, the extreme cache is deleted and a new one formed. So that's how «extreme caching» works – if out of 1000 visitors, 99% of them just view texts, product cards and other popular pages, then there is no need to each time generate a page using all the server resources.

Now with respect to the downside of «extreme caching», if a buyer puts a product in the shopping cart, he immediately sees the phrase ' shopping cart (1 item)', and this means that Ajax has been triggered. However, when the buyer views another product, he’ll see in the shopping cart block the phrase 'shopping cart (no item)', since the cache was generated for the general page for that item. Moreover, the current checkout page with the address site.ru/shop/cart/?544548 (a randomly generated url) will open since this page is not in the cache. Therefore, the system will rapidly generate the shopping cart with all the services, and the user will easily place his order.

Therefore, it is not recommended to constantly use the «Extreme caching» option on websites with forums, personal profiles, correspondence and active user communication, as well as online stores, where a user can place an order for several items.

You can enable the «Extreme caching» option in the «Site settings» module.