-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Allow user to configure proxy as reverse HTTP proxy #2801
Conversation
Users normally want to expose as few endpoints as possible. This patch enables configuring the pulsar proxy as a review http proxy, so that it can be used as a single endpoint for all pulsar and even non-pulsar HTTP services. The reverse proxy uses jetty's builtin implementation. It is configured in proxy.conf, in the form httpReverseProxy.NAME.path = '/path-on-pulsar-proxy-endpoint' httpReverseProxy.NAME.proxyTo = 'http://internal-server/some-app' where NAME is any user defined string. Multiple paths can be configured this way.
cc @cckellogg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
run java8 tests |
@ivankelly There was a failure in one of the new tests:
|
@merlimat that looks very strange, as if one of the backing servers didn't come up. I've pushed another change which enabled jetty logging at info level which may shed more light. needless to say, i don't have a local repro. |
rerun integration tests |
looking into it |
@merlimat Looks like a legit issue. Seems to only repro if you have 24 cores though. There's a race somewhere, and I suspect it's in jetty itself |
Ouch, maybe we can try to upgrade Jetty to latest stable too. |
I have a reliable repro, so will try the upgrade. I suspect it could be related to |
@merlimat seems to happen even with the latest 9.3 series (from early sept). I need to put this down for the day now, but will pick it up again tomorrow. |
Created jetty/jetty.project#3005. Moving to 9.4 series, which seems to fix it. |
The recent proxy changes (apache#2801) tickled some issues in jetty's 9.3 series, where clients can hang if running on machines with a lot of cores. This causes some tests to fail CI, while being impossible to repro locally (unless you have a 24 core machine lying around). Jetty reworked a lot of their selector code in 9.4, which appears to make the issue go away.
The recent proxy changes (#2801) tickled some issues in jetty's 9.3 series, where clients can hang if running on machines with a lot of cores. This causes some tests to fail CI, while being impossible to repro locally (unless you have a 24 core machine lying around). Jetty reworked a lot of their selector code in 9.4, which appears to make the issue go away.
Users normally want to expose as few endpoints as possible. This patch
enables configuring the pulsar proxy as a review HTTP proxy, so that
it can be used as a single endpoint for all pulsar and even non-pulsar
HTTP services.
The reverse proxy uses jetty's built-in implementation.
It is configured in proxy.conf, in the form
where NAME is any user-defined string. Multiple paths can be
configured this way.