{"id":19253623,"url":"https://github.com/pazfelipe/circuit-breaker","last_synced_at":"2026-04-08T16:01:53.917Z","repository":{"id":246431568,"uuid":"821077570","full_name":"pazfelipe/circuit-breaker","owner":"pazfelipe","description":"Simple example to show how we can implement circuit breaker system","archived":false,"fork":false,"pushed_at":"2024-06-27T21:30:37.000Z","size":94,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T17:13:14.472Z","etag":null,"topics":["circuit-breaker","express","flask","nodejs","python"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/pazfelipe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2024-06-27T19:06:42.000Z","updated_at":"2024-12-27T04:07:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"4dd35891-f21a-4fd4-ae92-ba3ba372f828","html_url":"https://github.com/pazfelipe/circuit-breaker","commit_stats":null,"previous_names":["pazfelipe/circuit-broker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pazfelipe/circuit-breaker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pazfelipe%2Fcircuit-breaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pazfelipe%2Fcircuit-breaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pazfelipe%2Fcircuit-breaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pazfelipe%2Fcircuit-breaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pazfelipe","download_url":"https://codeload.github.com/pazfelipe/circuit-breaker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pazfelipe%2Fcircuit-breaker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31562697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"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":["circuit-breaker","express","flask","nodejs","python"],"created_at":"2024-11-09T18:32:19.295Z","updated_at":"2026-04-08T16:01:53.901Z","avatar_url":"https://github.com/pazfelipe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Microservices with Circuit Breaker\n\nThis repository contains two APIs, one built with Python (Flask) and the other with Node.js (TypeScript and Express). Both APIs are configured with Docker Compose to restart every 10 seconds, simulating timeouts or data loss scenarios. Circuit Breaker patterns are implemented to handle failures gracefully.\n\n## Setup\n\n### Prerequisites\n\n- Docker\n- Docker Compose\n\n### Installation\n\n1. Clone the repository:\n\n```sh\ngit clone https://github.com/pazfelipe/circuit-broker.git\ncd circuit-broker\ndocker-compose up --build -d\n```\n\n2. Build and start the services:\n\n```sh\ndocker-compose up --build -d\n```\n\n## Endpoints\n\n### Python API\n\n • /status - Returns the status of the Python API.\n • /data - Returns a sample data from the Python API.\n • /node-data - Fetches data from the Node.js API using a Circuit Breaker.\n\n### Node.js API\n\n • /status - Returns the status of the Node.js API.\n • /data - Returns a sample data from the Node.js API.\n • /python-data - Fetches data from the Python API using a Circuit Breaker.\n\n## Testing\n\n### Python API\n\n```sh\ncd python_api\npytest\n```\n\n### Node.js API\n\n```sh\ncd node_api\nnpm test\n```\n\n## Circuit Breaker\n\nBoth APIs implement the Circuit Breaker pattern to handle failures gracefully and prevent cascading failures across services.\n\n**Python API**\n\nUses the _pybreaker_ library.\n\n**Node.js API**\n\nUses the _opossum_ library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpazfelipe%2Fcircuit-breaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpazfelipe%2Fcircuit-breaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpazfelipe%2Fcircuit-breaker/lists"}