Loading
Use workhorse pattern for Orbit graph queries
Summary
Moves GKG bidirectional gRPC stream orchestration from Rails/Puma to Workhorse using the SendData/Injecter pattern. Puma workers drop from 500ms-8s blocking to two short calls (~10ms auth + ~50ms redaction).
- New
workhorse/internal/orbit/Go package with gRPC client, SendData injecter, and Rails redaction callback Gitlab::Workhorse.send_orbit_querybuilds the SendData header with JWT, GKG address, and query paramsPOST /api/v4/internal/orbit/redactionendpoint for Workhorse mid-stream authorization checks- Gated behind
ORBIT_WORKHORSE_ENABLEDenv var for testing (will useknowledge_graphflag in final version)
Before: Rails handles everything
After: Workhorse handles gRPC stream
E2E tested on GDK VM
All 5 query types pass through Workhorse:
- search, traversal, aggregation, path_finding, neighbors
Related
- ADR: gitlab-org/orbit/knowledge-graph!730 (merged)
- Go proto module: knowledge-graph!770 (merged) + !777
- Omnibus license: omnibus-gitlab!9278 (merged)
- gitlab-org/orbit/knowledge-graph#349 (closed)
- gitlab-org/orbit/knowledge-graph#348 (closed)
Edited by Michael Angelo Rivera