title: Why have a supervision tree instead just one centralised supervisor?
body: <p>I'm learning Elixir and Erlang/OTP and would like to understand the significance of having a supervision tree in building highly available system.</p>
  <p>I can see the importance of a supervisor in managing the lifetime of worker processes. But, I still would like to know why do some applications have the need to organise supervisors in the form of hierarchies, instead of just having a single supervisor to manage all the workers? Are there any practical benefits of having such structures that I naively overlooked?</p>
  <p>Borrowing an example from the <a href="https://rads.stackoverflow.com/amzn/click/com/B07DP8Y2GJ" rel="nofollow noreferrer" rel="nofollow noreferrer">Programming Elixir</a> book, in which scenario do we prefer the first structure over the second structure?</p>
  <pre><code>1.  MainSupervisor
      ├── StashWorker
      └── SubSupervisor
          └──SequenceWorker
  
  2.  MainSupervisor
      ├── StashWorker
      └── SequenceWorker
  </code></pre>