{"id":15771564,"url":"https://github.com/trstringer/httpbin2","last_synced_at":"2025-03-31T12:10:38.494Z","repository":{"id":147740034,"uuid":"590221783","full_name":"trstringer/httpbin2","owner":"trstringer","description":"Web server for testing, demo'ing, learning, and many other uses. Great for microservice environments and more!","archived":false,"fork":false,"pushed_at":"2023-03-07T02:39:03.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-11T15:08:33.110Z","etag":null,"topics":["cicd","devops","failure-injection","kubernetes","microservice","microservices","networking","webserver"],"latest_commit_sha":null,"homepage":"","language":"Go","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/trstringer.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":"2023-01-17T23:01:15.000Z","updated_at":"2024-01-31T19:43:50.000Z","dependencies_parsed_at":"2023-05-27T09:15:12.811Z","dependency_job_id":null,"html_url":"https://github.com/trstringer/httpbin2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fhttpbin2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fhttpbin2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fhttpbin2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trstringer%2Fhttpbin2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trstringer","download_url":"https://codeload.github.com/trstringer/httpbin2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246465228,"owners_count":20781919,"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":["cicd","devops","failure-injection","kubernetes","microservice","microservices","networking","webserver"],"created_at":"2024-10-04T15:03:12.799Z","updated_at":"2025-03-31T12:10:38.476Z","avatar_url":"https://github.com/trstringer.png","language":"Go","readme":"# httpbin2\n\nRelay web server for microservices environments and injecting quality of service issues.\n\n## Usage\n\n```\nHTTP server for testing, demo'ing, and learning\n\nUsage:\n  httpbin2 [flags]\n  httpbin2 [command]\n\nAvailable Commands:\n  completion  Generate the autocompletion script for the specified shell\n  help        Help about any command\n  version     Application version\n\nFlags:\n      --delay-max-ms int       High end for response delay (default 0)\n      --delay-min-ms int       Low end for response delay (default 0)\n      --delay-rate int         Delay rate (default 100) (default 100)\n  -h, --help                   help for httpbin2\n      --message string         Message for server to return\n      --message-hostname       Return hostname as message to requests\n  -p, --port int               Listening port (default 8080)\n      --relay strings          Relay routes to request on trigger (can be specified multiple times)\n      --status-code int        HTTP status  code to return (default 200) (default 200)\n      --status-code-rate int   Status code rate (default 100) (default 100)\n\nUse \"httpbin2 [command] --help\" for more information about a command.\n```\n\n### Basic web server\n\nRun a web server that returns a message:\n\n```\n$ httpbin2 --message \"hello world\"\n```\n\nAdd hostname in the message, which is helpful in seeing which instance of the application served the request directly from the response:\n\n```\n$ httpbin2 --message \"hello world\" --message-hostname\n```\n\n### Failure injection\n\nInject a percentage of failed responses:\n\n```\n$ httpbin2 --message \"some failures\" --status-code 500 --status-code-rate 50\n```\n\nThe above returns HTTP/500 half the time (and HTTP/200 the other half).\n\n### Delay injection\n\nInject delays:\n\n```\n$ httpbin2 \\\n    --message \"some delays\" \\\n    --delay-min-ms 1000 \\\n    --delay-max-ms 5000 \\\n    --delay-rate 50\n```\n\nThis delays half of the requests for a duration from 1 to 5 seconds.\n\n### Multiple web server hops\n\nYou can chain web servers together with relays:\n\n```\n$ httpbin2 -p 8081 --message \"first\"\n$ httpbin2 -p 8082 --message \"second\"\n$ httpbin2 --relay \"http://localhost:8081\" --relay \"http://localhost:8082\"\n```\n\nThis is helpful if you're trying to model multiple network hops.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrstringer%2Fhttpbin2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrstringer%2Fhttpbin2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrstringer%2Fhttpbin2/lists"}