Tag Archives: iis

Random performance findings

TL;DR version :

Upon a curiosity of mine I found out that WCF with basicHttpBinding can be easily beaten (performance-wise) by plain-old ASP.NET even if stripped down of transactions, reliability, security etc. (1500 req/sec vs  800 req/sec)

Also SQL Server Express can handle 1300 inserts per second easily and up to 4300 queries per second just as well. This on a 6+ million rows table and stored on the hard disk not in RAM.

Long version :

A few days ago I was thinking how I implemented a certain web service a few years ago, a few employers ago. Although it was quite fast and efficient it wasn’t scalable. I, then, thought how I should have implemented it.

The web service had to receive an incoming (public) HTTP request, check for a visitor cookie. If there was a visitor-identifying cookie it would check against a data store (in-memory dictionary at that time) to see if that visitor answered.

It was about inviting visitors of certain sites to an on-line survey. A new visitor would be presented with a pop-up box having a “yes”, a “no” and “X” (close) button.

The business rules stated that if the visitor answered yes, the answer would be stored, the pop-up would close and then a new tab/window would appear with the survey. If the visitor answered no, then the same things would happen except opening the survey. If the visitor closed the pop-up, the next time the pop-up would appear again. If the visitor closed three times the pop-up then (s)he wouldn’t be bothered anymore with the invitation.

Read more »

Cassini and WCF streaming

I am preparing a small talk & demo on WCF streaming and I’ve tried a lot of things to get it started and working (the practical demo).

I was trying to showcase uploading and downloading large files, in an async manner with progress report and so on.

Turns out I get an exception, with HTTP code 400 Bad request no matter what I’ve tried :

  • transferMode : StreamedRequest, StreamedResponse or Streamed (Buffered works but it’s not streaming so…)
  • Tried using MessageContracts or plain Stream’s
  • .NET Framework 3.5 or 4.0
  • .. and many other things.

What was the issue? Well the damn development server (code named Cassini) !!! It seems another guy had the same issue, reported on StackOverflow and I was lucky to find it in the large WCF pile.

Running the same server project on the new IIS Express or plain old IIS makes it work.

Hope this will help someone too.. At all costs avoid Cassini (“ASP.NET Development Server”). This is not the first issue that this damn server introduces and surely not the last. I hope Visual Studi vNext will NOT include it anymore and will ship with IIS Express only.