-
Notifications
You must be signed in to change notification settings - Fork 937
Forwarding http requests to leader automatically. #245
Comments
@dbussink : the way I read your comment is that |
#whynotboth? |
Things to note: if
|
274dee4 supports multiple-URLs for |
@shlomi-noach This would help significantly in Kubernetes, and I'd prefer that Orchestrator itself proxy the requests. The way that it currently has to be set up, there is a readiness check that pings which results in a completely healthy cluster looking like
This seems pretty trivial to be handled by a whitelist/blacklist for the proxy.
In this instance, I would expect it to already be reporting that it is unhealthy, so it shouldn't be handling requests anyways, and I would expect it to error out the proxy. |
@derekperkins are you familiar with any other way to route queries to a specific now in a ReplicaSet? To be honest I'd hate to code HTTP forwarding within
You're right that we can have a |
There are two alternative solutions I can think of in a Kubernetes context, neither of which feels great.
I don't feel like either of those is significantly better than the status quo, and wouldn't serve Orchestrator users running outside of Kubernetes. I understand the reticence to add proxying support, but especially since it is running in Go, you have some of the best tools available. :) You could probably use https://golang.org/pkg/net/http/httputil/#ReverseProxy from the stdlib with little effort. |
What would you expect to receive from a node which is outside the group, e.g. network isolated, and cannot see the leader? |
I would still have a readiness check enabled, and so I would expect that in the event of a network partition, that node would report a 404 (current behavior), so I wouldn't even be making a request to be proxied. That does leave a small window between network partition and whenever my readiness check picks up that the node is unhealthy, where some request could feasibly come in to be proxied. In that case, I would expect a 503 or something similar. |
Oh, there will be a What I meant was, what would happen if you queried some |
@derekperkins insofar this is an entertaining exercise: #408 |
Based on the discussion in #183 (comment), @shlomi-noach asked to open a new issue to track this idea.
The idea is that instead of needing to setup something like HAProxy to forward requests to the leader based on a status endpoint, that nodes in an orchestrator cluster themselves forward the http requests to the leader so that for an operator it doesn't matter where they send requests to.
The text was updated successfully, but these errors were encountered: