GitLab
Follow
How we supercharged GitLab CI statuses with WebSockets
GitLab significantly reduced API calls for CI job status updates by 92.56%, from 45 million to 3.4 million daily. Previously, the job header component used polling, making a network request every 30 seconds regardless of data changes. This resulted in user delays and database strain. The team transitioned to GraphQL subscriptions over WebSockets, an event-driven approach. This change allows for instant updates when job statuses change, eliminating unnecessary network traffic. The number of network calls per 15 minutes dropped from 547,145 to 39,670. Users now experience real-time status visibility. This optimization did not lead to increased CPU utilization or operation rates. GitLab plans to replace all polling mechanisms with GraphQL subscriptions across the entire product. The goal is to provide instant feedback throughout the CI/CD workflow.