{"id":27918753,"url":"https://github.com/juliaparallel/elasticclustermanager.jl","last_synced_at":"2026-01-24T03:34:28.265Z","repository":{"id":277831516,"uuid":"933666180","full_name":"JuliaParallel/ElasticClusterManager.jl","owner":"JuliaParallel","description":"ElasticManager (extracted from ClusterManagers.jl)","archived":false,"fork":false,"pushed_at":"2025-04-08T15:03:32.000Z","size":238,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-04T02:40:33.487Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JuliaParallel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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},"funding":{"custom":"https://numfocus.salsalabs.org/donate-to-julia/index.html"}},"created_at":"2025-02-16T12:19:18.000Z","updated_at":"2025-04-08T14:25:16.000Z","dependencies_parsed_at":"2025-02-16T13:43:15.245Z","dependency_job_id":"04d5e995-9ded-44ad-a957-fe3529f16f63","html_url":"https://github.com/JuliaParallel/ElasticClusterManager.jl","commit_stats":null,"previous_names":["juliaparallel/elasticclustermanager.jl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaParallel%2FElasticClusterManager.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaParallel%2FElasticClusterManager.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaParallel%2FElasticClusterManager.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaParallel%2FElasticClusterManager.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuliaParallel","download_url":"https://codeload.github.com/JuliaParallel/ElasticClusterManager.jl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252742612,"owners_count":21797278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-05-06T18:25:17.221Z","updated_at":"2026-01-24T03:34:23.218Z","avatar_url":"https://github.com/JuliaParallel.png","language":"Julia","funding_links":["https://numfocus.salsalabs.org/donate-to-julia/index.html"],"categories":[],"sub_categories":[],"readme":"# ElasticClusterManager.jl\n\nThe ElasticClusterManager.jl package implements the `ElasticManager`.\n\nThis code originally lived in the [`ClusterManagers.jl`](https://github.com/JuliaParallel/ClusterManagers.jl) package.\n\nThe following managers are implemented in this package:\n\n| Manager | Command to add processors |\n| ---------------- | ------------------------- |\n| ElasticManager | `addprocs(ElasticManager(...)` |\n\n## Using `ElasticManager` (dynamically adding workers to a cluster)\n\nThe `ElasticManager` is useful in scenarios where we want to dynamically add workers to a cluster.\nIt achieves this by listening on a known port on the master. The launched workers connect to this\nport and publish their own host/port information for other workers to connect to.\n\nOn the master, you need to instantiate an instance of `ElasticManager`. The constructors defined are:\n\n```julia\nElasticManager(;addr=IPv4(\"127.0.0.1\"), port=9009, cookie=nothing, topology=:all_to_all)\nElasticManager(port) = ElasticManager(;port=port)\nElasticManager(addr, port) = ElasticManager(;addr=addr, port=port)\nElasticManager(addr, port, cookie) = ElasticManager(;addr=addr, port=port, cookie=cookie)\n```\n\nYou can set `addr=:auto` to automatically use the host's private IP address on the local network, which will allow other workers on this network to connect. You can also use `port=0` to let the OS choose a random free port for you (some systems may not support this). Once created, printing the `ElasticManager` object prints the command which you can run on workers to connect them to the master, e.g.:\n\n```julia\njulia\u003e em = ElasticManager(addr=:auto, port=0)\nElasticManager:\n  Active workers : []\n  Number of workers to be added  : 0\n  Terminated workers : []\n  Worker connect command :\n    /home/user/bin/julia --project=/home/user/myproject/Project.toml -e 'using ElasticClusterManager; ElasticClusterManager.elastic_worker(\"4cOSyaYpgSl6BC0C\",\"127.0.1.1\",36275)'\n```\n\nUse `ElasticClusterManager.get_connect_cmd(em; kwargs...)` to generate a suitable system command to start up a\nworker process, e.g.:\n\n```julia\nprint(ElasticClusterManager.get_connect_cmd(em; absolute_exename=false, same_project=false))\n```\n\n```\n/home/user/bin/julia --project=/home/user/myproject/Project.toml -e 'using ElasticClusterManager; ElasticClusterManager.elastic_worker(\"4cOSyaYpgSl6BC0C\",\"127.0.1.1\",36275)'\n```\n\nBy default, the printed command uses the absolute path to the current Julia executable and activates the same project as the current session.\n\nOnce workers have connected, `show(em)` should show them added to the list of active workers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliaparallel%2Felasticclustermanager.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliaparallel%2Felasticclustermanager.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliaparallel%2Felasticclustermanager.jl/lists"}