Search⌘ K
AI Features

Starting Per-User Processes with a Dynamic Supervisor

Explore how to start and manage processes for each user using dynamic supervisors in Elixir. Understand defining child specs, handling process lifecycles, and controlling restarts to build robust, scalable systems.

Now we need to start a process per user. There are two reasons for doing this:

  • We don’t have a fixed number of processes to start.

  • We’ll also need to be able to look them up based on a user’s attributes.

Hence, we will need a structure that is a little more sophisticated. We will use a dynamic supervisor.

Properties and requirements of dynamic

...