nodejitsu/node-http-proxy — Issue #171: first request is always slow
Author: s1985
Created: 2012-01-01 11:52:48+00:00
State: open

Hello,

I am having an issue where the first request to any domain which is handled by the proxy appears to take 2-3 seconds to load before it actually does.

This was all running on a dedicated server, so I tried it out locally and had the same issue, so I set it up locally on another pc (for sanity sake) and the issue is still happening.

This is the code I am using:

> var proxy = require("http-proxy");
>
> proxy.createServer({
>	hostnameOnly: true,
>	router: {
>	"admin.local": "localhost:8081",
>	"web.local": "localhost:8080"
>	}
> }).listen(80);

Seems to be happening on every version of node I have tested with (0.6.6, 0.6)

Is this a known issue with 0.6 compatibility, is this a known performance tradeoff when proxying like this? Have I done something silly? I am not sure!

Some clarity as to why this issue might be happening and would be great.

Thanks!