{"id":50350497,"url":"https://github.com/komamitsu/phi-accrual-failure-detector","last_synced_at":"2026-06-15T12:01:39.576Z","repository":{"id":45918480,"uuid":"42814837","full_name":"komamitsu/phi-accrual-failure-detector","owner":"komamitsu","description":"A port of Akka's Phi Accrual Failure Detector","archived":false,"fork":false,"pushed_at":"2023-09-10T02:16:00.000Z","size":74,"stargazers_count":48,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-01-14T04:57:26.905Z","etag":null,"topics":["failure-detector","java"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/komamitsu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-09-20T13:57:04.000Z","updated_at":"2025-08-02T07:38:17.000Z","dependencies_parsed_at":"2022-09-03T02:11:24.452Z","dependency_job_id":null,"html_url":"https://github.com/komamitsu/phi-accrual-failure-detector","commit_stats":null,"previous_names":["komamitsu/phi-accural-failure-detector"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/komamitsu/phi-accrual-failure-detector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komamitsu%2Fphi-accrual-failure-detector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komamitsu%2Fphi-accrual-failure-detector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komamitsu%2Fphi-accrual-failure-detector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komamitsu%2Fphi-accrual-failure-detector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/komamitsu","download_url":"https://codeload.github.com/komamitsu/phi-accrual-failure-detector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komamitsu%2Fphi-accrual-failure-detector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34361403,"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-06-15T02:00:07.085Z","response_time":63,"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":["failure-detector","java"],"created_at":"2026-05-29T21:00:23.919Z","updated_at":"2026-06-15T12:01:39.567Z","avatar_url":"https://github.com/komamitsu.png","language":"Java","funding_links":[],"categories":["容错组件"],"sub_categories":["微服务框架"],"readme":"# phi-accrual-failure-detector\nA port of [Akka's Phi Accrual Failure Detector](https://github.com/akka/akka/blob/master/akka-remote/src/main/scala/akka/remote/PhiAccrualFailureDetector.scala).\n\nImplementation of 'The Phi Accrual Failure Detector' by Hayashibara et al. as defined in [their paper](http://ddg.jaist.ac.jp/pub/HDY+04.pdf)\n\nThe suspicion level of failure is given by a value called φ (phi). The basic idea of the φ failure detector is to express the value of φ on a scale that is dynamically adjusted to reflect current network conditions. A configurable threshold is used to decide if φ is considered to be a failure.\n\nThe value of φ is calculated as:\n\n    φ = -log10(1 - F(timeSinceLastHeartbeat)\n\nwhere F is the cumulative distribution function of a normal distribution with mean and standard deviation estimated from historical heartbeat inter-arrival times.\n\n## Install\n\n### Gradle\n\n    dependencies {\n        compile 'org.komamitsu:phi-accrual-failure-detector:1.0.0'\n    }\n\n### Maven\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.komamitsu\u003c/groupId\u003e\n        \u003cartifactId\u003ephi-accrual-failure-detector\u003c/artifactId\u003e\n        \u003cversion\u003e1.0.0\u003c/version\u003e\n    \u003c/dependency\u003e\n \n \n## Usage\n \n    PhiAccrualFailureDetector failureDetector = new PhiAccrualFailureDetector.Builder().build();\n    System.out.println(\"The node is alive.\");\n    for (int i = 0; i \u003c 5; i++) {\n        failureDetector.heartbeat();\n        System.out.println(failureDetector.phi());\n        TimeUnit.SECONDS.sleep(1);\n    }\n    System.out.println(\"The node got crashed.\");\n    for (int i = 0; i \u003c 5; i++) {\n        System.out.println(failureDetector.phi());\n        TimeUnit.SECONDS.sleep(1);\n    }\n    System.out.println(\"The node is up.\");\n    for (int i = 0; i \u003c 5; i++) {\n        failureDetector.heartbeat();\n        System.out.println(failureDetector.phi());\n        TimeUnit.SECONDS.sleep(1);\n    }\n\n    \u003e\u003e\u003e\n    The node is alive.\n    0.07503303214093988\n    0.04123372001754947\n    0.02973367253880404\n    0.024211164763365475\n    0.0210350451959075\n    The node got crashed.\n    0.434230547557814\n    2.026327722139659\n    5.53345508216027\n    12.239567237632542\n    23.67083400864969\n    The node is up.\n    0.09372488186862751\n    0.09191309083825062\n    0.08979724362880628\n    0.0875398030863105\n    0.08525179892208078\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkomamitsu%2Fphi-accrual-failure-detector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkomamitsu%2Fphi-accrual-failure-detector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkomamitsu%2Fphi-accrual-failure-detector/lists"}