ProxyTable update to allow Hostname only matches #24

Closed
wants to merge 6 commits into from

2 participants

@DanBUK

This allows the lookup within ProxyTable to be a O(1) lookup on the routers object without RegExp. Instead of the O(n) RegExp based lookup that is currently in place.

This can be toggled by a boolean that can be passed to HttpProxy and ProxyTable.

Therefore for scenarios where you want a purely Host: header lookup this will be faster and will scale better when the proxy is infront of X'00 backends.

@indexzero
nodejitsu member

Interesting. Will review more this weekend and give you some feedback. Speed improvements always welcome.

@DanBUK

Sorry about the setMaxListeners foo, I was trying to get EventEmitter to not alert on that warning.

@indexzero
nodejitsu member

Looked over it at lunch. I like the feature, but I'll tweak it a bit before pulling it. This coincides nicely with the work I was doing to make some changes for node 0.4.0 now that https is stable.

Do you need this in a release that's backwards compatible to 0.2.x? Otherwise I'll just roll it into the version targeting 0.4.x.

@DanBUK

I don't think there is much worry about 0.2.x compatibilty; 'we' should all be moving forwards? No?

I'de be interested in your tweaks.

Cheers,
DanBUK.

@indexzero
nodejitsu member

Added this to v0.4.0. The rewrite for node 0.4.0 was substantial enough that merging your pull request didn't make sense. In the future though there are two things I really need before I could accept this:

  1. Updates to documentation.
  2. Additional tests.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment