{"id":18185171,"url":"https://github.com/baratharivazhagan/spring-cloud-sidecar-polygot","last_synced_at":"2025-06-14T08:32:53.212Z","repository":{"id":42222006,"uuid":"101087716","full_name":"BarathArivazhagan/spring-cloud-sidecar-polygot","owner":"BarathArivazhagan","description":"This project contains samples demonstrating the usage of side car polygot","archived":false,"fork":false,"pushed_at":"2022-12-30T17:47:16.000Z","size":367,"stargazers_count":39,"open_issues_count":8,"forks_count":22,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T02:04:32.462Z","etag":null,"topics":["microservice","nodejs","side-car","sidecar","spring-boot","spring-cloud","zuul-proxy"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/BarathArivazhagan.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}},"created_at":"2017-08-22T17:08:52.000Z","updated_at":"2024-06-26T10:22:03.000Z","dependencies_parsed_at":"2023-01-31T12:31:21.201Z","dependency_job_id":null,"html_url":"https://github.com/BarathArivazhagan/spring-cloud-sidecar-polygot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BarathArivazhagan%2Fspring-cloud-sidecar-polygot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BarathArivazhagan%2Fspring-cloud-sidecar-polygot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BarathArivazhagan%2Fspring-cloud-sidecar-polygot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BarathArivazhagan%2Fspring-cloud-sidecar-polygot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BarathArivazhagan","download_url":"https://codeload.github.com/BarathArivazhagan/spring-cloud-sidecar-polygot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709878,"owners_count":20821298,"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":["microservice","nodejs","side-car","sidecar","spring-boot","spring-cloud","zuul-proxy"],"created_at":"2024-11-02T22:41:52.815Z","updated_at":"2025-04-02T00:31:37.294Z","avatar_url":"https://github.com/BarathArivazhagan.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spring-cloud-sidecar-polygot-demo\nThis project demonstrates the usage of netflix`s side car polygot.\nSpring cloud side car helps to register non jvm applications in eureka service registration server and available as part of service discovery to route traffic to non jvm applications through sidecar proxy. \n\n\u003e \u003cb\u003e Note: \u003c/b\u003e Branches 1.x.x/2.x.x versions makes it compatible with spring boot versions 1.x.x/2.x.x.\n\u003e Kindly choose branch as per spring boot release versions.\n\n![side car](images/sidecar.png)\n\n\n#### Compatability Matrix\n\nchoose the branch based on below versions.\n\n\u003ctable\u003e\n \u003ctr\u003e\n    \u003cth style=\"text-align:left\"\u003eBranch/Version\u003c/th\u003e\n    \u003cth style=\"text-align:left\"\u003eSpring Boot\u003c/th\u003e\n    \u003cth style=\"text-align:left\"\u003eSpring Cloud\u003c/th\u003e\n    \u003cth style=\"text-align:left\"\u003eNode Js\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003emaster\u003c/td\u003e\n    \u003ctd\u003e2.3.0.RELEASE\u003c/td\u003e\n    \u003ctd\u003eHoxton.SR5\u003c/td\u003e\n    \u003ctd\u003e14.4.0\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e2.2.2\u003c/td\u003e\n    \u003ctd\u003e2.2.2.RELEASE\u003c/td\u003e\n    \u003ctd\u003eHoxton.RELEASE\u003c/td\u003e\n    \u003ctd\u003e12.4.0\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e2.1.5\u003c/td\u003e\n    \u003ctd\u003e2.1.5.RELEASE\u003c/td\u003e\n    \u003ctd\u003eGreenwich.SR1\u003c/td\u003e\n    \u003ctd\u003e12.4.0\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e2.1.4\u003c/td\u003e\n    \u003ctd\u003e2.1.4.RELEASE\u003c/td\u003e\n    \u003ctd\u003eGreenwich.RELEASE\u003c/td\u003e\n     \u003ctd\u003e12.4.0\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e2.1.2\u003c/td\u003e\n    \u003ctd\u003e2.1.2.RELEASE\u003c/td\u003e\n    \u003ctd\u003eGreenwich.RC2\u003c/td\u003e\n     \u003ctd\u003e10.16.0\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e2.0.3\u003c/td\u003e\n    \u003ctd\u003e2.0.3.RELEASE\u003c/td\u003e\n    \u003ctd\u003eFinchley.RELEASE\u003c/td\u003e\n     \u003ctd\u003e8.16.0\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e1.5.6\u003c/td\u003e\n    \u003ctd\u003e1.5.6.RELEASE\u003c/td\u003e\n    \u003ctd\u003eDalston.SR3\u003c/td\u003e\n     \u003ctd\u003e8.16.0\u003c/td\u003e\n  \u003c/tr\u003e\n  \n\u003c/table\u003e\n\n#### Projects\n\n\u003ctable\u003e\n \u003ctr\u003e\n    \u003cth style=\"text-align:left\"\u003eName\u003c/th\u003e\n    \u003cth style=\"text-align:left\"\u003ePort\u003c/th\u003e \n    \u003cth style=\"text-align:left\"\u003eDescription\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"https://github.com/BarathArivazhagan/spring-cloud-sidecar-sample/tree/master/eureka-server\"\u003e eureka-server\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e9000\u003c/td\u003e\n    \u003ctd\u003eEureka server - service registration server\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"https://github.com/BarathArivazhagan/spring-cloud-sidecar-sample/tree/master/csstore-microservice\"\u003ecsstore-microservice\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e9001\u003c/td\u003e\n    \u003ctd\u003eService discovery microservice registered with eureka server\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"https://github.com/BarathArivazhagan/spring-cloud-sidecar-sample/tree/master/msstore-microservice\"\u003emsstore-microservice\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e9002\u003c/td\u003e\n    \u003ctd\u003eService discovery microservice registered with eureka server\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"https://github.com/BarathArivazhagan/spring-cloud-sidecar-sample/tree/master/sidecar\"\u003esidecar\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e9004\u003c/td\u003e\n    \u003ctd\u003eSide car proxy for routing and filtering to wstore node app\u003c/td\u003e\n  \u003c/tr\u003e\n   \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"https://github.com/BarathArivazhagan/spring-cloud-sidecar-sample/tree/master/wstore-node-express\"\u003ewstore-node-express\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e3000\u003c/td\u003e\n    \u003ctd\u003eNode express (non jvm ) application \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"https://github.com/BarathArivazhagan/spring-cloud-sidecar-sample/tree/master/zuul-proxy\"\u003ezuul-proxy\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e9005\u003c/td\u003e\n    \u003ctd\u003eZuul proxy for routing and filtering\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n## How to build and run ?\n\n * Download/Clone the repository : \n   \n  ```\n  $ git clone https://github.com/BarathArivazhagan/spring-cloud-sidecar-polygot.git\n  $ cd spring-cloud-sidecar-polygot\n  ```\n * Maven build : \n   \n  ```sh\n   $ ./mvnw clean install\n  ```\n * Docker image build : \n   \n   ```sh\n   # Note change the docker images as per your image name in docker compose file\n   $ docker-compose build \n   ```\n * To run the application :\n\n  ```sh\n  $ docker-compose up\n  ```\n\n## How to test the application ? \n\nUse zuul proxy to route to respective microservices. \n\nzuul route definition : \n\n```\nzuul:\n  routes:\n    msstore :       \n        path: /msstore/**\n        url: http://localhost:9002\n    csstore: \n        path: /csstore/**\n        url: http://localhost:9001\n\n```\n\n## Service Urls:\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"http://localhost:9005/msstore\"\u003ehttp://localhost:9005/msstore\u003c/a\u003e\u003c/td\u003e\u003ctd\u003emsstore\u003c/td\u003e\n  \u003c/tr\u003e\n   \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"http://localhost:9005/csstore\"\u003ehttp://localhost:9005/csstore\u003c/a\u003e\u003c/td\u003e\u003ctd\u003ecsstore\u003c/td\u003e\n  \u003c/tr\u003e\n   \u003ctr\u003e\n    \u003ctd\u003e\u003ca href=\"http://localhost:9004/wstore/home\"\u003ehttp://localhost:9005/csstore\u003c/a\u003e\u003c/td\u003e\u003ctd\u003ewstore\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n## Side car route definition \n\n```\nzuul:\n  routes:\n    wstore: \n      path: /wstore/**\n      url: http://localhost:3000\n\nsidecar:\n  port: 3000\n  health-uri: http://localhost:3000/health\n\n```\n\n### Notes : \n\n\n\u003cb\u003esidecar.port\u003c/b\u003e : Port must be same as the non jvm port \u003cbr\u003e\n\u003cb\u003esidecar.health-uri\u003c/b\u003e: non jvm application should expose this url with json message {\"STATUS\" : \"UP\"} to indicate sidecar the app is UP.\n\n## How to test sidecar ? \n\n\u003cdiv\u003e\n   Navigate to \u003ca href=\"http://localhost:9004/wstore/home\"\u003ehttp://localhost:9004/wstore/home\u003c/a\u003e --\u003e sidecar routes to non jvm(nodejs app)  \n\u003c/div\u003e\n\n## Why Zuul as well as side car ? \n\nyes, thats right. `@EnableSideCar` includes `@EnableZuulProxy`,so side car can act as zuul proxy itself. \nIn order to provide separate proxy for side car(non jvm) based applications, this repo contains two proxies\n\n\u003ci\u003ezuul-proxy\u003c/i\u003e : provides proxy to jvm based applications. \u003cbr\u003e\n\u003ci\u003esidecar \u003c/i\u003e : provides proxy to non jvm based applications.\n\n\n\n## How to rebuild the project after the changes? \n\n```\n$ docker-compose build\n```\n\n\n\n## References \n\n\n* http://cloud.spring.io/spring-cloud-netflix/spring-cloud-netflix.html\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaratharivazhagan%2Fspring-cloud-sidecar-polygot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaratharivazhagan%2Fspring-cloud-sidecar-polygot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaratharivazhagan%2Fspring-cloud-sidecar-polygot/lists"}