Using external services with Sourcegraph
Sourcegraph by default provides versions of services it needs to operate, including:
- A PostgreSQL instance for storing long-term information, such as user information when using Sourcegraph's built-in authentication provider instead of an external one.
- A second PostgreSQL instance for storing large-volume precise code intelligence data.
- A Redis instance for storing short-term information such as user sessions.
- A second Redis instance for storing cache data.
- A MinIO instance that serves as a local S3-compatible object storage to hold user uploads before they can be processed. This data is for temporary storage and content will be automatically deleted once processed.
- A Jaeger instance for end-to-end distributed tracing.
Your Sourcegraph instance can be configured to use an external or managed version of these services. Using a managed version of PostgreSQL can make backups and recovery easier to manage and perform. Using a managed object storage service may decrease your hosting costs as persistent volumes are often more expensive than object storage space.
See the following guides to use an external or managed version of each service type.
- See Using your own PostgreSQL server to replace the bundled PostgreSQL instances.
- See Using your own Redis server to replace the bundled Redis instances.
- See Using a managed object storage service (S3 or GCS) to replace the bundled MinIO instance.
- See Using an external Jaeger instance to replace the bundled Jaeger instance.
Cloud alternatives
- Amazon Web Services: AWS RDS for PostgreSQL, Amazon ElastiCache, and S3 for storing user uploads.
- Google Cloud: Cloud SQL for PostgreSQL, Cloud Memorystore, and Cloud Storage for storing user uploads.
- Digital Ocean: Digital Ocean Managed Databases for Postgres, Redis, and Spaces for storing user uploads.