[RFC] Support for horizontal scaling Sourcebot
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 25/100
- Tipo de issue
- Funcionalidade
- Clareza
- Precisa de esclarecimento
- Status de atividade
- Estagnada
- Stack de tecnologia
- docker, docker-compose, helm, nixos, postgresql, redis, terraform, typescript
- Domínio
- cloud, devops, infrastructure
Direção de pesquisa
Start by mapping the webapp, worker, and zoekt services and reviewing the proposed docker-container.yml and docker-compose.yml deployment entry points. Investigate what each service requires to run multiple replicas, then compare local Compose with the proposed Helm, Terraform, and NixOS production paths. Done requires an agreed design, sensible defaults, and documented deployment configurations.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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 in larger deployments, especially ones with thousands of repositories.
- We've seen instances where when a machine is under heavy indexing load, the webapp can become unresponsive or even OOM errors can occur.
- I think the first logical step here is to distribute our services as separate images (i.e.,
ghcr.io/sourcebot-dev/(webapp|worker|zoekt)) - Upstream dependencies like Postgres, and Redis would be separate.
- More images = more complexity, so I think the best mechanism to manage this complexity is moving towards declarative configs. We could do the following:
- 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).
Open questions / investigations
- What will we need to do to make each one of our services (webapp, worker, zoekt) to support multiple replicas at the same time?
Is this Overkill?
I'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.
Locally, 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.
In production, using Helm, Terraform, NixOS, etc. will help get people setup quickly. Again, sensible defaults here are key.
We 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.
- Linguagem predominante
- TypeScript
- Estrelas
- 3.9k
- Forks
- 374
- Merge médio
- 21h 18min
- PRs com merge (30d)
- 39
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de sourcebot-dev/sourcebot
-
bug triage needed
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
sourcebot-dev/sourcebot#1681 · 1 comentário ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
sourcebot-dev/sourcebot#1633 ·
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
sourcebot-dev/sourcebot#1384 · 4 comentários ·
-
ask_sb bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
sourcebot-dev/sourcebot#1137 · 4 comentários ·
-
bug triage needed
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 48/100
sourcebot-dev/sourcebot#1661 · 1 comentário ·
Todas as issues de sourcebot-dev/sourcebot
Issues semelhantes
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
-
Crush Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
ElementsProject/cln-application#167 · 1 comentário · 1 reação ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Quantco/pnpm-licenses#17 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100