Charles Oliver Nutter wrote:
> Christian Neukirchen wrote:
>> * rack.input must be rewindable and support reading into a buffer,
>>   wrap with Rack::RewindableInput if it isn't.
> 
> Nick Sieger pointed me to your implementation of RewindableInput, and I 
> think you should know that Tempfile is a pretty slow API, especially if 
> you're spinning up a tempfile for every incoming request. You'd probably 
> be better off having the default RewindableInput buffer in memory, with 
> a separate option to buffer to a tempfile or similar.
> 
> I'm also curious: why was this requirement was added at all? It means 
> all servers will have to buffer request streams, which will often impact 
> performance (since it will have to be buffered either in memory on on 
> disk), and it doesn't seem typical when looking at other service APIs.

FWIW, I was pointed to the discussion about middleware, which explains 
some of this. We're in the process of investigating how other http 
service APIs handle this, and so far they seem to be a little vague on 
caching/buffering policies.

- Charlie