Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > General Discussions > HTTP Compression Setup on IIS & testing results (ASPX, HTML, PHP, AXD, JS, CSS, XML)
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

HTTP Compression Setup on IIS & testing results (ASPX, HTML, PHP, AXD, JS, CSS, XML)

Feed from this thread
  • Posted on Mar 6, 2007 (permalink)

    It takes about 10 minutes and 1 restart of IIS6 (Vista IIS7 has built in compression) to setup HTTP compression, the  instructions on dotnetjunkes makes it easy.

    However I don't agree with the idea at the bottom of removing the witespace as IIS just adds it back in again while re-starting taking longer to process...

    Within reason the path is simple
    1. Turn on service at Web Site
    2. Create new Web Service Extension for HTTP compression and link to gzip.dll
    3. Allow editing on Metabase.xml while the server is active
    4. Edit metabase.xml <IIsCompressionSchema /> section and add the file types that are in your system.  For mine it was js php aspx html xml css txt axd. 
    5. Set the compression level to be "10"
    6. Restart IIS

    RESULT
    The AXD files are usually the biggest on my site, so any way of reducing them is a bonus.

    Panel-bar and Rad-Splitter AXD files reduced 83K > 20K, 56K > 12K
    The CSS files were reduced 8K > 1K, 2k > 695 bytes, 905 bytes > 403 bytes
    The html/aspx was reduced 16K > 4K

    The RAD-DatePicker AXD files reduced 86k > 21k, 38K > 10K, 46K > 10K
    The CSS for the date picker did not reduce in size.
    html/aspx was reduced from 29k to 7k

    As this is done at a server level it applies to all files... I'm getting excellent  response to all types of files my server has....

    I'd be really interested in anyone else has done any testing with the http compression on IIS.  If they met any browser issues???

  • Posted on Mar 6, 2007 (permalink)

    I've taken things a stage further by adding a RamDisk that the static deflated files (CSS, Javascript, HTML) are kept in.

    Works really well for additional speed but the MS ramdisk.sys is not production worthy.  It crashes and does not always come back successfully after a reboot.

    Does anybody know of a GOOD ramdrive product that works well with 2003?

  • Kevin Master avatar

    Posted on Mar 6, 2007 (permalink)

    We've been using this locally (costs money) for the very same reasons you mention.

    http://www.superspeed.com/ramdisk.php

    The IIS compression module speed optimization is indeed impressive, I'm really curious if it works well on all browser. I'm sure IIS and IE6/7 handshake well, maybe FireFox as well, but how about Safari and Opera? Also, I'm very curious to know how compressed scripts work in AJAX scenarios, i.e. if there are problems if a compressed script is loaded on demand upon AJAX update.

    Great findings- hopefully soon I will have time to experiment with this on our web-farm as well.

  • Posted on Mar 6, 2007 (permalink)

    I'll check out the ramdisk software. Thanks

    Here is a (deleted link) to a MSAJAXPHP enabled site with both .NET AJAX & MSAJAPHP running a simple ASPX page.  Every 10 seconds or so it calls for a php (notes.php) file that updates Recent Notes.   So I am getting no problems with AJAX that is being compressed. It's just a simple test app on my server so don't judge it too harshly!

    As for browsers that can handle it.  Apparently it was about 1999 when it was decided that all new browsers will support http compression.  This page talks about the different types of browser and the support they offer.  Basically all major browsers have support, and if they don't support it then the server will not serve it.

    As a rule of thumb you can assume that if the browser support AJAX then it will support HTTP Compression.

    I've not tried mobile devices yet with this...

  • MB Master avatar

    Posted on Mar 6, 2007 (permalink)

    I have been running compression on my websites for some time now, and I use rad ajax controls. I haven't experienced any problem with any browser, but I cant say that I've tested every combination of browser and rad ajaxified control.

    However, I did choose to use Port80's  zip-enable product, which is basically a nice little GUI tool to manage IIS6 compression.
    http://www.port80software.com/products/zipenable/

    The main reason I used it was that I wanted the solution NOW and didn't have the time to spend working out the details... but it also claims to detect browser compatibility and enable/disable compression on a request-by-request basis, depending on the browser. This might help explain why I've encountered no problems... I don't know.

  • Posted on Mar 7, 2007 (permalink)

    Will check out the software. 

    Do you use HTTP compression on any HTTPS sites? 

    does it compress the html etc before adding the SSL layer?

  • MB Master avatar

    Posted on Mar 7, 2007 (permalink)

    I don't use Secure HTTP on any of my sites, although I have upcomming work requiring this.

    The ZipEnable product uses the underlaying IIS6 compression engine.

    Port80 have a more advanced product that implements it's own compression engine, but I don't use this, as I didn't need the added features, and hence couldn't justify the added expense.

  • Posted on Mar 16, 2007 (permalink)

    I just enabled compression on my web servers. I was hoping for better loading of our contact page that uses a RAD Editor, I can't tell for sure. But it seems to be a little faster.

    A few questions I have for andyk or anyone else really. What file extensions did you put under the Static and Dynamic compression sections in the meta file? I put xml,xslt,js,and css under static and aspx and axd under dynamic, is that correct? are there any other files that could be compressed?

    Other question is how are the dynamic pages cached after being compressed? With database connections and other content changing for almost each load for certain pages, how does it compress the files. Is there a lag?

    Thanks for any info.

  • Posted on Mar 19, 2007 (permalink)

    Brian,

    For the file types I use I did it like this....

    Static
    php, aspx, asp, html, htm, css, js, axd, xml, txt

    Dynamic
    aspx, php, xml, axd

    Can't remember off the top of my head how it handels dynamic files with db access. 

    But it does seem to do the same process each time.  The first time a file is accessed by the client it is recieved un-compressed, but the 2nd time that file is requested it is sent compressed.  So it seems to off-line compress once it finds that the file is wanted. 

  • Posted on Mar 19, 2007 (permalink)

    Norton Internet Security from Symantec stops HTTP Compression with at least FireFox (have not tested IE).  So when you do any testing make sure that you don't have it enabled...

    Other firewall products such as Vista firewall & Zone Labs don't screw with this. 

    I am guessing that norton removes the http header info that allows the server to assess what kind of client has connected to it and therefor what compression can be used. 

    I would be interested if anybody has a ZipEnabled site that I can access to see if that can deal with nortons odditites?

  • MB Master avatar

    Posted on Mar 19, 2007 (permalink)

    I have a ZipEnabled public server you are welcome to play with.

    It's currently running on a standby server, as the main server is down, so it's running pretty slow right now... but it is running compression and is using Telerik components (AJAX, Menu, Tabs, Multiview, Panelbar).

    http://www.triathlon.org.au

    It's written to support FireFox and IE7... with little/no concession to other browsers.

    I'd be interested to see if you have any problems with the compression.

    Cheers,

    -- MB.

  • Posted on Mar 19, 2007 (permalink)

    Hey MB,

    I checked it out and nope my version of Norton does not make it possible to use HTTP Compression.  It only works for the Enterprize Version of Norton according to their support desk. 

    It makes no difference if you are basic gzip.dll on IIS6 or using ZipEnable...  It's down to norton being the agent that stops it using compresson or not allowing the compression negotiation and therefore un-compressed files are served. 


  • MB Master avatar

    Posted on Mar 19, 2007 (permalink)

    Hi,


    I assume that it's negotiating the compression state and still serving uncompressed files to you ??

    The server is supposed to be able to handle the situation where the client will not co-operate with the compression feed.

    So long as you still get fed the page(s) in one form or another, then I'm cool with Norton or whatever doing what it likes, as you can't make every client do what you want.

  • Posted on Mar 19, 2007 (permalink)

    Actually it seems to be a little different than I reported when using ZipEnable & Norton....

    HTML is compressed

    CSS and Scripts are un-compressed.


    So using ZibEnable saves approx 156k on your homepage, where generic gzip.dll usage would not.  therefore another reason to use ZipEnable....

  • Bill O'Neil Intermediate avatar

    Posted on Mar 19, 2007 (permalink)

    I was contemplating a compression solution - and was curious what the opinion was at .NET-specific compression like ASPAccelerator.NET vs something more "broad" like ZipEnable?

  • Poul Henningsen Master avatar

    Posted on Mar 19, 2007 (permalink)

    haven't tried it myself, but a friend of mine is using Port80's httpZip - http://www.port80software.com/products/httpzip/.

  • Posted on Mar 19, 2007 (permalink)

    ZipEnable is port80's "extender" of what IIS6+ has to offer in terms of HTTP compression. Arguably, it is more robust and more effective in CPU usage (since it uses what is built-in).

    For non Windows 2003 Servers, port80 offers the httpzip solution
    http://www.port80software.com/products/httpzip/

    For Windows 2003 / IIS6 they rely on ZipEnable.

    For ASPAccelerator.NET vs ZipEnable, you can check out the following blog post and comments (a  bit old, but stil...)
    http://scottwater.com/blog/archive/HttpCompressionModule/

    I would personally try to make it work using IIS6 only and the instructions andyk posted at the beginnig of this thread and if I fail I would try with ZipEnable.

  • MB Master avatar

    Posted on Mar 19, 2007 (permalink)

    > For non Windows 2003 Servers, port80 offers the httpzip solution
    > http://www.port80software.com/products/httpzip/
    >
    > For Windows 2003 / IIS6 they rely on ZipEnable.
    ---------

    Not quite right.

    ZipEnable is available for Win2003/IIS6 only,  is quite reasonably priced, and makes setting up a compressed server that works, something that even a dummy like me can manage :)

    Httpzip is available for all Win/IIS combinations, is a more powerful and fully featured product than zipenable, but it costs a fair bit more than zipenable.

    Among it's featues is:

  • Real-time browser compatibility checking avoids known decompression bugs on all major browsers -- also supports decompression on client systems running Symantec's Norton Internet Security

  • MB Master avatar

    Posted on Mar 19, 2007 (permalink)

    Just as a follow-up, here is the comparison sheet they produce, comparing native IIS compression, zipenable and httpzip.

    http://www.port80software.com/performance/compressioncomparison

    One of the main differences claimed between using zipenable and just manually configuring native IIS compression, is browser compatibility checking... possibly why my site partially worked with Norton Security.

  • Bill O'Neil Intermediate avatar

    Posted on Mar 27, 2007 (permalink)

    Still looking in to this topic - haven't tried IIS 6.0 native compression yet but I download ASPAccelerator.NET by Inetsoft and found that it broke all my Telerik Controls!  Mainly I think it had to do with the Embedded Scripts and if I could find a way to exclude compression on those items it might work - but has anyone else had issues with compressing the Web Resource scripts?

  • Posted on Mar 28, 2007 (permalink)

    Bill,

    I've been using Native compression for weeks now without issue, MB has been running Zipenable for months without issue.

    I get the feeling that with zipenable and cache write from port80 that it will be as effective if not more than ASPaccellrator.NET. 

    regards
    Andyk

  • MB Master avatar

    Posted on Mar 28, 2007 (permalink)

    Yes, I've been using Port80's ZipEnable and CacheRight for some time now, without any server issues and with no problem supporting Telerik products.

    I could have gotten better performance using their HttpZip ISAPI product (see comparison on other post) but when I played with the white-space and comment stripping (works on both html and css output) I got unreliable results... sometimes breaking my html. Port80 said there were known issues in the code parser/optimiser which would be addressed in the next version, and advised me, that if it doesn't work reliably in my case, just buy ZipEnable for now.

    I'll revisit HttpZip when the next version is released, possibly for IIS-7, as I quite like the basic idea of having all the comments and formatting available for my development output... but having it all automatically stripped out of the rendered production output.

  • Posted on Apr 17, 2007 (permalink)

    Kevin,

    I am interested in getting some more info about the RAMDisk solution.  We too are looking into using RAMDrives.  Currently we have HTTPZip and compress our pages with that, but the RAMDrives sound like they can provide even more performance.

    Did you copy the normal web files (pages, images, style sheets, etc) to the RAM Drive?  Did this, in itself, create much of a performance difference?  Are you using any other caching/compression besides the Superseed software?

    Thanks,

    Shawn

  • Posted on Apr 18, 2007 (permalink)

    Shawn

    Sorry it's not Kevin, but I did a fare bit of testing with the
    http://www.superspeed.com/ramdisk.php product and this an overview of what I found.


    1.  COMPRESSED FILE LOCATION
    Used the RamDisk as the compressed file location.  Pages served even faster.

    2.  LARGE DISK FOR IMAGES
    Put Images website into a virtual directory on the RamDisk.  Images retrieved faster.

    3.  LARGE DISK FOR ENTIRE SITE
    Put Entire site into RamDisk and all things became faster.

    4. TEMPDB FOR MS-SQL
    Put MS-SQL Temp db onto the RamDisk.  Faster database work.

    5. FILE STATUS AFTER REBOOT
    All files including cached files were back on the ramdisk after reboot, no rebuild needed. 

    I am planning to fit it to our site in two locations.  On the webservers and on the database server.  I will also be looking to put the entire website on to the ramdisk along with compression files with a fail-over to disk.

    It's worth getting the 30 day trial they offer and they are very helpful. Good price too ;-D

    Regards
    Andyk

  • MB Master avatar

    Posted on Apr 19, 2007 (permalink)

    I must admit that I've looked at this a number of times, but always struggled to work out how to apply it to my sites, given their sizes and the cost of RAM.

    As an example... one of my sites consists of:

    - Base Site:    ~ 200MB  (growing slowly)
    - Data Files:    ~ 2GB     (growing fast)
    - DataBase:    ~ 30GB    (growing fast)

    I find it hard to see where the RAMDISK could be effectively allocated into such a site, but would be intersted to hear what others with larger sites do.

  • Posted on Apr 19, 2007 (permalink)

    Indeed - in a typical web-site, the bottleneck is usually SQL queries and I do not really see how you can place an SQL Server database onto a RamDisk and what are the security / data integrity riskss.

    In my experience, what really helped me a lot on server CPUwise, was starting using OutputCache massively.

  • Posted on Apr 20, 2007 (permalink)

    Hey MB, et al

    You can put different parts of the SQL server or databases on different parts of the server....  Our standard config of SQL server has

    1. mirrored boot drive 10k spin (c: drive)
    2. Ram disk for Tempdb (F: drive)
    3. 15k spin non-raid Log file disk (E: drive)
    4. RAID 5 array 15k spin for rest of SQL server (d: drive)

    As the Tempdb is re-created every time you start the server, and does not "keep" any information in it, it is a perfect candidate for placing on the RamDisk.  All that is collected in the tempdb is the workings of complex SQL statements.  i.e. two seperate Select statements with a union between them to create 1 alphabetical listing, would save the 2 select statements results into the tempdb to then work on for the union before sending it on to the requesting agent.

    From what I understand can will keep this information for a while as a cache for regular requests, but this is only for very frequent requests.

    The only thing to watch is that your Model db is not too big as it will create a tempdb of the same size.  Search for tempdb.mdf to find out your existing tempdb size.  I bet it is much smaller than you expect.

    I put the logs on a non-raid disk for ultra-quick writing which gives the system more performance still.

    Let me know if you want more info?

  • MB Master avatar

    Posted on Apr 20, 2007 (permalink)

    Yes, I also run my drive config pretty much as you do, except I run the logs on mirrors as well, as I prefer the safety of knowing I can survive "drive-out" on the logs, without forcing sql-server off-line (and hence the websites off-line). 

    Provided you are using a raid controller (particularly with cache) the management of the mirrored copy is totally offloaded to the controller (the O/S only sees a single drive) and hence should not impact on the performance, as logs are basically just sequential writes, unless you need to recover. Depending on your maintenance plan, the logs can normally be kept to manageable size file that are cleared on backup.

    The suggestion of placing the tempdb.* onto a ramdrive is something I might investigate... thanks for the idea.

    Cheers,

    -- MB.

  • Posted on May 10, 2007 (permalink)

    Interesting alternate approach to http compression, runs as a .cs file.


  • Imran avatar

    Posted on Mar 25, 2009 (permalink)

    Sorry its rather a basic question but I am googling it for sometime without any success.
    Q: What is the difference between gzip compression at application level ( using gzipStream class of .NET ) and IIS level gzip compression?

    Hopefully you guys can help.

    Thanks

  • Ankur avatar

    Posted on Jun 29, 2009 (permalink)

    hi
    I want to post data in headers.To be more precise, i want to sent the data by post method after checking the expiration of the script.
    and the every script involved in this work is having data which needs to be sent
    plz help me..

  • Back to Top

    Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > General Discussions > HTTP Compression Setup on IIS & testing results (ASPX, HTML, PHP, AXD, JS, CSS, XML)