Skip to Content

Supercharge Your Hive Gateway with Rust-Powered Speed

Denis Badurina

We’re thrilled to announce the integration of our Rust Query Planner into Hive Gateway, bringing the lightning-fast performance of Hive Router directly to your Node.js, Bun, and Deno environments!

This integration was made possible through our dedicated work on both Hive Gateway and Hive Router, ensuring everything works great together. We leveraged napi.rs to create a cross-platform Node addon that supports Node.js, Bun, and Deno effortlessly.

Performance That’ll Blow Your Mind

Experience up to 3x faster query planning per core and 2x reduced latency - beating Apollo Router by almost 2x - all while maintaining 100% compatibility with the Federation-Compatibility Audit. This means your federated GraphQL architecture stays standards-compliant and interoperable, but now with Rust’s unmatched speed under the hood.

The following results benchmark a scenario runing 4 subgraphs and a GraphQL gateway with Federation spec, and runs a heavy query. It’s being executed with a constant amount of VUs over a fixed amount of time.

GatewayRPS ⬇️RequestsDuration
Hive Router163398510 total, 0 failedavg: 30ms, p95: 52ms
Grafbase156894625 total, 0 failedavg: 31ms, p95: 55ms
Cosmo65039305 total, 0 failedavg: 76ms, p95: 112ms
🚀 Hive Gateway (Rust QP)61937616 total, 0 failedavg: 79ms, p95: 110ms
Apollo Router31319100 total, 0 failedavg: 157ms, p95: 208ms
Hive Gateway (JavaScript QP)29117933 total, 0 failedavg: 167ms, p95: 279ms
Apollo Gateway1187240 total, 0 failedavg: 415ms, p95: 488ms

See the full benchmark results.

Full JavaScript Ecosystem Support

One of the key advantages of this integration is that it preserves the full power of the JavaScript ecosystem. All your existing plugins, integrations, and tools continue to work seamlessly - from Envelop and Yoga plugins to custom Gateway plugins. You get the best of both worlds: Rust’s performance under the hood with JavaScript’s flexibility on top.

⚠️

While the Rust Query Planner delivers a lot, it currently doesn’t support a handfull of Hive Gateway features. We’re hard at work to achieve full compatibility soon! Check out the feature comparison for details.

Easy Integration, Massive Gains

Ready to get started? Head over to our Rust Query Planner documentation for step-by-step setup instructions and great speed!


Last updated on