-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
Fix Issue #257 by including additional details on Kube Service routing #3065
base: main
Are you sure you want to change the base?
Fix Issue #257 by including additional details on Kube Service routing #3065
Conversation
…vice routing Signed-off-by: Josh Kneubuhl <[email protected]>
This is great information and I am primarily interested in getting the content captured somewhere/anywhere for now. It does go deeper into Kubernetes than I was expecting, that's not a bad thing, but it does beg the question of how we want to evolve the docs to be more aligned with Kubernetes going forward. We could inject such content throughout the docs as done here, or we could keep the load balancing concepts fairly generic in the core Fabric topics, and talk about Kubernetes specifics somewhere else like in the Deployment Guide topics. Again, without a wider Kubernetes doc strategy in place yet, I'm happy to keep the content here for now, and then potentially shift it to somewhere like Deployment Guide later once we have the wider Kubernetes doc strategy. Thought we could at least start the discussion here though. Let's see if documentation specialists such as @joshhus and @denali49 have any thoughts on the topic. And we probably want @mbwhite to provide a technical review as well. |
docs/source/gateway.md
Outdated
## Gateway Service Routing with Kubernetes | ||
|
||
In typical Fabric deployments on Kubernetes, each peer node is exposed via a single Kubernetes `Service` instance and resolved using a Kube DNS. This technique is sufficient for the Fabric Gateway and application clients to resolve individual peers within a Fabric network. In cases requiring high-availability and/or client connection load-balancing, Kubernetes can be configured with an additional `Service` resource bound to multiple gateway peers. Using an HA topology, gateway clients may reference a set of peer nodes with a single DNS alias. | ||
|
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.
an observation: is it worth pushing the gateway client strongly here? a) make them well known. but also b) this approach works due to the way gateway has a single point of (network) contact with Fabric. Really not sure this would well with previous SDKs?
docs/source/gateway.md
Outdated
|
||
An example load-balanced gateway service is available in the [Kubernetes Test Network](https://github.com/hyperledger/fabric-samples/blob/main/test-network-k8s/docs/HIGH_AVAILABILITY.md). In this example: | ||
- Each organization defines an `orgN-peer-gateway` `Service`, bound to a set of peer `Deployments`. | ||
- The TLS enrollments / certificates for each peer include the shared service / Subject Alternate Name alias. |
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.
... in addition to the peerX.orgY hostname
Signed-off-by: Josh Kneubuhl <[email protected]>
Hi @denyeart and @joshhus - I did a little word smithing in here and moved the Kube-specific content out of the Gateway configuration guide. The section now hangs as a top-level sub-section under the Deployment Guide on read-the-docs. I tried to emulate the multi-layer links using the Dave is this a little closer to what you were envisioning? |
@jkneubuh Going through old issues and PRs, I realized we need to finish this one out. There is some good guidance now in https://github.com/hyperledger/fabric-samples/blob/main/full-stack-asset-transfer-guide/docs/ApplicationDev/01-FabricGateway.md#production-deployment-of-fabric-gateway. We should determine how to best convey this information across Fabric docs and the full stack asset transfer docs. |
Hi guys, Just chiming on as I'm having issues regarding load balancing into multiple deployment pods. I have created a kubernetes service, a client application which communicates to the kubernetes service via gRPC. I'm tailing the logs of the kube service and noticed that only one peer is getting a request. Is it because the client application is maintaining the connection hence the request is not getting routed to other peers? Thank you |
Signed-off-by: Josh Kneubuhl [email protected]
Type of change
Description
This PR adds a brief summary of Kubernetes Service routing as a mechanism to implement basic HA / DR / connection load balancing to the Fabric Gateway.
Additional details
A sample integration of the Kube routing is available in the Kubernetes Test Network HA GUIDE
Kube test network updates to enable gateway client load balancing are available in fabric-samples PR #532
Related issues
Additional discussion, and the original issue, is tracked at fabric-gateway issue #257
Resolves #257