Closed kippandrew closed 8 years ago
:hamburger:
So i'm a little concerned that we're hardcoding a lucid specific behavior into an open source project. I don't think its reasonable that other people would want this same behavior.
I'd like to keep redx agnostic to what its proxying to. Keep it a general use application, not something for lucid specifically. In order to do that, we should be heading towards staying true to RFCs around urls rather than moving away to standards.
:+1: to keeping this agnostic. As the developer of autodock and autodock-hipache I'd love to explore the possibility of writing a new alternative "load balancer" plugin; autodock-redx :)
The goal here is not to be coupled to rstudio's internal code base, but rather remove the ambiguity in how redx resolves frontends:
Because its not possible to do any pattern matching when fetching frontends from redis, the frontend has to be an exact match. This means that assuming a request for: www.example.com/foo/
, redx will not find a matching frontend if the configured frontend URL is www.example.com/foo
. But a request for www.example.com/foo/bar
will match.
To me this means is that the actual pattern we are trying to match is www.example.com/foo/*
. Given this, it makes most sense to represent this internally using a URI that ends in slash, which is to clarify what URLs should be matched.
Q: How many lb's actually support matching on Path? I'm not sure that hipache does (I could be wrong); I think haproxy supports this?
I know nginx and and haproxy can do this (or any high end LB appliance: F5, Netscaler, etc). Not sure about hipache though.
If you're not looking to match on path with redx, this change probably doens't matter.
I also only because of my previous comment to this; I should start considering addthis this as a feature to autodock; but I'd also like to support redx as well in the near future.
@prologic can you rephrase your last comment? Not sure i understand what you're saying.
@kippandrew Sorry, this merged quicker than i thought it was going to, please update the tests to include trailing slashes https://github.com/rstudio/redx/blob/master/spec/api_spec.moon, also main_spec.moon.
@kippandrew also add tests to main_spec.moon
showing that using trailing slashes and not still works ok.
CC @aronatkins @CBarraford