Create an API Gateway with Load Balancer Using Java

Used Libraries

  1.   Netflix Eureka naming server 
  2.   Netflix Zuul
  3.   Ribbon
  4.   Feign

Network Architecture of the system

This Architecture Contains Four Applications

  1. Load balancing application [netflix-eureka-naming-server]
  2. API gateway application [api-gateway-server]
  3. Server application [micro-service-server]
  4. Client application [micro-service-client]

Steps To Run The Applications

  1. Install JDK 11 or latest. 
  2. Clone git repository of the project into local.
  3. Github: https://github.com/VishnuViswam/LOAD-BALANCER-WITH-API-GATEWAY.git
  4. Run Load balancing application first. 
  5. Run The API gateway application.
  6. Then run Server application in two ports. 
  7. At last run Client application.

1) Load Balancing Application

All client server communication will be done through this load balancing server application. 

Getting Started With Spring Cloud Gateway

In this article, we will integrate spring cloud gateway with a microservice-based architecture application using spring cloud. In the process, we will use spring cloud gateway as a gateway provider, Netflix Eureka as a discovery server, with circuit breaker pattern using Netflix Hystrix.

Let's quickly get started with the implementation of it.