Search This Blog

Saturday, February 1, 2025

Q1-Q5

Q1 What are microservices?
Q2: What are the various ways of communication between microservices?
Q3: How to implement Load balancing in MS. What are the different tpes of load balancing. 
Q4: How we can do Monitoring, health check, log aggregation in MS. 
Q5: How hosting of microservice in general is planned?
----------------------------------------------------------------------------------------------------------------
Q1 What are microservices?

Answer:
Microservices are an architectural approach where an application is built as a collection of small, independent services, each responsible for a specific business function, communicating through APIs. They allow faster development, scalability, and easier maintenance compared to a single large monolithic application.
----------------------------------------------------------------------------------------------------------------

Q2: What are the various ways of communication between microservices?

Answer:

1. RPC (Remote procedure Invocation) - This include communication b/w two MS sync/ asyc using REST, SOAP or gPRC protocols. 

2. Messaging services - Communication b/w MS with the help of messsaing service in b/w eg - Kafka, RabbitMQ, Azure Storage Queue, Azure Service Bus etc

3. Service Registry: a Service Registery middleware between multiple MS. eg Zookeper, Azure API management can also be used. 

4. API Gateway: Single point of contact for multiple MS. similar to Service Registry but more modern approach. We can implement Authentication at G/W as well. eg Azure API GW, Ocelot. 
----------------------------------------------------------------------------------------------------------------
Q3: How to implement Load balancing in MS. What are the different tpes of load balancing. 

Answer:
LB can be of 
1) Round Robin
2) Capacity - based on capacity of hosted env, eg ms is hosted on higher ram than we can plan more incoming request to that node, 
3) Weight: We can plan more incoming request to MS which is hosted near to our region.
----------------------------------------------------------------------------------------------------------------
Q4: How we can do Monitoring, health check, log aggregation in MS. 

Answer:
famous tools are Grafana for monitoring
Splunk and DataDog for log aggregation. 
----------------------------------------------------------------------------------------------------------------
Q5: How hosting of microservice in general is planned?

Answer:
Usually, MS are packaged with dependencies into container images. Docker is one of the famous tools used to create container images called docker images. Then these images are hosted and orchestrated using Kubernetes. 

Other than Docker, we can use Azure service like ACI, Azure Container instance to create images (non-docker) from the ms. 

Other than Kubernetes, we can use Azure Kubernetes Services AKS for orchestration. 
----------------------------------------------------------------------------------------------------------------



No comments:

Post a Comment

Q31-Q35

Q31: What is pods and how it is related to Docker images and Docker containers? Q32: What is the use of Compose Docker file? Q33. What are t...