Microservices Asynchronous synchronous Design Interview Questions and Answers| Part -4 | Code Decode

preview_player
Показать описание
Microservice asynchronous synchronous communication Interview questions and answers we have covered in this video of code decode

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

Course Description Video :

How does synchronous and asynchronous communication work?

Applications generate messages in the form of calls to functions, services and APIs. The way an architect designs these communications affects the application's performance, resource consumption and ability to execute tasks.

When microservices communicates synchronously, it sits idle until it receives a call, response, value or other data transfer. For example, synchronous execution occurs during vaccination slot booking, A user decides to book a slot, and the system generates a query to determine if slot is available. The app waits for a response before starting the slot booking process. This synchronous design prevents mismatches between slot booking and slot availability.

Conversely, asynchronous communication allows code to continue to run after it has generated a call or response. Asynchronous communication is particularly valuable for reporting and alerts, such as sending emails and text messages of slot booked to citizens

What did u use in your project and why? Pros and cons of each communication method

Both have potential pros and cons, but the method you choose depends on an application's purpose.

Pros of Synchronous Communication
Synchronous communication is simpler in design

Cons -
carries the risk of spreading failures across services

Way to mitigate failures in Synchronous communication -
The architect must implement sophisticated service discovery and application load balancing among microservices.

What did u use in your project and why? Pros and cons of each communication method

Cons -
Asynchronous communication has lesser architectural simplicity and data consistency

Pros of Asynchronous Communication
Resilience and scalability
Provide better control over failures than synchronous setups
Loosely coupled Micro services.

When to use which communication method

When we start creating the application from scratch go with a synchronous system to optimize for speed of evolution

And then once your microservices architecture grows and starts becoming complex and multifunctional then focus on switching to asynchronous communications. Identify all possible communications your microservice do to interact with order Microservices. Figure out if it strictly needs to be synchronous. If the response is really not necessary to proceed with other functionalities then convert that communication channel to Asynchronous communication channel ( like with ActiveMQ, Rabbit Mq, kafka etc)

Subscriber and Follow Code Decode

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

Thank you looking forward for Kafka and all other series of playlists to move forward. 🧑‍💻 Thanks for the detailed explanations. 🤗

johnnybreathe
Автор

It's really a very good series. Every knowledge is in depth. Thanks for publishing this type of content.

VipulNilesh
Автор

Thank you codedecode team. Pls continue with Kafka series. Its It's helpful

padmalankipalli
Автор

the way of your teaching it was awesome.

vangapallivenkateswarlu
Автор

Can you please include microservices design patterns in this series. This is most frequently asked interview question now-a-days when we say we know microservices. Thanks for detailed explanation of all topics.

priyag
Автор

Thank you for great content. Looking ahead for next concepts of MS.

shrutik
Автор

Even tough topics are easy to understand with your teachings ❤❤❤

archanayuvaraj
Автор

Its a clear cut explanation, for beginners like me..

aghalraman
Автор

Great content. Can you also make on video detail on multithreading that includes Executer service, callable interface and all

pranjalsingh
Автор

Thank you codedecode, looking forward for Kafka .

AshishYadav-sedb
Автор

Thanks for uploading one more video ...helping a lot...

tanveersyed
Автор

Really thanks for this amazing tutorials, Really appreciated 😍

amrmagdy
Автор

Kindly make a video on kafka. It will be more usability.

sumantasamal
Автор

Can you make a video on multithreading concept clearly.

varunsiddarth
Автор

How we can break Immutability of class through serilazation can you make video on this interview question

mohammedajazquadri
Автор

Oracle interview Questions and even serialisation interview questions

mohammedajazquadri
Автор

Mam can you plz make a video on docker in spring boot?

TheGuidingLight
Автор

Hello mam, Where we can get the slides of all microservices videos ?

yogeshjoshi
Автор

Please continue with Kafka real time scenario

priyankajadhavar
Автор

Mam your teaching and explanation quality along with your provided notes are of superior standards, but kindly keep your voice bit calm and composed. You explain everything at 20x speed and most of the words are missed exactly . So Mam please be little slow while teaching. 😢

mukeshswain