Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • N node-http-proxy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 482
    • Issues 482
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 102
    • Merge requests 102
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • http ... PARTY!
  • node-http-proxy
  • Issues
  • #171
Closed
Open
Issue created Jan 01, 2012 by Administrator@rootContributor

first request is always slow

Created by: ghost

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!

edit: The platforms I have tested this with are (osx 10.6, 10.7 and freebsd 8.2)

Assignee
Assign to
Time tracking