Understanding supervisor

Hi all,

I need help on understanding supervisor role in “ordinary” web architecture.

I’m thinking the data flow will be like the following (notice the plurals):

client → Load Balancer (LB) → elixir apps → workers

or

client → LB → elixir apps → supervisor → workers

or

client → LB → elixir apps → LB → workers

or

client → LB → elixir apps → message queue → workers

The questions are:

  1. Where the supervisor should resides?
  2. Does LB and MQ diminish the role of a supervisor?

Or I might be wrong at all as thinking OTP supervisor as infrastructure layer supervisor.