samedi 1 août 2015

Explain IIS caching and webapi requests

Who can explain the behavior IIS cache and webapi requests.

We have: 1. IIS 7 2. WebApi (Ap.Net Framework 4.5, MVC, C#). 3. IIS Settings: Site -> Output caching -> Edit Feature Settings: "Enable cache" and "Enable kernel cache" -- are enabled.

Current request:

POST http://ift.tt/1IAuPT2 HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
Accept: application/json, text/plain, */*
Content-Type: application/json;charset=utf-8
Content-Length: 32

{language":"en"}

With every request throughout the day, response time increases. (request and query parameters always the same ) So: -first response on current request is 10ms. -after 100 request - 5 sec. -after 1000 requests to api -response will >10 sec

These numbers are approximate. I was made measurements every hour during the working day. And response time for current request every time was more than previous.

After I disabled "Enable cache" and "Enable kernel cache" in IIS site settings, response time became normal.

Aucun commentaire:

Enregistrer un commentaire