Server side caching for large websites

Chapter comments how to improve web application and overal website performance using server side caching.

We have described several caching models with their pros and cons and examples, also where they have been used on Smooth Step CMS.

Fri, 2 May 2008 14:18:00 CET by SmoothStep
Comments 1 | Post a comment | rated 4 / 5

What is web application caching?

Server side cache is a software component that allows saving and reading temporary information that takes a long time to compute.

Such technology is used to improve website speed:

  • During first request information is generated and stored to cache files.
  • During following requests data is simply loaded from website cache, bypassing computing.

To speed up dynamic website data caching mechanism must be equipped with some kind of destructor that would delete cache data when website has been changed; otherwise it would prevent latest information from being displayed.

Expiring cache

Such mechanism adds expiry date to cache file; cache is recalculated if sever date surpass cache date.

Expiring cache is very useful for web applications that contact 3rd party server to receive data that changes continuously.

Let's say we are building weather plugin that contacts weather server to get forecast for 7 days. It takes somewhere 0.5s to 3s to contact weather station, so if we would have an application that waits for weather data with each request our website would slow down to weather server response time.

By using expiring cache we have to contact weather server only once a day with first request, further requests are retrieved from website cache in less than 0.01s

Persistent cache

Persistent caching provides best performance for internal server computing. Functions that provide server side website update, also delete cache files so they are reloaded only if information is changed.

What do we store in web cache?

Cache engine is used to store a set of variables depending of what are the slow parts of the system. Let's say we need to display database table: we can cache database records (SQL cache) or whole HTML code (buffer cache) as a variable.

Caching database records

We can cache database records needed for our table, so that database server would be contacted only when database is changed.

Caching buffers

If we choose a to store whole HTML code as a variable we might gain a bit of website speed but our table might loose flexibility if we need to display some dynamic content in one of the cells.

Buffer is very useful to display complex navigation menus as their computing requires more than one database call.

Caching technology in Smooth Step CMS

We took advantages of different caching technologies and implemented them to our content management system. It uses expiring cache to display weather forecasts, manual cache for website and CMS output. Database records and buffer arrays are both used to achieve best possible website performance. Caching technology allows us to develop large websites (might contain thousands of pages) that load fast.

Comments

jhon from sweden

Date: 12/31/2008 11:08:00 PM, rated: 4

Great article about the web application caching so the users will take advantage from this...

Post a comment

Here you can share your thoughts with us by posting a question/comment; also rate this article by clicking on one of five stars below. Your e-mail will not be shown to protect your privacy. Required fields are marked with *

 

CMS Video Demo

Smooth Step CMS video demonstration

Basic features of our content management system can be seen in video section.

View demos »

Web Packages

Simple websites

Basic package

Package includes simple menu, unique design and our CMS - Low budget solution ...

More info »

Content rich websites

Medium package

Content rich website design - multiple sections, multilanguage support and our basic SEO ...

More info »

Online business ready

Advanced package

Multilingual e-commerce website design - static product pages, RSS feeds and our advanced SEO ...

More info »

Latest articles

  • Platform monitoring

    Posted: 2008-06-15, rated 3/5

    introduction to the first step of web application tuning - monitoring. Information regarding analysis, solutions available and further steps are mentioned.

    Post a comment | Read

  • Choosing website page names

    Posted: 2008-03-20, rated 3/5

    How to use static page names to improve search engine ranking and overall website quality.

    Post a comment | Read

  • Popular web browsers

    Posted: 2008-01-25, rated 3/5

    A list of free modern web browsers with their advantages, security and supported operating systems - Chapter offers free downloads.

    Post a comment | Read

© Smooth Step 2007-2008. All rights reserved.

xHTML | CSS accessibility standard - Sitemap