API gateway for microservices
- API gateway is used to serve as a entry point in your microservices we dont want users to access our microservices individually right?. and in case user need to be authenticated and determine his/her authorization and permission accross our application we dont want every request that user sent will need to type their email and password and if user can access our microservices it can cause security problem thats why api gateway comes into picture that will serve as entry point in all our microservices.
- API Gateway mostly works in frontend meanwhile Service Discovery works in backend doing loadbalancing and other stuff.
- API Gateway will also be registered in discovery service where our microservice are tracked it will use the discovery server to detect where does the user request suppose to go.
- Once the discovery server up and running discovery-server-project
- Run this project
- To access different microservice through API Gateway the URI