Save money by compressing strings in SQL Azure using UTF-8, deflate and the DotNetZip libary.
Wayne Berry has a great post which discusses which columns are good candidates for manual compression and walks through the process of converting a column to use .NET GZipStream compression. In this post, we’ll build on that approach by using UTF-8 encoding, deflate, and the DotNetZip library to improve our compression ratio.
Read More Post a comment (0)
Pay attention to the evaluation cost of scripts. If you are only using a small piece of jQuery UI, then it may be better to host a custom version rather than using the full version on Google’s CDN.
Google, Microsoft, and Yahoo all have content delivery networks (CDNs) to provide common JavaScript libraries for public use. This is a great service which helps to speed up the web by allowing many different sites to link to the same JavaScript library, increasing the chance a user will have a file in their cache. If you are currently hosting your own copy of a library like jQuery, switching to the Google CDN is usually an easy way to improve the speed of your site.
Read More Post a comment (0)Calculating the number of years and months between two dates can be tricky. DateSpan to the rescue!
At first glance, calculating the difference between two DateTimes seems easy. Simply subtract the first date from the second and you’ll get a TimeSpan which can be used to get the total number of days elapsed. With the 4th of July right around the corner, let’s calculate the age of the United States since the Declaration of Independence:
Read More Post a comment (0)IIS Logging in Windows Azure includes everything. Reduce the fields logged using appcmd inside a startup task.
Windows Azure makes it pretty easy to enable IIS logging for your web roles and will periodically transfer logs to a storage account so you can analyze them. A typical IIS installation will include some essential fields and administrators can add others if needed. However, Windows Azure enables all of the fields by default.
Read More Post a comment (5)![]()
CDNs like Windows Azure and Amazon CloudFront don’t automatically gzip. Create gzip copies of your css and js to increase site speed and reduce transfer costs.
There are two big reasons why you should compress your content: time & money. Less data transferred over the wire means your site will be faster for users and bandwidth costs will be lower for you. Compressing the content will require some CPU, but web servers are often IO-bound and have cycles to spare. Plus, modern web servers do a good job of caching compressed content so even this cost is minimal. It’s almost always worth it to enable compression on your web server.
Read More Post a comment (8)
Many APIs limit the number of calls per second. TimeSpanSemaphore can help throttle pending calls so that you do not exceed the service limits.
From Amazon to Zillow, there are thousands of sites which provide access to data via an API. At FilterPlay we use lots of e-commerce APIs to retrieve product data and update prices used in our comparison engine. Our back-end system updates millions of items every day and fortunately many of these API calls and updates can be parallelized. Most APIs provide limits to help ensure the service remains available and responsive. It’s important to throttle your API calls to stay within the limits defined by each service.
Read More Post a comment (2)