{"id":36677091,"url":"https://github.com/barbosaigor/april","last_synced_at":"2026-01-12T10:51:39.590Z","repository":{"id":57511860,"uuid":"239804671","full_name":"barbosaigor/april","owner":"barbosaigor","description":"April is a resiliency tool that proposes to improve confidence in the microservice architecture","archived":false,"fork":false,"pushed_at":"2020-09-03T16:53:41.000Z","size":289,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-15T01:38:43.817Z","etag":null,"topics":["chaos-test","cli","docker","flexible","golang","k8s","microservice","microservice-architecture","microservices","resilience-testing","selection-algorithm","server","testing","yaml"],"latest_commit_sha":null,"homepage":"","language":"Go","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/barbosaigor.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":"2020-02-11T16:05:03.000Z","updated_at":"2023-02-13T22:23:08.000Z","dependencies_parsed_at":"2022-08-31T08:52:33.032Z","dependency_job_id":null,"html_url":"https://github.com/barbosaigor/april","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/barbosaigor/april","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barbosaigor%2Fapril","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barbosaigor%2Fapril/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barbosaigor%2Fapril/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barbosaigor%2Fapril/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barbosaigor","download_url":"https://codeload.github.com/barbosaigor/april/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barbosaigor%2Fapril/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:40:25.642Z","status":"ssl_error","status_checked_at":"2026-01-12T10:39:27.820Z","response_time":98,"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":["chaos-test","cli","docker","flexible","golang","k8s","microservice","microservice-architecture","microservices","resilience-testing","selection-algorithm","server","testing","yaml"],"created_at":"2026-01-12T10:51:39.477Z","updated_at":"2026-01-12T10:51:39.555Z","avatar_url":"https://github.com/barbosaigor.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"res/april-logo.png\" alt=\"April Logo\" width=\"450\"\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  \u003ci\u003eChaos Testing tool\u003c/i\u003e\n  \u003cbr\u003e\n\u003c/p\u003e\n\nApril proposes to improve resilience in microservices architectures. It\ndoes chaos testing by randomly shutting down services, taking into account their importance.  \nApril is similar to other tools, such as Chaos Monkey, Pumba, and Gremlin.\nBut it differs by the selection algorithm, which considers services importances (weights).\nThe selection algorithm firstly picks K services, then it picks N dependencies on those services. Heavy services are more likely to be picked.  \nA Chaos Server must be running to terminate instances, for that, we already have a Docker and Kubernetes Chaos Servers implementations. \nThough, due to April's design, a Chaos Server could easily do anything, such as terminating VMs, overloading a server, turning off a service network, \nor even destroying the world (this is very dangerous).  \n\n## Why should I use April?  \nIn a microservice architecture, we want to make sure that all services are fault-tolerant, primarily critical services.   \nThe main goal of April is to direct your team energy to critical microservices, without losing the randomness needed to simulate unexpected failures in production.  \nSo if we want to test if a service is fault-tolerant, we should nudge its dependencies by terminating some of them. That is what April is about, it terminates services dependencies.  \n\n## Installation  \n```bash \ngo get -u github.com/barbosaigor/april/...\n```   \n\n## Design approach \nApril's design is split into two parts: April CLI and Chaos Server (CS). April CLI runs the algorithm and requests to Chaos Server to terminate instances. \nTherefore, we gain flexibility about technologies that manage instances. A Chaos server could terminate Docker containers, Kubernetes instances, and so on.  \n\n![Aprils design](./res/april-diagram.png)  \n*(Architecture) Eg. A Chaos Server implementation using any technology, such as containerization or orchestration*\n\n## What is a Chaos Server ?\nChaos server hosts an API which terminates instances. It is used by April, \nwhich runs its algorithm and asks the Chaos Server to finish any selected instances. \nAll Chaos Servers implementations must implement the interface defined in april/chaosserver package, so CSs must include that package and\nimplement the ChaosServer interface, where the business logic to terminate instances should be defined.  \n\n## Chaos Servers\nDocker chaos server stop containers [dockercs](https://github.com/barbosaigor/dockercs).  \n(Under development) Kubernetes chaos server terminates pods [kubernetescs](https://github.com/barbosaigor/kubernetescs), in future it may terminate deployments and services.  \n\n## Tools\nChaos test. \nNeed a running 'chaos server' to terminate instances.  \n-f configuraion file path (Default is conf.yml)  \n-n maximum number of services to choose  \n-c chaos server endpoint (Default is localhost:7071)  \n-u username for chaos server auth  \n-s password for chaos server auth  \n```bash \napril -f conf.yml -n 10 -u bob -s mysecret\n```  \n\n*Bare* runs only the selection algorithm, returning a set of services.  \n-f configuraion file path  \n-n maximum number of services to choose  \n```bash \napril bare -f conf.yml -n 10  \n```  \n\n*Server* hosts an API (HTTP) which apply chaos testing and bare algorithm.\nNeed a running 'chaos server' to terminate instances.  \n-p port number (Default is 7070)  \n-c chaos server endpoint (Default is localhost:7071)  \n```bash \napril server -p 8080  // will listen on port 8080\n``` \n## Configuration file\n*Fields*  \n_version_: could be omitted, default is 1   \n_services_: describes a list of services  \n_servicename_: is the name of a service that April is going to work  \n_weight_: represents the service importance for the April pick algorithm  \n_depedencies_: describe a list of services which the service depends  \n_selector_: describe how Chaos Server must search for the service name, default is Infix.  \nE.g If you are using Docker containers and a framework such as Docker Compose,\nCompose will define the container name as a concatenation between your service name and a hash somewhere, in this case, it is better to look for the _infix_ corresponding to the service.  \n\n```yaml\n# template\nversion: 1\nservices:\n    servicename:\n        weight: [0-9]+ (any natural number)\n        dependencies:\n            - [a-zA-Z\\_\\-]* (dependency name)\n        selector: prefix|infix|postfix|exact (how should match the service name instance)\n```  \n\n*Example: ecommerce-conf.yaml*  \n```yaml\nversion: 1\nservices:\n  payment:\n    weight: 10\n    dependencies:\n      - profile\n      - fees\n    selector: postfix  \n\n  fees:\n    weight: 5\n\n  profile:\n    weight: 20\n\n  inventory:\n    weight: 15\n    selector: exact  \n\n  shipping:\n    weight: 5\n    dependencies:\n      - inventory\n      - profile\n\n  storefront:\n    weight: 20\n    dependencies:\n      - shipping\n      - inventory\n      - profile\n      - payment\n      - fees\n```\n```bash\n# bare will just execute the algorithm, without calling CS\n$ april bare -n 3 -f ecommerce-conf.yaml\n\u003e Selected Services:  [profile fees payment]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarbosaigor%2Fapril","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarbosaigor%2Fapril","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarbosaigor%2Fapril/lists"}