Closed usmanbatch8 closed 1 year ago
Building Microservices is a really tough thing to do and while there is a shocking amount of hype around how and why one should build Microservices, there is an equally shocking lack of articles on creating (simple) API gateway's for your Microservices. Either that, or I am shit at using Google (which, quite frankly, is a very feasible thesis).
Either way! Let's talk API Gateway! What is it and why do I need it? API Gateways are used for centralising and distributing API calls. This ensures a single point of contact, directing all traffic through the API gateway, rather than traffic going directly to each microservice. This simplifies ttraffic flow and also comes with a lot of other really neat side-effects, some of which, we will explore in this article.
So, what should my API Gateway do? Well, other than being able to redirect requests to the correct service, the API gateway can help us with securing our microservices. This is typically done, by acting as a proxy and adding authentication and encryption for every requests which requires this. This is super helpful, as it simplifies developers workload, making their lives a lot easier. Instead of developers having to implement SSL and authentication into every single service they write, the API gateway can take care of this for them. So every connection is encrypted and also ensured to be authenticated. Since all traffic is going through the same gateway, we can also simplify logging in our architecture (we won't be covering that in this article however).
Now, there are a lot of other ways to achieve this and other tools for this purpose (such as Kong API Gateway and Spring Boot API Gateway)... If you are using Kubernetes, you are probably aware of the super-hyped Istio service-mesh, which comes with some extra features, that are all super cool. However, for now, let's delve into the simple antics of using NGINX as an API Gateway.
Please don't use this repository for tests and class assignments.
Thank you.
okay sir jee
This is our 1st Docker-nginx image repository for test purpose, I am making because yesterday our Class teacher gave assingment. Please review.
Reegards
Muhammad Usman