c# - IIS High and unstable TTFB -
i have mvc application api used in running on iis 6.0(7.0 on production servers). api, use ihttphandler implementation in api.ashx file.
i have many different api calls being made api.ashx file, i'll tell one, has no db calls, it's not database issue. @ beginning of processrequest method i've added diagnostics.stopwatch track performance , stopping @ last method's line. output of stopwatch stable(+-2ms) , shows 5ms(!!!) in average. on site, see absolutely unstable , different time first byte. may start 15ms , may grow 1 second, , demonstrates 300 ms in average, in logs i'll still have stable 5ms stopwatch.
this happens on every server use, locally(so not network related-problem) , on production. btw static resources loaded fast(<10ms)
can suggest solution this?
this sounds difficult 1 diagnose without little more detail. edit question , add waterfall chart showing slow api call in question? tool produce waterfall charts http://webpagetest.org
i recommend reading article diagnosing slow ttfbs.
http://www.websiteoptimization.com/speed/tweak/time-to-first-byte/
it goes great detail of reasons behind slow response. here server performance issues may slowing down server.
- memory leaks
- too many processes / connections
- external resource delays
- inefficient sql queries
- slow database calls
- insuficient server resources
- overloaded shared servers
- inconsistent website response times
hope helps!
Comments
Post a Comment