{"id":15941298,"url":"https://github.com/ultrabug/uwsgi-consul-demo","last_synced_at":"2026-07-13T18:31:52.730Z","repository":{"id":19518051,"uuid":"22765032","full_name":"ultrabug/uwsgi-consul-demo","owner":"ultrabug","description":"POC on the usage of the consul plugin for uWSGI","archived":false,"fork":false,"pushed_at":"2014-08-14T08:54:57.000Z","size":140,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-16T21:13:02.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ultrabug.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}},"created_at":"2014-08-08T16:58:06.000Z","updated_at":"2014-08-21T21:36:34.000Z","dependencies_parsed_at":"2022-08-21T11:10:48.202Z","dependency_job_id":null,"html_url":"https://github.com/ultrabug/uwsgi-consul-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ultrabug/uwsgi-consul-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ultrabug%2Fuwsgi-consul-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ultrabug%2Fuwsgi-consul-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ultrabug%2Fuwsgi-consul-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ultrabug%2Fuwsgi-consul-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ultrabug","download_url":"https://codeload.github.com/ultrabug/uwsgi-consul-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ultrabug%2Fuwsgi-consul-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35432816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-07T07:03:03.875Z","updated_at":"2026-07-13T18:31:52.710Z","avatar_url":"https://github.com/ultrabug.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"uWSGI Consul.io integration demo\n================================\n\nThis is a proof of concept on the usage of the **consul** plugin for **uWSGI**.\n\nThis illustrates how simple it can be to create a distributed application running through **uWSGI** which can scale up and down automatically by using **Consul.io** for service discovery.\n\nPrerequisities\n==============\n\n* A running `consul` agent : http://www.consul.io/intro/getting-started/install.html\n* A `uWSGI` installation with the consul plugin available : https://github.com/unbit/uwsgi-consul\n* The `consulate` python library (available via pip)\n\nRun the POC\n===========\n\n## Client\nRun a `client` which will query the consul agent for the `consul-demo-server` service and list them on the console:\n\n* Open a terminal and run the `client`\n```sh\npython client.py\n```\n\n* At first, there should be no available service\n```\nno consul-demo-server available\n```\n\n## Servers\nuWSGI will spawn two `servers` pretending to be listening on port `2001` and port `2002` and register them on the configured consul agent (localhost by default):\n\n* Open a terminal and run `uwsgi` using the provided INI\n```sh\nuwsgi --ini uwsgi-consul-demo.ini --ini uwsgi-consul-demo.ini:server1 --ini uwsgi-consul-demo.ini:server2\n```\n\n## Result\nOn the `client` terminal, you can see that it discovered the new services automatically. You can CTRL+C and restart the uwsgi servers on the other terminal and watch the show.\n```\n    consul-demo-server found on node MYHOST (XX.XX.XX.XX) using port 2001\n    consul-demo-server found on node MYHOST (XX.XX.XX.XX) using port 2002\n```\n\nCongratulations, you've experienced your first automated service discovery application !\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fultrabug%2Fuwsgi-consul-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fultrabug%2Fuwsgi-consul-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fultrabug%2Fuwsgi-consul-demo/lists"}