Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/baratharivazhagan/spring-cloud-sidecar-polygot
This project contains samples demonstrating the usage of side car polygot
https://github.com/baratharivazhagan/spring-cloud-sidecar-polygot
microservice nodejs side-car sidecar spring-boot spring-cloud zuul-proxy
Last synced: 13 days ago
JSON representation
This project contains samples demonstrating the usage of side car polygot
- Host: GitHub
- URL: https://github.com/baratharivazhagan/spring-cloud-sidecar-polygot
- Owner: BarathArivazhagan
- Created: 2017-08-22T17:08:52.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T17:47:16.000Z (almost 2 years ago)
- Last Synced: 2023-03-07T08:47:55.952Z (over 1 year ago)
- Topics: microservice, nodejs, side-car, sidecar, spring-boot, spring-cloud, zuul-proxy
- Language: Java
- Size: 358 KB
- Stars: 34
- Watchers: 2
- Forks: 22
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# spring-cloud-sidecar-polygot-demo
This project demonstrates the usage of netflix`s side car polygot.
Spring 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.> Note: Branches 1.x.x/2.x.x versions makes it compatible with spring boot versions 1.x.x/2.x.x.
> Kindly choose branch as per spring boot release versions.![side car](images/sidecar.png)
#### Compatability Matrix
choose the branch based on below versions.
Branch/Version
Spring Boot
Spring Cloud
Node Js
master
2.3.0.RELEASE
Hoxton.SR5
14.4.0
2.2.2
2.2.2.RELEASE
Hoxton.RELEASE
12.4.0
2.1.5
2.1.5.RELEASE
Greenwich.SR1
12.4.0
2.1.4
2.1.4.RELEASE
Greenwich.RELEASE
12.4.0
2.1.2
2.1.2.RELEASE
Greenwich.RC2
10.16.0
2.0.3
2.0.3.RELEASE
Finchley.RELEASE
8.16.0
1.5.6
1.5.6.RELEASE
Dalston.SR3
8.16.0
#### Projects
Name
Port
Description
eureka-server
9000
Eureka server - service registration server
csstore-microservice
9001
Service discovery microservice registered with eureka server
msstore-microservice
9002
Service discovery microservice registered with eureka server
sidecar
9004
Side car proxy for routing and filtering to wstore node app
wstore-node-express
3000
Node express (non jvm ) application
zuul-proxy
9005
Zuul proxy for routing and filtering
## How to build and run ?
* Download/Clone the repository :
```
$ git clone https://github.com/BarathArivazhagan/spring-cloud-sidecar-polygot.git
$ cd spring-cloud-sidecar-polygot
```
* Maven build :
```sh
$ ./mvnw clean install
```
* Docker image build :
```sh
# Note change the docker images as per your image name in docker compose file
$ docker-compose build
```
* To run the application :```sh
$ docker-compose up
```## How to test the application ?
Use zuul proxy to route to respective microservices.
zuul route definition :
```
zuul:
routes:
msstore :
path: /msstore/**
url: http://localhost:9002
csstore:
path: /csstore/**
url: http://localhost:9001```
## Service Urls:
http://localhost:9005/msstoremsstore
http://localhost:9005/csstorecsstore
http://localhost:9005/csstorewstore
## Side car route definition
```
zuul:
routes:
wstore:
path: /wstore/**
url: http://localhost:3000sidecar:
port: 3000
health-uri: http://localhost:3000/health```
### Notes :
sidecar.port : Port must be same as the non jvm port
sidecar.health-uri: non jvm application should expose this url with json message {"STATUS" : "UP"} to indicate sidecar the app is UP.## How to test sidecar ?
## Why Zuul as well as side car ?
yes, thats right. `@EnableSideCar` includes `@EnableZuulProxy`,so side car can act as zuul proxy itself.
In order to provide separate proxy for side car(non jvm) based applications, this repo contains two proxieszuul-proxy : provides proxy to jvm based applications.
sidecar : provides proxy to non jvm based applications.## How to rebuild the project after the changes?
```
$ docker-compose build
```## References
* http://cloud.spring.io/spring-cloud-netflix/spring-cloud-netflix.html