For my new project, I have to use Micro Services with Api Gateway. So I gathered detailed informations about Micro Service but the Api Gateway part is not clear.
My question is,
I am using C#.Net to develop Api.
I got some info about Api Gateway from https://www.nginx.com/blog/building-microservices-using-an-api-gateway/
You pretty much asked three questions and they're all somewhat related so I'll try my best to address all three together.
For one, request routing in an API gateway is more than just a proxy and the implementation would not involve conditions to examine the request before shipping it off to a downstream service. API gateway would likely be the only entry point to your services in which authentication would also be taken care of on the layer to make ensure that a request has the permission to go to a downstream service. Authentication is likely to be another service itself. The high level implementation of the API gateway is likely to consolidate most if not all of the endpoints on all the downstream services.
Lets take a small example such as an e-commerce application that includes a service for listing products, searching products, and shopping carts. The API gateway would then also have these same endpoints and will delegate the request further to a service responsible for the request. The API in this example may have /products
to list all products, /products?query=...
to search products, and finally /carts/:id/products
to list the products in a shopping cart. Hope this answers your question.
Aside from that, I know that you've mentioned that its for a new project and just wanted to give you 2 cents that this may not be the best architecture to use for your new project if your team is really small because there is a large operational overhead. Overhead that requires standardization, automating deployments, integration, etc. Its probably best to start off with a traditional MVC architecture and slowly evolve it to microservices when the project has taken off.