views:

157

answers:

1

Given a workflow that I support, there is a high chance that there would be at least a hundred consecutive calls to the same resource done in rapid succession. I started looking into batching calls for Rest and ran into people suggesting Http Pipelining as the solution. My understanding is that the client will be able to make dozens of requests across the same connection, one right after the other, and dealing the responses whenever they get back.

I think this type of solution is more or less what I'm looking for. I'm currently developing an Asp.net MVC with the resources extension to make a Restful website (http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24471). Also the clients are using the WCF Rest starter kit client module to call Rest.

Here are the pieces of information that I'm looking for:

  • Does IIS 7 support Http Pipelining? Do I need to configure anything for it to work?
  • Does Asp.net support Http Pipelining?

This should be sufficient to keep me going in the quest for Restful services. Thanks for your help!

+2  A: 

HTTP Pipelining is built into the http.sys kernel mode driver. It is on by default. ASP.NET as the service end-point doesn't need to know about pipelining, all it is concerned about is processing a request and returning a response. Http.sys takes care of managing pipelining.

Kev
Ok, but how about support for chunking?
Steven Sudit
@steven - reading through RFC2616 there is no mention of precluding chunking in requests/responses when pipelining.
Kev
@Kev: There won't be. In fact, for generated pages, chunking is the ideal way to return data in pipelined mode. What I'm wondering is whether Response.Flush handles chunking for you or you have to play with headers yourself.
Steven Sudit
@Steven - might have a tinker with this over the weekend and build some proper empirical results. Wish there were more hours in the day :)
Kev
@Kev: There are as many hours as you are willing to give up sleep for. :-)
Steven Sudit
FYI, http://serialseb.blogspot.com/2008/10/httpresponseflush-forces-chunked.htmlYou can also set the response to not be cached, and make sure you don't set the ContentLength, and you'll get chunked encoding.
serialseb
@seraliseb: Thanks, that makes perfect sense.
Steven Sudit