What are Microservices?
Microservices are the architectural approach to build applications from small to large scale applications. With this architectural approach, an application is broken down into the smallest components, independent of each other. Unlike Monolithic architecture, where all the functionalities are targeted to build into a single project/application, Microservices helps to separate functionalities to develop in a more modular way and all modules work together to accomplish the specific targeted tasks.
Need of a Microservice
This architectural approach to developing software gives more modularity, being lightweight, and the ability to share similar functionalities across multiple applications. It is a major way of designing and optimizing app development towards a cloud-native model.
To develop quality software, the faster development process for change in existing software features, easy to tackle any runtime issues after deployment into production. As we have challenges in every positive idea, Microservices also have the challenges like managing them aligning them to work without downtimes, because we maintain them in different servers and have to deal with the data and databases they use for transactions.
Understanding API Gateway (Ocelot Gateway with example)
API Gateway is nothing but a middleware layer of directing incoming HTTP request calls from Client applications to specific Microservice without directly exposing the Microservice details to the Client and returning the responses generated from the respective Microservice.
Ocelot is an Open-Source API Gateway for the .NET/Core Platform which is officially supported by Microsoft. What it does is simple. It mimics masking multiple microservices existing behind that the client does not have to worry about the location of each and every Microservice.
5 сен 2024