Microservices API Gateway Implementation in Spring Boot | Code Decode | Citizen Vaccination Example

preview_player
Показать описание
In this video of code decode we have demonstrate the implementation of api gateway in spring boot which is a part 5 of microservice series by code decode

Udemy Course of Code Decode on Microservice k8s AWS CICD link:

Course Description Video :

What is API gateway in microservices?
API Gateway in Microservices is a Microservices Architecture pattern.

API Gateway is a server and is a single-entry point into the system. API Gateway is responsible for routing the request, composition, and translation of the protocol. All the requests from the clients first come to the API Gateway and the API Gateway routes the request to the correct microservice.

API Gateway can also aggregate the results from the microservices back to the client. API Gateway can also translate between web protocols like HTTP, web socket, etc.

API Gateway can provide every client with a custom API as well.

What is the CQRS pattern in microservice?
CQRS stands for Command Query Responsibility Segregator. Every microservice as per design will have a database per service model or shared database per service. As applications become more complex, the handling of detailed queries and validations also more complex. Traditional CRUD (Create, Read, Update and Delete) data model will become cumbersome to implement and maintain.

CQRS pattern proposes the separation of the read data model (Read) from the writing data model (Create, Update and Delete). The application will be segregated into Command and Query parts. The command part will be responsible for the Create, update, and delete operations. The query part will be responsible for the read operation through materialized views. This segregation provides scalability, ease of maintenance, and optimization of the database.

What is a circuit breaker pattern in Microservices?
Circuit Breaker is a microservice design pattern. In a microservices architecture, it is typical that a request could span multiple services. For any request, if one of the services involved in the response is not working, a circuit Breaker is used to stop the process of request and response.

Without a circuit breaker in place, the client would have continuously sent requests to the service which is down. Resources will get exhausted with low performance and a bad user experience due to this. To avoid this kind of problem, a circuit breaker pattern can be used.

In the case of a circuit breaker pattern, the client will invoke a remote service via a proxy. This proxy will behave as a circuit barrier. In case of failure, when the number of failures crosses a defined threshold number, the circuit breaker will trip for a defined period. During this time, requests to invoke remote service will fail. Once the time-out period for the breaker is complete, a circuit breaker will allow a defined number of tests to pass through, and only when they succeed, a circuit breaker will resume back to normal operation and will start fulfilling the requests.

Subscriber and Follow Code Decode

#codedecode #microservicesinjava #apigateway
Рекомендации по теме
Комментарии
Автор

this is very good tutorial for fresher as well as experienced guys. please post these such informative videos ... Thanks a lot...

funforkids
Автор

I have nerver seen a more to the point and compact tutorial on microservices, these are enough to get you started with microservices.

ayanmukherjee
Автор

Really appreciated, I was fear to learn micro services, but you made it very easy to understand each topic, Thank you so much 🎉

SriHariChukka
Автор

Thanks for your videos on Microservices communication, with Eureka, Fault Tolerance and API Gateway. I am sure it's gonna help me in my coming interviews.

jayjoshi
Автор

Brilliant explanation and demo. It is such a noble work to give such useful resources on web for free. Eagerly waiting for your upcoming videos. Wishing you loads of luck.

samarthurs
Автор

Thanks Code Decode team, I got this channel while searching JAVA 8 video, I completed that and then MS series, waiting for more videos on MS, make video om Config server, Logging tech for MS, security handling and docker and openshift for deployment, it will be great help

pankajsharma
Автор

Get well soon dear... I saw your all videos and I got placed in 2 company... #ThankYou#Nice work... Keep it up.. And will wait for more videos

namratashinde
Автор

Thank you so much but do take care of your health 👍 A long awaited video. Hope you cover the rest of the topics in Microservices please like resilience4j,   centralized logging, distributed tracing, RabbitMQ etc. before deploying into a cloud provider like AWS.

karthikeyanrm
Автор

I am a very big of your channel. Daily I am watching your videos for at least 1 to 2 hours. Could you add videos on microservice design patterns and architecture? Thanks in advance.

ashokkumar
Автор

Thank you soo much!! Please put a video on log4j vulnerability

nagalakshmikesavan
Автор

Thank you for the video..👍👍

One suggestion, videos are not arranged jn playlist correctly. Please arrange in sequence, it's difficult to find and watch the videos in correct sequence for any topic.

sagarmodi
Автор

It was a very good video for beginner like me to understand MS. Please cover rest of the MS topics soon.

shubhisharma
Автор

Yes Please make part 3 of API gateway video. Thank you

sunilroy
Автор

You have given wonderful series of microservices. Well done :)

mayanksharma
Автор

Please continue with this tutorial.... Thank soo much. Please do more videos.

nagireddy
Автор

your all videos are amazing and easy to understand.

ankitgiri
Автор

Thanks a lot. I am waiting for further videos on deploying this application on cloud and how to use filters.

mayurijibhe
Автор

Thanks a lot ..U r a great teacher...
but one doubt..Why did we have load balanced uri for both CITIZEN-SERVICE AND VACCINATION-CENTER-SERVICE in application.yml of API_GATEWAY? We need to load balance both these services as per the flow and both are handled by Eureka..In this point of view this is fine..
but We added LoadBalanced annotation only for VACCINATION-CENTER-SERVICE main app. Is this due to VACCINATION-CENTER-SERVICE consuming CITIZEN-SERVICE and reverse case ( CITIZEN-SERVICE as its not consuming any microservice hence not included loadBalanced annotation inside CITIZEN-SERVICE) ? Can you pls comment on this

muhassinmusthafa
Автор

Thanks for the video. This helps any newbie for sure.

parameswararaokollepara
Автор

This was the cleanest tutorial regarding the API gateway.
But API gateway is kind of pointless without authentication and authorization right ?
Would be greatful if you made some tutorials on how to achieve these, maybe using Oauth2 or something..

ShinAkuma