Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow horizontal scaling config via ENV parameters #4603

Open
5 tasks done
poVoq opened this issue Apr 7, 2024 · 2 comments
Open
5 tasks done

Allow horizontal scaling config via ENV parameters #4603

poVoq opened this issue Apr 7, 2024 · 2 comments
Labels
area: deployment Related to deploying Lemmy in production enhancement New feature or request

Comments

@poVoq
Copy link

poVoq commented Apr 7, 2024

Requirements

  • Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • Did you check to see if this issue already exists?
  • Is this only a feature request? Do not put multiple feature requests in one issue.
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.
  • Do you agree to follow the rules in our Code of Conduct?

Is your proposal related to a problem?

Horizontal scaling as outlined here: https://join-lemmy.org/docs/administration/horizontal_scaling.html currently seems to only work via starting the backend process with cli parameters. This is a bit tricky to do from outside a container and the standard way is to rather do it by passing ENV parameters to the container.

Describe the solution you'd like.

Ideally there should be an equivalent to these config parameters as ENV parameters that can be added to a docker-compose.yml or similar.

Describe alternatives you've considered.

Maybe allow configuring this in the config.hjson file?

Additional context

No response

@poVoq poVoq added the enhancement New feature or request label Apr 7, 2024
@dullbananas
Copy link
Collaborator

Anothe alternative is making this configuration automatic using the database

@dullbananas dullbananas added the area: deployment Related to deploying Lemmy in production label Apr 7, 2024
@Nutomic
Copy link
Member

Nutomic commented Apr 8, 2024

@Nothing4You mentioned in matrix chat that it should work with Exec=lemmy_server --federate-process-index=1 --federate-process-count=3 in [Container]
https://man.archlinux.org/man/quadlet.5.en#EXAMPLES

@dullbananas I dont see any way to do that, as the database doesnt know how many workers you want to start, and which backend should have which index.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: deployment Related to deploying Lemmy in production enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants