{"id":13510090,"url":"https://github.com/opendiffy/diffy","last_synced_at":"2025-05-14T16:13:14.236Z","repository":{"id":39498758,"uuid":"131174363","full_name":"opendiffy/diffy","owner":"opendiffy","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-02T02:56:41.000Z","size":28681,"stargazers_count":1316,"open_issues_count":14,"forks_count":151,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-04-12T22:17:17.323Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/opendiffy.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-26T15:17:07.000Z","updated_at":"2025-04-12T10:43:08.000Z","dependencies_parsed_at":"2024-01-13T19:25:27.486Z","dependency_job_id":"2f213307-8b15-4537-89aa-fc7f5aeb8586","html_url":"https://github.com/opendiffy/diffy","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendiffy%2Fdiffy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendiffy%2Fdiffy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendiffy%2Fdiffy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opendiffy%2Fdiffy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opendiffy","download_url":"https://codeload.github.com/opendiffy/diffy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637786,"owners_count":21137538,"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-08-01T02:01:23.726Z","updated_at":"2025-04-12T22:17:40.118Z","avatar_url":"https://github.com/opendiffy.png","language":"Java","funding_links":["https://www.buymeacoffee.com/diffy"],"categories":["Java","Scala","others","测试"],"sub_categories":[],"readme":"# Diffy\n[![Project status](https://img.shields.io/badge/status-active-brightgreen.svg)](#status)\n[![Docker](https://img.shields.io/docker/pulls/diffy/diffy)](https://hub.docker.com/r/diffy/diffy)\n[![Downloads](https://img.shields.io/github/downloads/opendiffy/diffy/total.svg)](https://github.com/opendiffy/diffy/releases/latest)\n[![License: CC](https://img.shields.io/badge/License-CC%20BY%20NC%20ND-blue.svg)](https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode)\n\n[![Build status](https://github.com/opendiffy/diffy/actions/workflows/maven_macos_13.yml/badge.svg\n)](https://github.com/opendiffy/diffy/actions/workflows/maven_macos_13.yml)\n[![Build status](https://github.com/opendiffy/diffy/actions/workflows/maven_macos_12.yml/badge.svg\n)](https://github.com/opendiffy/diffy/actions/workflows/maven_macos_12.yml)\n[![Build status](https://github.com/opendiffy/diffy/actions/workflows/maven_macos_latest.yml/badge.svg\n)](https://github.com/opendiffy/diffy/actions/workflows/maven_macos_latest.yml)\n\n[![Build status](https://github.com/opendiffy/diffy/actions/workflows/maven_windows_latest.yml/badge.svg\n)](https://github.com/opendiffy/diffy/actions/workflows/maven_windows_latest.yml)\n[![Build status](https://github.com/opendiffy/diffy/actions/workflows/maven_windows_2022.yml/badge.svg\n)](https://github.com/opendiffy/diffy/actions/workflows/maven_windows_2022.yml)\n[![Build status](https://github.com/opendiffy/diffy/actions/workflows/maven_windows_2019.yml/badge.svg\n)](https://github.com/opendiffy/diffy/actions/workflows/maven_windows_2019.yml)\n\n[![Build status](https://github.com/opendiffy/diffy/actions/workflows/maven_ubuntu_latest.yml/badge.svg\n)](https://github.com/opendiffy/diffy/actions/workflows/maven_ubuntu_latest.yml)\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/diffy)\n## Status\n\nDiffy is used in production at:\n* [Mixpanel](https://engineering.mixpanel.com/safely-rewriting-mixpanels-highest-throughput-service-in-golang-mixpanel-engineering-62cd69b5ebdb)\n* Airbnb [(Scalabity)](https://www.infoq.com/presentations/airbnb-services-scalability/) [(Migration)](https://www.infoq.com/presentations/airbnb-soa-migration/)\n* [Twitter](https://blog.twitter.com/engineering/en_us/a/2015/diffy-testing-services-without-writing-tests.html)\n* Baidu\n* Bytedance\n\nand blogged about by cloud infrastructure providers like:\n* [Microsoft](https://microsoft.github.io/code-with-engineering-playbook/automated-testing/shadow-testing/)\n* [Google](https://cloud.google.com/architecture/application-deployment-and-testing-strategies#shadow_test_pattern)\n* [Alibaba Cloud](https://www.alibabacloud.com/blog/traffic-management-with-istio-3-traffic-comparison-analysis-based-on-istio_594545)\n* [KrakenD](https://www.krakend.io/blog/migrate-aws-api-gateway-to-krakend/)\n* [Datawire](https://blog.getambassador.io/next-level-testing-with-an-api-gateway-and-continuous-delivery-9cbb9c4564b5)\n\nVisit our [engineering blog](https://content.sn126.com/blog) to keep up with the latest developments in Diffy.\n\nDiffy is being actively developed and maintained by the engineering team at [Sn126](https://www.sn126.com).\n\nFeel free to contact us via [discord](https://discord.gg/QEJRxgVfD8), [linkedin](https://www.linkedin.com/company/diffy), or [twitter](https://twitter.com/diffyproject).\n\n## What is Diffy?\n\nDiffy finds potential bugs in your service using running instances of your new code and your old\ncode side by side. Diffy behaves as a proxy and multicasts whatever requests it receives to each of\nthe running instances. It then compares the responses, and reports any regressions that may surface\nfrom those comparisons. The premise for Diffy is that if two implementations of the service return\n“similar” responses for a sufficiently large and diverse set of requests, then the two\nimplementations can be treated as equivalent and the newer implementation is regression-free.\n\n## How does Diffy work?\n\nDiffy acts as a proxy that accepts requests drawn from any source that you provide and multicasts\neach of those requests to three different service instances:\n\n1. A candidate instance running your new code\n2. A primary instance running your last known-good code\n3. A secondary instance running the same known-good code as the primary instance\n\nAs Diffy receives a request, it is multicast and sent to your candidate, primary, and secondary\ninstances. When those services send responses back, Diffy compares those responses and looks for two\nthings:\n\n1. Raw differences observed between the candidate and primary instances.\n2. Non-deterministic noise observed between the primary and secondary instances. Since both of these\n   instances are running known-good code, you should expect responses to be in agreement. If not,\n   your service may have non-deterministic behavior, which is to be expected.\n![Diffy Topology](/images/diffy_topology.png)\n\nDiffy measures how often primary and secondary disagree with each other vs. how often primary and\ncandidate disagree with each other. If these measurements are roughly the same, then Diffy\ndetermines that there is nothing wrong and that the error can be ignored.\n\n## Documentation\n\nDetailed Diffy Documentation is available [here](https://content.sn126.com/docs/diffy).\n\n### Support\nPlease reach out to isotope@sn126.com for support. We look forward to hearing from you.\n\n### Code of Conduct\n1. Bug reports are welcome even if submitted anonymously via fresh github accounts.\n2. Anonymous feature and support requests will be ignored.\n\n## License\n\n    Copyright (C) 2019 Sn126, Inc.\n\n    This license allows reusers to copy and distribute the material in \n    any medium or format in unadapted form only, for noncommercial purposes \n    only, and only so long as attribution is given to the creator. \n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License\n    for more details.\n\n    You should have received a copy of the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0\n    International Public License along with this program. If not, see \n    https://creativecommons.org/licenses/by-nc-nd/4.0/.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopendiffy%2Fdiffy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopendiffy%2Fdiffy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopendiffy%2Fdiffy/lists"}