Big boost thanks to Railo

February 14, 2008 · By Gert Franz · 4 Comments

Before Christmas, Railo took another leap forward when it comes to major websites and feasibility. One of Germany's major IT-websites (www.pcwelt.de) which is created by IDG Communications AG, has been relaunched with Railo 2.0. PCWelt records around 50,000,000 pi per month.Given the results of some tests with a similar site, where the delivery time of dynamical sites could be improved by factor 2, IDG decided to move their complete live environment to Railo 2.0. The compatibility to the CFML standard was one of the main requirements, since a CMS already in use needed to be working flawlessly with Railo as well.

The environment consisted of a 12 CFML server cluster with 4GB of ram and a hardware load balancer in order to serve the high traffic. The switch to Railo was planned for the beginning of 2008 but had to be advanced to December 18th, since some new applications and high traffic kept the application and database servers at a level of >80% CPU load.
Thanks to the successful testing with Railo in the preceding months IDG was able to switch the engine without having to debug and fix large parts of the application.

An estimate of around 0.5% of the code needed to be touched. This was mainly for compatibility reasons. I must admit there were some Railo errors (mainly with web services) that needed to be fixed as well. But anyhow, here are some examples:
  • <cfinclude template="something.cfc">
    <!--- Railo only allowed .cfm's to be included --->

  • <cfstoredproc ... dbvarname="...">
    <!--- DBVarname is deprecated and Railo used to complain while compiling, this attribute now is ignored by Railo as well --->
    <cfset oObj = CreateObject("component", "somecomponent")>
    <!--- While somecomponent is located somewhere in the CustomTag directory --->
    Railo still does not support implicit searching for .cfc's since:
    1. it is unperformant
    2. it is non descriptive
    3. may lead to unexpected errors
    So in order to get the above code to run correctly one should either have the file somecomponent.cfc inside the same (calling) directory, or write something like follows: <cfset oObj = CreateObject("component", "customtagdir.subdir.somecomponent")>
  • Railo had a problem with the function HTMLEditformat() which was used to store data inside a XML struct. This by itself works, but one should use XMLFormat() in order to store data in a XML struct. We incorrectly assumed at first that HTMLEditFormat() uses "HTML 4.0" as the encoding version but CFMX uses HTML 2.0 as the default, if no second parameter is passed. This lead to some unexpected issues with german umlauts like ü or ö. So we had to fix this bug.

  • Other issues arose since Railo is much more restrict when it comes to checking the syntax of code. But if a code runs with Railo it will certainly run with CFMX except if you are using Railo specific functionalities.

So on December 18th at 12:00 we were able to perform the switch. The results were quite pleasant since we expected a decrease in load time of around 30%. But the measurements showed that with Railo the pages were delivered around 4 times faster than before the switch.
In addition the number of queries that were sent to the database dropped by 50%. This was due to a dramatic improve in caching behavior. I must note that no code was optimized for this matter. One reason is, maybe that in CFMX you can only cache up to 9999 queries at a time (size of the field). Railo caches a certain percentage of the memory. This might be one large chunk of the performance improvements Railo brought.
One issue appeared at runtime, because the CMS uses some SQL Server 2005 specific SQL statements which the embedded driver did not support. After updating to the latest JDBC SQLServer 2005 driver from Microsoft no other issues appeared.

Of course there are always small problems like missing libraries or other configuration issues one stumbles upon when changing a certain engine. Every error, since looking completely different in the Railo layout makes users suspicious, that the change of the engine was cause of the error. After all the switch to Railo can be called a huge success.

Here are some measurement charts from some really complicated requests to the live site:
The first chart displays a measurement over a day from the day before the switch.
The second chart is the measurement from the day we switched to Railo. As you can see the switch was made at 14:00 on December 18th.
The chart above was recorded yesterday.

This is the hard- and software used for the live system of www.pcwelt.de:

DescriptionOld environmentNew environment
Number of servers124
HardwareSUNX4100SUN x4100
Processor2x Xenon 3 GHz2x AMD Dual Core AMD OpteronTM 2,4Ghz
Memory4GB RAM4GB RAM
Network4x GBit NIC /server4x GBit NIC /server
Operating systemRedHat Linux Enterprise 4.2RedHat Linux Enterprise 5.1
WebserverApache 2.052Apache 2.2
Application serverJRun4Caucho Resin 3.1.3 Professional
ClusterNo / F5 Loadblancer für JRunYes, Resin
CFML EngineColdFusion® MX 7.0.2Railo 2.0.0.034
CMSNBSP - Sitefusion 3.5NBSP - Sitefusion 3.5
DatabaseMSSQL Server 2005MSSQL Server 2005 (the same cluster)
Average response time1750 ms441 ms
Improvement factor3.97
Response time improvement in %74.8%

Tags: Performance · Railo 2.0 · Websites

4 responses so far ↓

  • 1 Jeff Gladnick // Feb 14, 2008 at 9:35 PM

    Wow! That's quite impressive, and you guys should be quite proud of yourselves. Railo has certainly come a long way, and for all but the most Adobe tied in users seems to be a perfect replacement for CFMX. Congrats, and I'm excited to see more of these studies in the future.
  • 2 Michael Sharman // Feb 15, 2008 at 3:58 AM

    Ditto, amazing results!
    I've been keeping my eye on Railo for a while now as I'm sure a lot of CFML'ers have.
    Keep up the great work!
    p.s. I'd love to hear if there was any result from the trouble Aaron and Dave over at Instant Spot had?
  • 3 Gert Franz // Feb 15, 2008 at 10:10 AM

    Hi Michael,
    we were able to fix the error whithin a day after it was reported. Unfortunately they reported it only after they had already switched to CF8. It was a problem with methods returning NULL values.

    Gert
  • 4 Larry // May 19, 2008 at 4:46 PM

    Congrats, and I'm excited to see more of these studies in the future.

Leave a Comment

Leave this field empty: