flame icon indicating copy to clipboard operation
flame copied to clipboard

Hot start a new node when a percentage of max_concurrency is reached

Open DeemoONeill opened this issue 10 months ago • 1 comments

Currently FLAME will only start a new node when the maximum concurrency is reached which can lead to cold starts during heavy load.

Adding a new parameter for "spinup_at_percentage" and being able to pass in something like 0.8. So that a new node starts at 80% capacity to pre-empt load.

These could have an aggressive idle timer so they stop if that capacity isn't used.

Eventually perhaps monitoring the rate of incoming work so that new nodes are spun up if it can't cope.

DeemoONeill avatar Apr 19 '24 10:04 DeemoONeill

I've done an initial implementation in https://github.com/phoenixframework/flame/pull/32 There might be some issues around the new runner becoming the min_runner by default. And balancing load across all of the runners.

a possible way to address that would be to only add a new runner if the current capacity across all runners exceeds the threshold, rather than just the capacity on the min_runner. That would require more extensive changes.

DeemoONeill avatar Apr 22 '24 19:04 DeemoONeill