https://github.com./wkgcass/vproxy
- make sure you have
gradle
anddocker
commands.
The application source code is under src
directory, it's written in java. Both Frontend
and Service
are executable.
The Frontend
accepts requests, and forward them to corresponding Service
s. The Service
will respond with its container id and listening port.
The vproxy
configurations can be found under dockerfiles/vproxy-service-mesh-example/
directory: frontend.vproxy.conf
and discovery.conf
. Sidecars of both Frontend
and Service
require discovery.conf
, but only the sidecar of Frontend
require frontend.vproxy.conf
because the Service
s here only expose themselves but would not make requests to other nodes.
The frontend.vproxy.conf
defines how to find services of my-service-a
and my-service-b
, and also defines how to handle the incoming requests and redirect them to these services.
The discovery.conf
defines how the nodes find each other. You may refer to the documentation about discovery.conf
in vproxy repository.
The Service
program is designed to be able to automatically register itself to the vproxy discovery network, and also be able to deregister itself before actually exiting, in this way, netflow will not be affected when running docker stop
commands.
./make.sh
./run.sh
./check.sh
./stop.sh
./remove-image.sh
I provided a client for you to use in your own project, check ServiceRegisterClient.java
for more info.