RSS 2.0
 Wednesday, October 27, 2010

Any of you who have been writing WCF front-ends for BizTalk services will know about one of ASP.NET’s failings: first request latency. A service (or application) hosted in IIS doesn’t start-up and JIT itself fully until the first request is received.

And if low-latency is important to you, this isn’t acceptable, as the first request can incur delays ranging anywhere from 2 secs to 60 secs!

There are many common ways to decrease the impact of this:

  • Changing the application pool worker process idle time-out and recycling interval
  • Setting specific time when the application pool can recycle
  • Writing a separate service that "pings" the service to start it up
  • Using MOM’s ability to "ping" services to start a service

None of the above options is bullet-proof – all they can do is reduce the chances of a request hitting this problem.

But now we have IIS 7.5 and the Web Application auto-start functionality – which allows applications to automatically start and be compiled when their application pool is started/recycled: all before the first request is received.

And AppFabric builds on this: AppFabric extends this functionality to individual WCF services hosted in an application.

So we can now configure a WCF service to auto-start when the app pool is started/recycled – meaning that the first request to the service will have the same latency as any of the other subsequent requests.

The downside is that this only works with IIS 7.5 – meaning Windows 7 or Windows Server 2008 R2.

More info can be found here:

http://msdn.microsoft.com/en-us/library/ee677260.aspx

And here:

http://social.technet.microsoft.com/wiki/contents/articles/hosting-enhancements-in-net4-and-windows-server-appfabric-part-2.aspx

Info on configuring auto-start can be found here:

http://msdn.microsoft.com/en-us/library/ee677285.aspx

Wednesday, October 27, 2010 11:01:04 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] - Trackback
AppFabric | BizTalk General | WCF
Navigation
Archive
<October 2010>
SunMonTueWedThuFriSat
262728293012
3456789
10111213141516
17181920212223
24252627282930
31123456
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2013
Daniel Probert
Sign In
Statistics
Total Posts: 44
This Year: 0
This Month: 0
This Week: 0
Comments: 26
Themes
Pick a theme:
All Content © 2013, Daniel Probert
DasBlog theme 'Business' created by Christoph De Baene (delarou)