{"id":23577183,"url":"https://github.com/team-telnyx/pogo","last_synced_at":"2026-02-13T18:33:59.314Z","repository":{"id":149513264,"uuid":"621804923","full_name":"team-telnyx/pogo","owner":"team-telnyx","description":"Distributed supervisor for clustered Elixir applications","archived":false,"fork":false,"pushed_at":"2023-10-03T08:44:20.000Z","size":55,"stargazers_count":103,"open_issues_count":2,"forks_count":3,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-09-30T19:43:14.836Z","etag":null,"topics":["distributed","elixir","supervisor"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/team-telnyx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-31T12:27:33.000Z","updated_at":"2025-07-16T22:07:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"0ba5da47-b80e-4bd9-80ed-baf434850bb5","html_url":"https://github.com/team-telnyx/pogo","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/team-telnyx/pogo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/team-telnyx%2Fpogo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/team-telnyx%2Fpogo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/team-telnyx%2Fpogo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/team-telnyx%2Fpogo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/team-telnyx","download_url":"https://codeload.github.com/team-telnyx/pogo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/team-telnyx%2Fpogo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29414279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["distributed","elixir","supervisor"],"created_at":"2024-12-26T22:27:07.744Z","updated_at":"2026-02-13T18:33:59.299Z","avatar_url":"https://github.com/team-telnyx.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pogo\n\nPogo is a distributed supervisor for clustered Elixir applications.\n\nIt uses battle-tested distributed named process groups (`:pg`) under the hood to maintain cluster-wide state and coordinate work between local supervisors running on different nodes.\n\nFeatures of distributed supervisor:\n\n  * automatically chooses a node to locally supervise child process\n  * a child process running in the cluster can be started or stopped using any local supervisor\n  * ensures a child is started only once in the cluster (as long as its child spec is unique)\n  * redistibutes children when cluster topology changes\n\nYou can read more in an [introductory article](https://szajbus.dev/elixir/2023/05/22/pogo-distributed-supervisor-for-elixir.html).\n\n## Installation\n\nThe package can be installed by adding `pogo` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:pogo, \"~\u003e 0.3.0\"}\n  ]\nend\n```\n\n## Documentation\n\nFull documentation can be found at [hexdocs.pm/pogo](https://hexdocs.pm/pogo).\n\n## Example usage\n\nLet's imagine we have an application running on multiple nodes that needs to monitor some external services and we want each of these services to be monitored only once.\n\nStart `Pogo.DynamicSupervisor` under application's supervision tree, locally on each node. All these local supervisors will form a distributed supervisor named `MyApp.DistributedSupervisor`.\n\n```elixir\ndefmodule MyApp.Application do\n  use Application\n\n  @impl true\n  def start(_type, _args) do\n    children = [\n      {Pogo.DynamicSupervisor, [name: MyApp.DistributedSupervisor, scope: :my_app]}\n    ]\n\n    Supervisor.start_link(children, strategy: :one_for_one)\n  end\nend\n```\n\nNow request service monitor processes to be started as children of our distributed supervisor. It can be done on any of the nodes or even on all of them, the distributed supervisor will determine which of the local ones will actually start each child.\n\n```elixir\nfor service_ip \u003c- [\"10.0.0.1\", \"10.0.0.2\", \"10.0.0.3\"] do\n  Pogo.DynamicSupervisor.start_child(\n    MyApp.DistributedSupervisor,\n    %{\n      id: {MyApp.ServiceMonitor, service_ip},\n      start: {MyApp.ServiceMonitor, :start_link, [ip: service_ip]}\n    }\n  )\nend\n```\n\nWe can list locally and globally supervised child processes.\n\n```elixir\nPogo.DynamicSupervisor.which_children(MyApp.DistributedSupervisor, :local)\n# [{MyApp.ServiceMonitor, \"10.0.0.2\"}, #PID\u003c0.2010.0\u003e, :worker, [MyApp.ServiceMonitor]]\n\nPogo.DynamicSupervisor.which_children(MyApp.DistributedSupervisor, :global)\n# [\n#   {MyApp.ServiceMonitor, \"10.0.0.2\"}, #PID\u003c0.2010.0\u003e, :worker, [MyApp.ServiceMonitor],\n#   {MyApp.ServiceMonitor, \"10.0.0.1\"}, #PID\u003c4461.199.10\u003e, :worker, [MyApp.ServiceMonitor],\n#   {MyApp.ServiceMonitor, \"10.0.0.3\"}, #PID\u003c306.320.94\u003e, :worker, [MyApp.ServiceMonitor]\n# ]\n```\n\nTo request a child to be terminated, its id needs to be provided. The request can be made on any of the nodes irrespective of whether the child is supervised locally or not.\n\n```elixir\nPogo.DynamicSupervisor.terminate_child(\n  MyApp.DistributedSupervisor,\n  {MyApp.ServiceMonitor, \"10.0.0.3\"}\n)\n```\n\n## Acknowledgments\n\nOriginal version of this library was developed by [Guilherme Balena Versiani](https://github.com/balena).\n\n## License\n\nGNU Lesser General Public License v3.0, see [`LICENSE`](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteam-telnyx%2Fpogo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteam-telnyx%2Fpogo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteam-telnyx%2Fpogo/lists"}