Internal Gateway

Overview

The Internal Gateway is a simplified Zuul service which provides an easy integration of services running different namespaces of a multistate instance, the clients need not know about all the details of microservices and their namespace in the K8s setup.

Pre-requisites

Before you proceed with the documentation, make sure the following pre-requisites are met -

  • Java 17

  • API Gateway

Key Functionalities

  • Provides an easier API interface between services running in different tenants(namespaces) where direct access between microservices is blocked by default.

  • Allows refactoring microservices independently without forcing the clients to refactor integrating logic with other tenants.

Zuul Components

Route filter - a single route filter enables the routing based on tenatId from the HTTP header of the incoming requests.

Configuration Details

Routing Property

For each service, the below-mentioned property has to be added in internal-gateway.json

{
  "/egov-mdms-service/.*": {
    "in.statea": "http://egov-mdms-service.statea:8080",
    "in.stateb": "http://egov-mdms-service.stateb:8080",
    "in": "http://egov-mdms-service:8080"
  },
  "/pt-calculator-v2/.*": {
    "in.statea": "http://pt-calculator-v2.statea:8080",
    "in.stateb": "http://pt-calculator-v2.stateb:8080",
    "in": "http://pt-calculator-v2.digit:8080"
  },
  "/property-services/.*": {
    "in.stateb": "http://property-services.digit:8080",
    "in.statea": "http://property-services.digit:8080"
  },
  "/billing-service/.*": {
    "in.stateb": "http://billing-service.digit:8080",
    "in.statea": "http://billing-service.digit:8080"
  },
  "/egov-searcher/.*": {
    "in.statea": "http://egov-searcher.statea:8080",
    "in.stateb": "http://egov-searcher.stateb:8080"
  },
  "/dashboard-analytics/.*": {
    "in.statea": "http://dashboard-analytics.statea:8080",
    "in.stateb": "http://dashboard-analytics.stateb:8080"
  }
}

Sequence Diagram

Open

Last updated

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.