Skip to content

Chaklader/CurrencyExchnageMicroservices

Repository files navigation

SPRING CLOUD MICRO-SERVICES




Client-side service discovery allows services to find and communicate with each other without hard-coding hostname and port. The only ‘fixed point' in such an architecture consists of a service registry with which each service has to register.

A drawback is that all clients must implement a certain logic to interact with this fixed point. This assumes an additional network round trip before the actual request.

With Netflix Eureka each client can simultaneously act as a server, to replicate its status to a connected peer. In other words, a client retrieves a list of all connected peers of a service registry and makes all further requests to any other services through a load-balancing algorithm.



TYPES OF MICRO-SERVICES



We've implement the following types of microservices to achieve the goal:

  • Service registry (Eureka Server)
  • REST service which registers itself at the registry (Eureka Client)
  • Web application, which is consuming the REST service as a registry-aware client (Spring Cloud Netflix Feign Client)
  • Spring cloud gateway that provides means for routing requests to different micro-services


Italian Trulli

figure: Currency Exchange Micro-services


Italian Trulli

figure: Eureka Server


Italian Trulli

figure: Zipkin Server


Italian Trulli



Italian Trulli



figure: RABBITMQ Server


CLINENT REQUESTS

a. API GATEWAY

http://localhost:8765/currency-conversion/from/USD/to/BDT/quantity/100
http://localhost:8765/currency-conversion-new/from/USD/to/BDT/quantity/100

http://localhost:8765/currency-exchange/from/AUD/to/BDT

b. http://localhost:8000/currency-exchange/from/AUD/to/BDT http://35.231.202.202:8000/currency-exchange-feign/from/AUD/to/INR

c.
http://localhost:8100/currency-conversion/from/USD/to/BDT/quantity/100

http://35.196.139.219:8100/currency-conversion-feign/from/USD/to/INR/quantity/100
http://35.196.139.219:8100/currency-conversion-feign/from/USD/to/INR/quantity/100



DOCKER CONTAINERS EXECUTION





RUN WITH THE COMMANDS



The follwing commands with create the docker imaages and run all the required micro-services -


$ ./create_docker_images.sh
$ docker-compose up



CONTAINER ORCHESTRATION WITH KUBERNETES




Typical features:

  • Auto Scaling
  • service Discovery
  • Load Balancer
  • Self Healing
  • Zero Downtime Deployments



GOOGLE KUBERNETES ENGINE (GKE)


Enter in the microservice namely `` and `` and deploy uisng the commands:
kubectl apply -f deployment.yaml

The deployment.yaml contains all the info about the deployment, service and config map.



Italian Trulli

figure: horizontal deployment architecture


Italian Trulli

figure: list of the services


Italian Trulli

figure: Currency exchange service dashboard


Italian Trulli

figure: Currency conversion service dashboard


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published