All posts

What GitLab Jetty Actually Does and When to Use It

You push a build to GitLab, everything runs fine, then suddenly the internal server groans and returns a Jetty error. If you have ever wondered what that Jetty thing does inside GitLab, you are not alone. It quietly runs in the background, handling HTTP requests, user sessions, and all the invisible glue that keeps GitLab Web and API traffic moving fast. GitLab uses Jetty as an embedded web server, the same Java-based engine that powers many production apps. It manages concurrency, connection p

Free White Paper

GitLab CI Security + End-to-End Encryption: The Complete Guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free. No spam. Unsubscribe anytime.

You push a build to GitLab, everything runs fine, then suddenly the internal server groans and returns a Jetty error. If you have ever wondered what that Jetty thing does inside GitLab, you are not alone. It quietly runs in the background, handling HTTP requests, user sessions, and all the invisible glue that keeps GitLab Web and API traffic moving fast.

GitLab uses Jetty as an embedded web server, the same Java-based engine that powers many production apps. It manages concurrency, connection pooling, and SSL termination so developers do not have to maintain a separate Nginx or Apache instance. Jetty’s big advantage is its simplicity. The entire service runs within GitLab’s Ruby and Go ecosystem but leverages Jetty’s mature HTTP engine for reliable request handling and scaling.

How GitLab Jetty Fits Into the Pipeline

When a user authenticates, Jetty accepts the request, validates session data, and hands it off to GitLab Rails or Gitaly depending on the operation. On self-managed installations, Jetty often acts as the internal proxy between application tiers. It is lightweight, easy to restart, and ideal for ephemeral CI runners or containerized deployments. The fewer moving parts between a click in the browser and a repo action, the easier it is to audit and secure.

Jetty becomes most visible when load increases or TLS renewals misbehave. The health of that embedded web server directly affects API latency and job triggering in GitLab. Understanding its role means you can tune worker threads, memory buffers, and idle timeouts intelligently instead of guessing why your pipelines queue forever.

Quick Best Practices

  • Keep Jetty thread pools proportional to CPU cores for stable throughput.
  • Use your existing identity provider (like Okta or Azure AD) for OIDC login, and let Jetty enforce HTTPS-only connections.
  • Rotate external certificates frequently to avoid unplanned downtime.
  • Monitor Jetty access logs alongside GitLab’s application logs for faster root cause identification.

The Payoff

  • Faster request handling under heavy CI load
  • Clearer observability in production traffic
  • Improved security posture through unified TLS management
  • Lower operational overhead by removing extra proxies
  • Easier scaling when moving to Kubernetes or AWS

How Does GitLab Jetty Improve Developer Velocity?

By collapsing network layers, Jetty shortens every feedback loop. Developers see faster page loads, fewer context switches, and more predictable runs. When integrated with infrastructure-as-code setups, configuration becomes reproducible, which cuts onboarding time for new contributors.

Continue reading? Get the full guide.

GitLab CI Security + End-to-End Encryption: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.

Platforms like hoop.dev build on this pattern by enforcing identity-aware network access automatically. Instead of configuring Jetty or GitLab manually for each team, hoop.dev applies policy as code so developers get instant, auditable access without ticket queues.

Is Jetty Secure Enough for Enterprise GitLab?

Yes, provided it is configured correctly. Jetty supports TLS 1.3, session hardening, and OIDC-based authentication. Combined with enterprise GitLab features like audit events and group-level permissions, it meets SOC 2 and ISO 27001 requirements without needing another gateway.

Snippet answer: GitLab Jetty is the embedded web server that handles GitLab’s HTTP requests, SSL encryption, and session management. It simplifies architecture, reduces latency, and enhances security for both self-managed and cloud-hosted GitLab instances.

In the end, GitLab Jetty is less of a mystery and more of an unsung workhorse. Learn its knobs, respect its boundaries, and it will quietly keep your DevOps engine humming.

See an Environment Agnostic Identity-Aware Proxy in action with hoop.dev. Deploy it, connect your identity provider, and watch it protect your endpoints everywhere—live in minutes.

Get started

See hoop.dev in action

One gateway for every database, container, and AI agent. Deploy in minutes.

Get a demoMore posts