I can see how I can script an overall latency in Fiddler using the ScriptEditor, using something like this:
if (oSession.HostnameIs("www.testsite.co.uk")) {
oSession["request-trickle-delay"] = "500";
}
However, I need to be more specific and specify a delay between the first packet of the request which contains the header, and the secondary packets that contain the body.
I am trying to simulate a problem that is occurring with 0.3% of our web clients, from whom we are receiving a request header, but a missing request body. There is no consistent user agent. Various browsers and operating systems appear to be affected. All POST requests are originating from XMLHttpRequests (XHR). They look like this, and contain JSON bodies:
POST http://www.sitename.co.uk/folder/controller/list HTTP/1.1
Host: www.sitename.co.uk
Connection: keep-alive
Content-Length: 245
Accept: application/json, text/javascript, */*; q=0.01
Origin: http://www.sitename.co.uk
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17
Content-Type: application/json
Referer: http://www.sitename.co.uk/folder/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-GB,en;q=0.8,en-US;q=0.6
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: **removed**
{"bb":{"tl":{"lat":51.590527931951975,"lng":-0.636399852539089},"tr":{"lat":51.590527931951975,"lng":0.42652739355466096},"bl":{"lat":51.29736817638294,"lng":-0.636399852539089},"br":{"lat":51.29736817638294,"lng":0.42652739355466096}},"b":true}
I have checked the MTU size set at firewall level and it is set to 1500, which I believe to be fine.
The web servers are behind a load balancer and are running IIS 7.5 on Windows Server 2008 R2 64-bit. Website is running on ASP.NET MVC3.