{"id":15570898,"url":"https://github.com/nicolaslm/nucleon","last_synced_at":"2025-04-05T16:11:02.563Z","repository":{"id":82950418,"uuid":"44497081","full_name":"NicolasLM/nucleon","owner":"NicolasLM","description":"Dynamic load balancer written in Rust","archived":false,"fork":false,"pushed_at":"2023-09-06T16:59:10.000Z","size":19,"stargazers_count":430,"open_issues_count":2,"forks_count":23,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-29T15:11:24.654Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NicolasLM.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2015-10-18T21:21:48.000Z","updated_at":"2025-03-25T01:54:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"1bc1e26f-576b-4ccd-bea6-482c2ccb0c93","html_url":"https://github.com/NicolasLM/nucleon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicolasLM%2Fnucleon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicolasLM%2Fnucleon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicolasLM%2Fnucleon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicolasLM%2Fnucleon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NicolasLM","download_url":"https://codeload.github.com/NicolasLM/nucleon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247361695,"owners_count":20926643,"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":"2024-10-02T17:49:09.812Z","updated_at":"2025-04-05T16:11:02.529Z","avatar_url":"https://github.com/NicolasLM.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Nucleon\n=======\n\nNucleon is a dynamic TCP load balancer written in Rust. It has the ability to\ninsert and remove backend servers on the fly. To do that it leverages [Redis\nPub/Sub](http://redis.io/topics/pubsub) mechanism. Adding or removing a server\nto a cluster is as easy as publishing a message to Redis.\n\nHow to build it\n---------------\n\nAll you need to build it is [Rust\n1.3](https://doc.rust-lang.org/stable/book/installing-rust.html).\n\nJust go in the repository and issue:\n\n    $ cargo build --release\n\nUsage\n-----\n\nNucleon can be used with or without a Redis database. When ran without Redis it\nis not possible to add or remove load balanced servers without restarting the\nprocess.\n\n```\nUsage:\n    nucleon [OPTIONS] [SERVER ...]\n\nDynamic TCP load balancer\n\npositional arguments:\n  server                Servers to load balance\n\noptional arguments:\n  -h,--help             show this help message and exit\n  -b,--bind BIND        Bind the load balancer to address:port (127.0.0.1:8000)\n  -r,--redis REDIS      URL of Redis database (redis://localhost)\n  --no-redis            Disable updates of backend through Redis\n  -l,--log LOG          Log level [debug, info, warn, error] (info)\n```\n\nImagine you have two web servers to load balance, and a local Redis. Run the\nload balancer with:\n\n    nucleon --bind 0.0.0.0:8000 10.0.0.1:80 10.0.0.2:80 \n\nNow imagine that you want to scale up your infrastructure by spawning a new web\nserver at 10.0.0.3. Just send a message to the Redis channel `backend_add`:\n\n    redis:6379\u003e PUBLISH backend_add 10.0.0.3:80\n    (integer) 1\n\nYour will see in logs:\n\n    INFO - Load balancing server V4(10.0.0.1:80)\n    INFO - Load balancing server V4(10.0.0.2:80)\n    INFO - Now listening on 0.0.0.0:8000\n    INFO - Subscribed to Redis channels 'backend_add' and 'backend_remove'\n    INFO - Added new server 10.0.0.3:80\n\nIf you decide that you do not need server 2 any longer:\n\n    redis:6379\u003e PUBLISH backend_remove 10.0.0.2:80\n    (integer) 1\n\nHow does it perform?\n--------------------\n\nSurprisingly well. A quick comparison with HA Proxy in TCP mode with a single\nbackend containing a single server using iperf results in:\n\n| Connections |   HA Proxy   |    Nucleon    |\n| -----------:| ------------:| -------------:|\n|           1 | 15.1 Gbits/s | 15.7 Gbits/s  |\n|          10 | 13.5 Gbits/s | 11.3 Gbits/s  |\n|         100 |  8.9 Gbits/s | 10.5 Gbits/s  |\n\nKeep in mind that this is a really simple test, far from what real life traffic\nlooks like. A real benchmark should compare short lived connections with long\nrunning one, etc.\n\nLicence\n-------\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolaslm%2Fnucleon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicolaslm%2Fnucleon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolaslm%2Fnucleon/lists"}