On-Demand processes

Hey thanks :slight_smile:

“many” to me means “too many to keep all states in memory at the same time”. This is also why I thought timeouts to be rather short, more in seconds than in hours, so memory is freed quickly.

I know that Phoenix requests are requests, that is what I call the “calling process” in my post. But they are very short lived, there aren’t too many at the same time. On the other hand when a user use such request to spawn work in the system, that work may take time, and can accumulate quickly. This is why I try to free resources as soon as possible.

Now it’s true that an empty supervisor dedicated to tasks spawned by one user does not take much. But imagine you have 10K users, doesn’t having 10k empty supervisors running for nothing feel useless?