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

Support for scaling? #16

Closed
chrisdebruin opened this issue Jan 18, 2023 · 5 comments
Closed

Support for scaling? #16

chrisdebruin opened this issue Jan 18, 2023 · 5 comments

Comments

@chrisdebruin
Copy link
Contributor

Are there any plans for adding support to scale containers (on the same host) up and down? Something you can do with docker-compose for example docker-compose up -d --scale service=2

As far as I can see traefik already supports this. Not sure if this is the direction you want to go.

Thanks, keep up the good work

@dhh
Copy link
Member

dhh commented Jan 19, 2023

Not needed when using puma. You can set WEB_CONCURRENCY to the number of workers you want to run on the given host as an ENV variable. Also, this isn't using compose behind the scenes, just vanilla Docker 👍

@dhh dhh closed this as completed Jan 19, 2023
@chrisdebruin
Copy link
Contributor Author

Ok. I thought the general idea with docker was to run a single process and don't do forks when running container. Instead you would run container with WEB_CONCURRENCY=1. If you need more workers you just spinup more containers

@dhh
Copy link
Member

dhh commented Jan 19, 2023

Needlessly complicated with no payback. Totally fine to run multiple sub processes of the same overall process.

@lado936
Copy link

lado936 commented Jul 9, 2024

Hello @dhh, what about use case when i am not using rails related framework? we started deploying with kamal, for different type applications and need to have possibility to scale containers in one vm. Is there any possible workaround we can use or should we drop kamal when version 2 will arrive?

@dhh
Copy link
Member

dhh commented Jul 9, 2024

Any framework that's unable to take advantage of multiple processors would not be one I'd spend any time on. I don't think that's a common issue these days, though. But do whatever you need to do to fit the environment you're in. But Kamal is not and will not be built on docker compose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants