-
Notifications
You must be signed in to change notification settings - Fork 2k
Slow Responses #314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey Zac, |
Hi Rob, I am not 100% sure if mine is the same issue, as I am proxying direct to an IP, so there shouldn't be a DNS lookup? Did you find any workarounds or fixes to your issue? Cheers, |
We haven't done anything yet, still testing out other options, but we're thinking of mapping the dns to IP's and doing lookups based on that, which for us has proven to be fast. |
Could you profile it and find where it spends its time? We're using it in production with under 20 ms of round trip. |
Same issue, with http-proxy : 200ms+ and without 5-20ms. don't know if it can help: v8 profiling |
timestamp: Hope this helps in any way, will be looking at the source later tonight trying to find the slowest callback in http-proxy edit: ran same script on windows box, no issues (with or without proxy 5-15ms round trip). |
I suspect it is not http-proxy. I heard some noise about spurrious latency from the DNS lookup in node.js core since lookups are not cached. |
Yeah it's not a bug in http-proxy, couldn't find any other info on the issue though. Funny thing is the only 3 people reporting this issue are running debian based OS's If this isn't the right place to discuss this any further I'll post a link to stackoverflow or something. edit: wrote a simple http proxy, 2 http server, first one creates a client and connects to second -> 260ms ubuntu, 10ms windows. |
I believe I am also experiencing this issue. I am using Debian 6.0.6 x86_64 and using the local /etc/hosts file to do my DNS resolution (no DNS server available). Has anyone made any further progress on this? |
I'm using Fedora 13 and it's happening to me as well. Why is it even doing a DNS lookup for IP addresses? Is Node using the OS libraries to parse IP addresses? If they are only doing a parse and not a lookup there really shouldn't be a delay anyway. Am I missing something? |
There's no DNS lookup happening for IP addresses, checkout this gist I wrote to help illustrate the difference between DNS vs IP resolution. https://gist.github.com/robertlmullen74/3834431 The DNS lookup was buried somewhere deep in the node.js C core libraries, I forget exactly how it's being done, but I do recall seeing that the result was never cached. |
Also seeing this on Ubuntu. |
+1 I'm using local-ssl-proxy (which only really calls node-http-proxy) and it's actually taking 3 or 4 minutes to load the page. |
Closing due to old age. |
Hi,
I am having some issues with node-http-proxy. I am running node 0.8.10 on Linux (Debian Squeeze).
Without routing through node-http-proxy I see response times of 16 - 30ms. With I get 200+ms.
What am I doing wrong?
The code I have tried is below:
Regards,
Zac
The text was updated successfully, but these errors were encountered: