Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Docker and OTP: Friends or Foes?

Daniel Azuma
September 07, 2018

Docker and OTP: Friends or Foes?

Presentation by Daniel Azuma at ElixirConf 2018. Discusses ideas for making OTP applications work together with container-based deployments. More information at http://daniel-azuma.com/elixirconf2018

Daniel Azuma

September 07, 2018
Tweet

More Decks by Daniel Azuma

Other Decks in Programming

Transcript

  1. Web client Tanx Phoenix app Game Server Game Updater Game

    Supervisor Javascript HTTP/ websocket
  2. Web client Tanx Phoenix app Game Server Game Updater Game

    Supervisor HTTP/ websocket Javascript
  3. Web client Tanx Phoenix app Channel Game Server Game Updater

    Game Supervisor HTTP/ websocket Javascript
  4. Web client Tanx Phoenix app Channel Game Server Game Updater

    Game Supervisor HTTP/ websocket Load Balancer Javascript
  5. Web client Tanx Phoenix app Channel Game Server Game Updater

    Game Supervisor HTTP/ websocket messages Load Balancer Javascript
  6. Web client Tanx Phoenix app Channel Game Server Game Updater

    Game Supervisor HTTP/ websocket messages Load Balancer Javascript
  7. Web client Tanx Phoenix app Channel Game Server Game Updater

    Game Supervisor HTTP/ websocket messages Load Balancer Javascript
  8. Web client Tanx Phoenix app Channel Game Server Game Updater

    Game Supervisor HTTP/ websocket messages Load Balancer Javascript
  9. Load Balancer Web client Tanx Phoenix app Channel Game Server

    Game Updater Game Supervisor HTTP/ websocket messages Docker Container Javascript
  10. Load Balancer Web client Tanx Phoenix app Channel Game Server

    Game Updater Game Supervisor HTTP/ websocket messages Docker Container Updated Container Javascript
  11. Load Balancer Web client Tanx Phoenix app Channel Game Server

    Game Updater Game Supervisor HTTP/ websocket messages Docker Container Updated Container Javascript
  12. Load Balancer Web client Tanx Phoenix app Channel Game Server

    Game Updater Game Supervisor HTTP/ websocket messages Docker Container Updated Container Javascript
  13. Load Balancer Web client Tanx Phoenix app Channel Game Server

    Game Updater Game Supervisor Javascript HTTP/ websocket messages Docker Container Updated Container
  14. ?

  15. Load Balancer Web client Tanx Phoenix app Channel Game Server

    Game Updater Game Supervisor Javascript HTTP/ websocket messages Node 2 Node 1
  16. Load Balancer Web client Tanx Phoenix app Channel Game Server

    Game Updater Game Supervisor Javascript HTTP/ websocket messages Node 2 Node 1
  17. Load Balancer Web client Tanx Phoenix app Channel Game Server

    Game Updater Game Supervisor Javascript HTTP/ websocket messages Node 2 Node 1
  18. Load Balancer Web client Tanx Phoenix app Channel Game Server

    Game Updater Game Supervisor Javascript HTTP/ websocket messages Node 2 Node 1 ❗
  19. Load Balancer Web client Tanx Phoenix app Game Server Game

    Updater Game Supervisor Javascript HTTP/ websocket Node 2 Node 1
  20. Load Balancer Web client Tanx Phoenix app Game Server Game

    Updater Game Supervisor Javascript HTTP/ websocket Node 2 Node 1
  21. Load Balancer Web client Tanx Phoenix app Channel Game Server

    Game Updater Game Supervisor Javascript HTTP/ websocket messages Node 2 Node 1
  22. Load Balancer Web client Tanx Phoenix app Channel Game Server

    Game Updater Game Supervisor Javascript HTTP/ websocket messages Node 2 Node 1
  23. Load Balancer Web client Tanx Phoenix app Channel Game Server

    Game Updater Game Supervisor Javascript HTTP/ websocket messages Node 2 Node 1
  24. Node 2 Game Server Game Updater Game Supervisor Node 1

    Horde Supervisor Horde Supervisor Tanx Phoenix app
  25. Node 2 Game Server Game Updater Game Supervisor Node 1

    Horde Supervisor Horde Supervisor Tanx Phoenix app
  26. Node 2 Game Server Game Updater Game Supervisor Node 1

    Horde Supervisor Horde Supervisor Game Server Game Updater Game Supervisor Tanx Phoenix app
  27. Node 2 Game Server Game Updater Game Supervisor Node 1

    Horde Supervisor Horde Supervisor Tanx Phoenix app
  28. Node 2 Game Server Game Updater Game Supervisor Node 1

    Horde Supervisor Horde Supervisor Handoff CRDT Handoff CRDT Tanx Phoenix app
  29. Node 2 Game Server Game Updater Game Supervisor Node 1

    Horde Supervisor Horde Supervisor Handoff CRDT Handoff CRDT Tanx Phoenix app
  30. Node 2 Game Server Game Updater Game Supervisor Node 1

    Horde Supervisor Horde Supervisor Handoff CRDT Handoff CRDT Tanx Phoenix app SIGTERM
  31. Node 2 Game Server Game Updater Game Supervisor Node 1

    Horde Supervisor Horde Supervisor Handoff CRDT Handoff CRDT Tanx Phoenix app SIGTERM
  32. Node 1 Horde Supervisor Handoff CRDT Handoff CRDT Node 2

    Game Server Game Updater Game Supervisor Horde Supervisor Tanx Phoenix app
  33. Node 1 Horde Supervisor Handoff CRDT Handoff CRDT Node 2

    Game Server Game Updater Game Supervisor Horde Supervisor Game Server Game Updater Game Supervisor Tanx Phoenix app
  34. Node 1 Horde Supervisor Handoff CRDT Handoff CRDT Node 2

    Game Server Game Updater Game Supervisor Horde Supervisor Game Server Game Updater Game Supervisor Tanx Phoenix app
  35. Node 2 Game Server Game Updater Game Supervisor Channel Node

    1 Horde Supervisor Horde Supervisor Handoff CRDT Handoff CRDT
  36. Node 2 Game Server Game Updater Game Supervisor Channel Node

    1 Horde Supervisor Horde Supervisor Handoff CRDT Horde Registry Handoff CRDT Horde Registry
  37. Node 2 Game Server Game Updater Game Supervisor Channel Node

    1 Horde Supervisor Horde Supervisor Handoff CRDT Horde Registry Handoff CRDT Horde Registry register
  38. Node 2 Game Server Game Updater Game Supervisor Channel Node

    1 Horde Supervisor Horde Supervisor Handoff CRDT Horde Registry Handoff CRDT Horde Registry m essages
  39. Node 1 Horde Supervisor Handoff CRDT Handoff CRDT Node 2

    Game Server Game Updater Game Supervisor Horde Supervisor Game Server Game Updater Game Supervisor Tanx Phoenix app Channel Horde Registry Horde Registry reregister
  40. Connect Erlang cluster — Move/restart processes — Hand off process

    state — Maintain communication — LibCluster Horde Supervisor CRDT Horde Registry