rstudio / helm

Helm Resources for RStudio Products
MIT License
33 stars 28 forks source link

Connect: limiting job replicas? #381

Open pat-s opened 1 year ago

pat-s commented 1 year ago

Hi @colearendt!

We're happily running Connect in HA with 3 pods. Works great WRT to rolling updates and HA in general.

However, each connect app also gets replicated X times as the respective job is executed by each server replica. Is there a way to adjust this? This behavior becomes quite expensive for production apps that take let's say 500 MB mem and min_processes = 3 - which results in > 10 pods reserving 500 MB RAM.

I know one option could be to reduce the overall replicas but I would really like to stay with HA for the server pod.

colearendt commented 1 year ago

Howdy @pat-s ! So glad to hear things are working well for you!

Unfortunately, there is not a way around this today 😞 We do have some work scheduled for longer term letting the Connect hosts "collectively" manage a collection of pods, so min_processes = 3 could be honored in the way you expect.

In the meantime, I would recommend setting min_processes = <desired> / 3 so you would set min_processes = 1 and understand that each node will honor that minimum, so you get 3 pods. This is consistent with how minimum processes worked in the traditional execution environment (min processes on each node). So we have a bit of work to do to refactor that setup!

I will pass this feedback along!!