flame
flame copied to clipboard
Hot start a new node when a percentage of max_concurrency is reached
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.
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.