سؤال

My iOS app makes Rest calls to my WCF web service.

The responding speed is very slow, over 3 min.

However, when I set up Fiddler as a Proxy to monitor the iOS traffic. The call was finished in 1 sec.

What does make Fiddler magically accelerate the Rest call from iOS?

p.s. Fiddler is setup on a windows PC where uses the same network with iOS App.

The rest call example (from Fiddler)

Request

GET https://xxxx.xxxx.com/Deals HTTP/1.1
Host: xxx.xxxx.com
Proxy-Connection: keep-alive
Accept-Encoding: gzip
Content-Type: application/json
Cookie:     ASPXAUTH=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Connection: keep-alive
User-Agent: Natural xxxx x.x.x (iPad; iPhone OS 7.0.2; en_US)

Response

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 891437
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/7.5
LastFetchDateTimeUTC: 2014-02-14T16:52:43.5465273Z
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Fri, 14 Feb 2014 16:52:45 GMT

Response body is a large json (2MB)

p.s.

Except for Fiddler, we also tried to install wireshark and use it to capture traffic on the mac while running the app from on the simulator. We see a lot DUP ACK, I guess that's causing tcp re-transmission

p.s.

We pinged from iOS too, there is no delay to the WCF web service.

Help!

UPDATE:

We found out a problem, looks like the respond time decreases with the length of the body. Does it mean anything?

هل كانت مفيدة؟

المحلول 2

We solved this problem by proving that server is a shitty one. We deployed the same service on another VM and it works. Must be the a broken network card

نصائح أخرى

The WireShark logs should provide you plenty of information about what happens in each case. When Fiddler "magically" makes things faster, it's typically due to:

  • Better connection reuse (e.g. Fiddler may reuse connections better than client)
  • Better buffer sizes (e.g. not using tiny buffers for read/write)
  • Non-broken proxy determination behavior

I wrote a bit about these in this blog post.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top