Instance Size

When sizing your Sourcegraph deployment, it is important to take into account the number of users and repositories in your environment. Below is our sizing chart with our sizing recommendations for different size environments.

Size chart

If you fall between two sizes, choose the larger of the two. For example:

  1. If you have 8,000 users with 80,000 repositories, your instance size would be L.
  2. If you have 1,000 users with 80,000 repositories, your instance size would still be L.
XSSMLXL
UsersUp to 500Up to 1,000Up to 5,000Up to 10,000Up to 20,000
RepositoriesUp to 5,000Up to 10,000Up to 50,000Up to 100,000Up to 250,000
vCPU816324896
Memory (GB)3264128192384
SSD RequiredYesYesYesYesYes

We recommend the following instance type for the cloud providers listed below:

XSSMLXL
AWSm6a.2xlargem6a.4xlargem6a.8xlargem6a.12largem6a.24xlarge
AzureD8_v3D16_v3D32_v3D48_v3D64_v3
GCPn2-standard-8n2-standard-16n2-standard-32n2-standard-48n2-standard-96

Kubernetes

Follow the instructions for each provider linked in the table below to provision a Kubernetes cluster for the infrastructure provider of your choice. Use the recommended node and list types in the table.

ProviderNode typeBoot/ephemeral disk size
Amazon EKS (better than plain EC2)m5.4xlarge100 GB (SSD preferred)
Google Kubernetes Engine (GKE)n2-standard-16100 GB (default)
AzureD16 v3100 GB (SSD preferred)
Other16 vCPU, 60 GiB memory per node100 GB (SSD preferred)
Sourcegraph can run most standard Kubernetes clusters, so if your infrastructure provider is not listed, see the "Other" row.
If you are deploying on Azure, you must ensure that your cluster is created with support for CSI storage driver(https://docs.microsoft.com/en-us/azure/aks/csi-storage-drivers). This can not be enabled after the fact.
If you intend to set this up as a production instance, we recommend you create the cluster in a VPC or other secure network that restricts unauthenticated access from the public Internet. You can later expose the necessary ports via an Internet Gateway or an equivalent mechanism. Note that Sourcegraph must expose port 443 for outbound traffic to code hosts and to enable telemetry with Sourcegraph.com. Additionally, port 22 may be opened to enable git SSH cloning by Sourcegraph. Take care to secure your cluster in a manner that meets your organization's security requirements.

Resources

Please refer to our resource estimator for more information regarding resources allocation for your Sourcegraph deployment.