{"id":19049856,"url":"https://github.com/emalm/cff-info-demo","last_synced_at":"2026-06-23T11:31:56.332Z","repository":{"id":73135085,"uuid":"207650124","full_name":"emalm/cff-info-demo","owner":"emalm","description":"CFF Info App demo","archived":false,"fork":false,"pushed_at":"2019-09-18T15:25:59.000Z","size":825,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-12T11:32:12.136Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emalm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-09-10T19:50:20.000Z","updated_at":"2019-09-18T15:26:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"6e5b1b64-35ac-4370-8bb5-b318b6317a96","html_url":"https://github.com/emalm/cff-info-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/emalm/cff-info-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emalm%2Fcff-info-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emalm%2Fcff-info-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emalm%2Fcff-info-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emalm%2Fcff-info-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emalm","download_url":"https://codeload.github.com/emalm/cff-info-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emalm%2Fcff-info-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34686727,"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-23T02:00:07.161Z","response_time":65,"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":[],"created_at":"2024-11-08T23:12:07.783Z","updated_at":"2026-06-23T11:31:56.316Z","avatar_url":"https://github.com/emalm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cff-info-demo\n\nA small two-tier web app to illustrate some of the service-mesh routing and networking features in the Cloud Foundry Application Runtime (CFAR).\n\n\n## Prerequisites\n\n- Install the `cf` CLI.\n- Install the `jq` command-line tool.\n- Log into a CFAR installation with the Istio service mesh enabled.\n- Change to the root directory of this repository.\n- Run `export CF_DOMAIN=\u003cREPLACE_WITH_CF_DOMAIN\u003e` with `\u003cREPLACE_WITH_CF_DOMAIN\u003e` replaced with the base apps domain for your CFAR installation.\n\n\n## Service-Mesh Load Balancing\n\nPush the front-end CFF info apps:\n\n```\ncf push -f manifests/cff-info-v1.yml\ncf push -f manifests/cff-info-v2.yml\n```\n\nMap an Istio ingress route to the `cff-info-v1` app\n\n```\ncf map-route cff-info-v1 \"istio.$CF_DOMAIN\" -n cff-info\n```\n\nPush the back-end CFF member info apps:\n\n```\nfor n in abby chip swarna;\ndo\n  cf push -f \"manifests/member-$n.yml\"\ndone\n```\n\nAdd network policies from the front-end apps to the back-end member apps:\n\n```\n./scripts/set-network-policies\n```\n\nMake a request to the front-end app:\n\n```\ncurl \"cff-info.istio.$CF_DOMAIN/random\"\n```\n\nMake additional requests and observe that the member info changes while the URL and resolved IP in the member request metadata remain the same.\n\n\n### Fault handling\n\nChange the `member-chip` app to listen on port 9999 instead of on 8080:\n\n```\ncf set-env member-chip BAD_LISTENER true\ncf restart member-chip\n```\n\nMake several requests to the random CFF info page and observe that sometimes the front-end app makes several requests to the back-end internal route before getting a successful response.\n\nChange the `member-chip` app to listening on 8080:\n\n```\ncf unset-env member-chip BAD_LISTENER\ncf restart member-chip\n```\n\n\n## Weighted Routing\n\nSet the weighted-routing rules to send 80% of traffic to the v1 CFF info app and 20% to the v2 CFF info app:\n\n```\n./scripts/set-route-weights 80\n```\n\nMake many requests to the random info page and observe differences in styling.\n\n\nSet the weighted-routing rules to send 10% of traffic to the v1 CFF info app and 90% to the v2 CFF info app:\n\n```\n./scripts/set-route-weights 90\n```\n\nMake many more requests to the random info page and observe the new style eventually occurs much more frequently.\n\nReturn to routing 100% of traffic to the v1 CFF info app:\n\n```\n./scripts/clear-route-weights\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femalm%2Fcff-info-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femalm%2Fcff-info-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femalm%2Fcff-info-demo/lists"}