No DB CMS to Improve Web Server Performance
This article discusses reducing server load when running a Content Management System (CMS) to drive a website. The solution dicussed here is to move to a no database CMS. The most popular CMSs, such as WordPress, Drupal, Joomla and DNN use a database (DB) to hold website content. One way of improving web server performance is to remove the database element.
A Simple Flat File CMS Without a Database to Reduce Server Load
Why a flat file CMS vs database? Using a no DB CMS can reduce the memory footprint and code execution times for a page request. This can improve the performance of a web server under heavy load. A no DB CMS, also known as a flat file CMS, is particularly useful for limited resource web servers such as shared hosting plans or Virtual Private Servers (VPS).
Popular CMS Advantages and Disadvantages
The popular CMS packages provide several advantages:
- Easy to install.
- Powerful features.
- Website content is easily added and changed.
- Limited technical skills required.
- Free with most website hosting plans.
- Supports multiple users.
But, as with most things, there are disadvantages as well:
- Under the friendly interface they are more complex and use more server resources than simple HTML only (static) web pages.
- They require frequent updates and maintenance due to new version releases.
- They may require plugins to add specialist functionality.
- They provide a lot of code to cover functionality that may never be used or required.
- You have to be connected to the server to use them, admin tasks also consume server resources.
- Their popularity makes them a target for hackers.
They are overkill for minimalist style websites maintained by technically competent personnel. Website performance is one of the factors that determine search engine rankings. If a website becomes popular the hosting hardware has to do more work to serve up the page requests. If the number of requests exceeds the capability of the hardware the response rate increases and users think that the website is slow (and may decide to go elsewhere). Web server hardware performance is dependant upon several factors:
- CPU usage.
- CPU speed.
- The amount (volume) of data being processed and sent or received.
- Data transmission rate for both the network and hardware input and output (IO) rate.
- Amount of memory being used (physical and virtual).
There are limits to all of these, the more work the web server does the closer to the limits it gets. When the hardware reaches a limit any further requests have to be queued. If the queue gets too long the user does not get a response and thinks the website has crashed. For websites on cheaper shared hosting plans the limits can be quite small. Here’s an example of a website hitting an IO limit:
Improving Web Server Performance
One way of getting better performance out of a web server is to reduce the amount of work it has to do to process requests. A CMS that uses a DB has several layers of code, reducing the amount of code that has to be loaded and executed can improve the rate of request processing. One way to do this is to use a no DB CMS, getting rid of the database code layer:
When searching for a simpler, flat file, no DB alternative to WordPress, Drupal, Joomla et al. the results will throw up a whole host of choices. Some of the alternatives to the likes of WordPress are free, and some require payment. But be careful, many of these simpler CMSs still use some form of database. You need to look for a CMS that uses the server’s file system as the storage mechanism. With such a CMS each web page on the website is usually stored in its own text file and/or folder, hence the term flat file CMS. These CMSs can still be feature rich by using a template language, such as PHP. An example of such a feature filled no DB CMS is ↓markdown↓ CMS, the CMS that runs the Tek Eye website.
Offline Website Building
No not hand-coding HTML, or using a WYSIWYG editor, such as Microsoft Expression Web, which usually produce horrible HTML. Another alternative to the popular CMSs is to use a site generator package.
Site generators have the advantage of allowing work on the website without having to be connected to the web server (which also helps with server load). Site generators store content on your local machine (in databases or flat files). The website content is updated on the PC and the site generator is run to produce the web files. These are then synced, via FTP or HTTP, to the web server. Site generators pre-date CMSs and come from the early static page days of the Internet in the late 1990s. A list of site generators can be found at Static Site Generators. A site made up of static web pages is very fast and very resource efficient.
Remote, offline website editing helps backup the online website. The offline files are a copy of the online files, plus using a cloud syncing service, like Git, Dropbox, OneDrive and others, can create a third backup automatically.
Finally there is a way to use a CMS without being logged into the web server. Use a no DB CMS running on a local web server (e.g. using IIS Express on Windows), then synch it with the hosting web server once the local updates have been made, combining the power and simplicity of a no DB CMS with the local working and advantages of a site generator.
- Build a Website from Scratch with ↓markdown↓ CMS, an example of a true no DB CMS.
- For a full list of all the articles in Tek Eye see the full site Index.
Author:Daniel S. Fowler Published: Updated: