getkuby / kuby-core

A convention over configuration approach for deploying Rails apps. https://getkuby.io
MIT License
580 stars 26 forks source link

Add support to configure the number of web workers for puma #124

Closed zhall0624 closed 1 year ago

zhall0624 commented 1 year ago

This PR fixes an issue my team was having with resource consumption for non production environments, with two replicas and 4 workers per replica an app that operates at 500MB of memory usage consumes 4GB. I've added an option to specify the number of workers that puma spawns so users have more granular control over their webservers and their resource consumption. I've left the default number of workers at 4 to prevent any breaking changes to user's configs.

camertron commented 1 year ago

Awesome, thanks for this @zhalltyemill 😄 Could you have a look at the Sorbet failures? Otherwise I think this looks good 👍

zhall0624 commented 1 year ago

Yep sorry about that. I'll get those fixed up still getting the hang of sorbet.

camertron commented 1 year ago

Integration tests are passing in master, so I have published v0.19.0 🎉

zhall0624 commented 1 year ago

awesome, thanks!