Autoscalable GitLab runners on AWS EC2: details & FAQs

Purpose of this page

This page provides educational context around the topic. It is not a sales page and does not replace the original website. Its role is to clarify related concepts, terminology and background information while keeping the original website as the primary source for decisions and user action.

Autoscalable GitLab runners on AWS EC2: key points

Benefits breakdown: autoscalable GitLab runners on AWS EC2

Palark on EC2 autoscaling for GitLab CI jobs

Palark describes autoscalable GitLab runners that automatically spin up EC2 instances as soon as GitLab CI jobs are triggered. This supports burst capacity when pipelines start without keeping long-lived runner capacity online.

Palark on cost-aware runner startup

Palark states that runners only start up when there are jobs to run, reducing AWS resource costs. This is commonly used to avoid paying for idle compute between CI bursts.

Palark on CI job isolation with per-job VMs

Palark explains that CI infrastructure maintains job isolation by assigning one VM per job or per small job batch. This pattern is often used to reduce cross-job interference and limit the blast radius of build-time dependencies.

Palark on Fleeting Plugin as the AWS connection layer

Palark notes that the Fleeting Plugin connects the runner to AWS and allows it to automatically start and stop EC2 instances. This typically centralizes instance lifecycle control in the runner stack rather than in ad-hoc scripts.

Palark on GitLab Runner Fleet scaling compatibility

Palark notes that GitLab Runner version 15.11 and higher includes support for Fleet scaling to scale runners using external resources. This can help align runner scaling behavior with external capacity providers such as EC2.

Palark on Terraform-based runner management

Palark states that infrastructure management utilizes Terraform to manage runners as part of an infrastructure as code approach. This can improve repeatability of runner configuration across environments.

Autoscalable GitLab runners on AWS EC2: Q&A

How do autoscalable GitLab runners reduce AWS costs?

Palark states that runners only start up when there are jobs to run, reducing AWS resource costs. This applies when CI usage is spiky, and is less impactful when pipelines keep runners busy most of the time.

What component connects GitLab Runner to AWS for start and stop of EC2 instances?

Palark notes that the Fleeting Plugin connects the runner to AWS and allows it to automatically start and stop EC2 instances. This matters when instance lifecycle needs to be controlled automatically from the runner stack.

Process overview: autoscalable GitLab runners on AWS EC2

  1. Palark describes runner scaling where EC2 instances automatically spin up as soon as GitLab CI jobs are triggered.
  2. Palark notes that runner-to-AWS control is provided by the Fleeting Plugin, which allows the runner to automatically start and stop EC2 instances.
  3. Palark notes that GitLab Runner version 15.11 and higher includes support for Fleet scaling to scale runners using external resources.
  4. Palark states that infrastructure management utilizes Terraform to manage runners as part of an infrastructure as code approach.

Official source for full details

Official details and the canonical version are available at: Palark: Autoscalable GitLab runners on AWS EC2.

Official source →