-
Notifications
You must be signed in to change notification settings - Fork 1
API Gateway
Darshan Shinde edited this page Feb 14, 2020
·
3 revisions
For all requests coming from UI, API Gateway is the single point of contact, which navigates each request to its appropriate destination microservice instance. API Gateway is responsible for hiding all internal business logic from users. Hence, API Gateway is one of the most important components of the system and a single point of failure in the system.
- node
- npm Refer: https://nodejs.org/en/download/
npm install
- Zookeeper and Kafka should be running before starting the API Gateway micro-service.
To install and configure Zookeeper and Kafka refer: https://www.c-sharpcorner.com/article/step-by-step-installation-and-configuration-guide-of-apache-kafka-on-windows-ope/
- Go to Kafka installation directory and run following command
For Windows:
bin\windows\kafka-topics.bat --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic T3
For Linux/ Mac:
bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic T3
node server.js
Note: The API Gateway micro-service will run on port 8000