feat: use Hive Router for public GraphQL API, along side Hive Gateway#7689
feat: use Hive Router for public GraphQL API, along side Hive Gateway#7689dotansimha wants to merge 3 commits intomainfrom
Conversation
Summary of ChangesHello @dotansimha, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly upgrades the public GraphQL API infrastructure by integrating the Hive Router alongside the existing Hive Gateway. The primary goal is to enable advanced traffic management capabilities, allowing for a gradual rollout or A/B testing of new services. This change introduces the necessary deployment configurations and proxy logic to facilitate weighted traffic splitting, enhancing the system's flexibility and resilience. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
@graphql-hive/yoga |
0.47.3-alpha-20260212133922-f6daaf12c5dca1e7c5e6b222a55325f646f9bab2 |
npm ↗︎ unpkg ↗︎ |
hive |
9.4.0-alpha-20260212133922-f6daaf12c5dca1e7c5e6b222a55325f646f9bab2 |
npm ↗︎ unpkg ↗︎ |
There was a problem hiding this comment.
Code Review
This pull request introduces the Hive Router to handle traffic for the public GraphQL API, splitting the load with the existing Hive Gateway. The changes to the proxy configuration to enable weighted traffic splitting are well-implemented. My main feedback is to consider a more conservative traffic split for the initial rollout to mitigate potential risks, as detailed in the specific comment.
| { upstream: publicGraphQLAPIGateway.service, weight: 50 }, | ||
| { upstream: publicGraphQLAPIRouter.service, weight: 50 }, |
There was a problem hiding this comment.
Starting with a 50/50 traffic split for a new service is quite aggressive, especially as testing on dev/staging is not yet complete. It would be safer to start with a much smaller percentage for the new Hive Router, for example 5% or 10%, and then gradually increase it. This canary release approach would minimize the potential impact if any issues arise with the new router.
| { upstream: publicGraphQLAPIGateway.service, weight: 50 }, | |
| { upstream: publicGraphQLAPIRouter.service, weight: 50 }, | |
| { upstream: publicGraphQLAPIGateway.service, weight: 95 }, | |
| { upstream: publicGraphQLAPIRouter.service, weight: 5 }, |
💻 Website PreviewThe latest changes are available as preview in: https://pr-7689.hive-landing-page.pages.dev |
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tag: |
|
@n1ru4l thoughts on what security plugins should we enable? https://the-guild.dev/graphql/hive/docs/router/security/operation-complexity |
Hive Router now supports everything we do in Hive Gateway today. Including:
In addition, this PR extends the deployment code with a new option for weighted deployments that can split the traffic across different pods.
Testing: