Title: [RFC] Support for horizontal scaling Sourcebot · Issue #439 · sourcebot-dev/sourcebot · GitHub
Open Graph Title: [RFC] Support for horizontal scaling Sourcebot · Issue #439 · sourcebot-dev/sourcebot
X Title: [RFC] Support for horizontal scaling Sourcebot · Issue #439 · sourcebot-dev/sourcebot
Description: This discussion tracks adding support for horizontal scaling to Sourcebot. TL;DR I think the existing single, self-contained docker container is great since it's super easy to use and is radically simple. But it's probably not practical ...
Open Graph Description: This discussion tracks adding support for horizontal scaling to Sourcebot. TL;DR I think the existing single, self-contained docker container is great since it's super easy to use and is radically ...
X Description: This discussion tracks adding support for horizontal scaling to Sourcebot. TL;DR I think the existing single, self-contained docker container is great since it's super easy to use and is radica...
Opengraph URL: https://github.com/sourcebot-dev/sourcebot/issues/439
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[RFC] Support for horizontal scaling Sourcebot","articleBody":"This discussion tracks adding support for horizontal scaling to Sourcebot.\n\n## TL;DR\n- I think the existing single, self-contained [docker container](https://github.com/sourcebot-dev/sourcebot/pkgs/container/sourcebot) is great since it's super easy to use and is [radically simple](https://www.radicalsimpli.city/).\n- But it's probably not practical in larger deployments, especially ones with thousands of repositories.\n- We've seen instances where when a machine is under heavy indexing load, the webapp can become unresponsive or even OOM errors can occur.\n- I think the first logical step here is to distribute our services as separate images (i.e., `ghcr.io/sourcebot-dev/(webapp|worker|zoekt)`)\n- Upstream dependencies like [Postgres](https://hub.docker.com/_/postgres), and [Redis](https://hub.docker.com/_/redis) would be separate.\n- More images = more complexity, so I think the best mechanism to manage this complexity is moving towards **declarative configs**. We could do the following:\n - **For local deployments**, we can define a `docker-container.yml` at the root of the repository. Deploying will now involve 1) Cloning the repo, and 2) running `docker compose up`.\n - **For production deployments**, we can use technologies such as [Helm](https://helm.sh/), [Terraform](https://developer.hashicorp.com/terraform), [Railway](https://railway.com/), and [NixOS](https://nixos.org/)\n- I think it will be important to have sensible defaults (s.t., it's very easy to deploy), while having deep configuration options that are **well documented** (s.t., it fits the user's deployment story).\n\n## Open questions / investigations\n- What will we need to do to make each one of our services (webapp, worker, zoekt) to support multiple replicas at the same time?\n\n## Is this Overkill?\nI'm trying not to go too overboard with the design here. DX should not be sacrificed with this change: ideally it should improve. Sourcebot should be **just as easy** to deploy as a vertically scaling service, both locally and in production. Deploying it as a horizontally scaling service in production should also be easy, while including configuration depth to support a wide range of deployment scenarios.\n\nLocally, using Docker Compose will streamline deployment since a) it's a single command, `docker compose up`, and b) it's declarative, so all of the options (w/ sensible defaults, or commented out) can be included inside the `docker-compose.yml`.\n\nIn production, using Helm, Terraform, NixOS, etc. will help get people setup quickly. Again, sensible defaults here are key.\n\nWe also should continue supporting the self-contained image since to avoid introducing a breaking change here. We can evaluate if it's still worth shipping whenever we do a v5.","author":{"url":"https://github.com/brendan-kellam","@type":"Person","name":"brendan-kellam"},"datePublished":"2025-08-07T05:59:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/439/sourcebot/issues/439"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5a0e42c5-d091-7743-83a6-f2c3d878488f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 868A:12A6C9:D217E5:12EF4D8:6A4E4E83 |
| html-safe-nonce | 0dc6c17559348b72a2cf8e98d221b419f2ecb187242ef6c431bd8be85de7343d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjhBOjEyQTZDOTpEMjE3RTU6MTJFRjREODo2QTRFNEU4MyIsInZpc2l0b3JfaWQiOiI4MDU5ODE4NjY4OTA3NzEyMTMxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ae3e846292a67bbc69a8b9b3820525fe59a7cba43c3222a26fbad21098c84666 |
| hovercard-subject-tag | issue:3299106694 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sourcebot-dev/sourcebot/439/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b1259b8430d9a6eddad7d68917727d19985a67870a2b44164a1cb144d0550ddc/sourcebot-dev/sourcebot/issues/439 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b1259b8430d9a6eddad7d68917727d19985a67870a2b44164a1cb144d0550ddc/sourcebot-dev/sourcebot/issues/439 |
| og:image:alt | This discussion tracks adding support for horizontal scaling to Sourcebot. TL;DR I think the existing single, self-contained docker container is great since it's super easy to use and is radically ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | brendan-kellam |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/sourcebot-dev/sourcebot git https://github.com/sourcebot-dev/sourcebot.git |
| octolytics-dimension-user_id | 135396723 |
| octolytics-dimension-user_login | sourcebot-dev |
| octolytics-dimension-repository_id | 846729675 |
| octolytics-dimension-repository_nwo | sourcebot-dev/sourcebot |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 846729675 |
| octolytics-dimension-repository_network_root_nwo | sourcebot-dev/sourcebot |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e8506f6d0538364886e3f0153c154c410965e70d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width