IIS 7, Dynamic Compression and tons of AJAX web services means massive performance increases

 

I work on a product called Agility CMS.  Agility CMS is a hosted web content management system - including a web application dedicated to actually editing website content, pages, sitemaps and other good stuff. 

Last week we updated the app moved the whole system to IIS 7 on Windows Server 2008.  We also turned on dynamic compression - which will now work properly on this system since we can now easily limit dynamic compression based on mime-type (not just file extension).  Meaning all of our attachment handlers don't get messed up when delivering zips or other compressed files to silly browsers like IE7.

Dynamic Compression in IIS 7 is dead simple - its available through the IIS Admin, as you might expect.



 

But, behind the scenes, the dynamic content compression setting just tweaks a setting in the system.webServer section of the web.config:


Cool.  Just make sure that you have Dynamic Compression installed... 

 

What does it mean though?  How much real benefit is there to dynamic compression in an AJAX style application?

In my preliminary tests (using Fiddler and FireBug) I was able see close to a 40% decrease in bandwidth overall.

The human result is a much more reactive experience on the application, which is suddenly much snappier.  I can tell that people are being WAY more productive, too; my SQL server has jumped from an average 5-6% CPU usage to closer to 8-10%.  I guess that's a good thing...

I shouldn't have been so surprised at this remarkable change in the overall bandwidth of the app, because we use dynamic compression with IIS 6 on our regular websites, but we never seen any thing close to a 40% bandwidth decrease.  I am guessing this is because a regular website relies more on pre-compressed stuff like JPEG and PNG files, as opposed to tons of web forms with copious amount of HTML being sent back and forth to the server as part of the basic CMS operations.

I can't wait to see our hosting bill at the end of the month - I'm hoping to be pleasantly surprised once again!

More later - joel

3 Comments

  • You ought to explain the cons of turning compression on and how to only compress for certain browsers.

    My experience is you should set rules as to NOT compress pages for IE5,IE6 or IE7. Search for "gzip ie page hangs". MS has released some sps to try and fix the issues but they don't always work and you can't guarantee users have installed them. I've dealt with trouble tickets where if we turn compression on, pages will hang for certain users. Perhaps as low as only 1% of them but they do hang. Hoping that for IE8 MS finally fixes it. BTW tried setting a rule to only compress for IE7 - no luck - pages still hang for certain users.

  • Good point, Dave. I haven't had any issues with IE7 on this app (and we only support IE7 and FF at the moment) but some of our other sites have had issues where zip files get completely messed up with compression.

    Possibly IIS 7 and IIS 6 are different in this regard.

  • As soon as we (developers) or clients turn on dynamic compression, characters start disappearing in our JSON and we have to ask everyone to turn it off. This is regardless of browser (IE8, Firefox 3.6). I'm amazed that it actually works for anyone at all.

Comments have been disabled for this content.