top of page

Microservices Architecture Questions

  • Writer: Anand Nerurkar
    Anand Nerurkar
  • May 4
  • 2 min read

🔹

1. What are microservices? How do they differ from monolithic architecture?

  • Answer: Microservices are a software architectural style where an application is composed of small, independent services that communicate over lightweight protocols like HTTP or messaging queues (e.g., Kafka).

  • Difference:

    • Monolith: tightly coupled, single deployable unit.

    • Microservices: loosely coupled, independently deployable.

2. How do you handle inter-service communication?

  • Answer: Via REST APIs, gRPC, or asynchronous messaging (Kafka, RabbitMQ).

    • Use service discovery (e.g., Istio, Consul) for dynamic endpoint resolution.

    • Async messaging preferred for decoupling and fault tolerance.

3. How do you ensure data consistency in microservices?

  • Answer:

    • Use eventual consistency via event sourcing or CDC (Change Data Capture).

    • Implement sagas for distributed transactions (choreography or orchestration).

    • Ensure idempotency and retry logic for safe operation.

4. What patterns do you use to secure microservices?

  • Answer:

    • OAuth2.0 / OIDC (Azure AD integration).

    • API Gateway + Istio Ingress for authentication and rate limiting.

    • mTLS for inter-service communication.

    • Secrets management via Azure Key Vault.

5. How do you manage configuration across environments?

  • Answer: Use centralized config servers (e.g., Spring Cloud Config, Azure App Configuration), environment variables, or secret stores.

🔹 Azure-Specific Architecture Questions

6. What is AKS and why use it for microservices?

  • Answer:

    • AKS (Azure Kubernetes Service) is a managed Kubernetes service.

    • Simplifies container orchestration, auto-scaling, rolling upgrades, and integrates with Azure Monitor, ACR, and DevOps pipelines.

7. How do you integrate Azure AD with Spring Boot?

  • Answer:

    • Use spring-security-oauth2 and azure-spring-boot-starter-active-directory.

    • Configure client ID, tenant ID, and secret in application properties.

8. Explain Istio’s role in Azure Kubernetes environment.

  • Answer:

    • Service mesh that manages traffic routing, observability, telemetry, mTLS security, and policy enforcement.

    • Integrated with AKS using sidecar proxy (Envoy).

9. How do you monitor microservices on Azure?

  • Answer:

    • Use Azure Monitor + Application Insights + Log Analytics.

    • Grafana with Prometheus for custom metrics.

    • Distributed tracing with OpenTelemetry or Jaeger.

10. Describe a secure Azure network setup for microservices.

  • Answer:

    • Use VNet, subnets, NSG (Network Security Group), Azure Firewall, and Private Endpoints.

    • Ingress via Traffic Manager → Front Door/App Gateway → AKS/Istio Gateway.

    • Egress controlled via UDR + Firewall rules.

🔹 DevOps & CI/CD Questions

11. How do you implement CI/CD for Spring Boot microservices in Azure?

  • Answer:

    • Use Azure DevOps Pipelines for build-test-deploy.

    • Build Docker images → Push to Azure Container Registry (ACR) → Deploy to AKS.

    • Helm charts or Kustomize for Kubernetes manifests.

12. How do you handle rollback in Kubernetes deployments?

  • Answer:

    • Use Kubernetes deployment strategies like rolling updates with health checks.

    • kubectl rollout undo for quick rollback.

🔹 Scenario-Based Questions

13. You have latency in a downstream microservice. How do you detect and resolve it?

  • Answer:

    • Use distributed tracing (OpenTelemetry, Jaeger).

    • Monitor API latency in Azure Monitor.

    • Add caching (Redis), bulkhead, and circuit breaker (Resilience4j) patterns.

14. Design a fault-tolerant digital banking app using Azure microservices.

  • Answer:

    • Use AKS with multi-AZ.

    • Kafka for async communication.

    • Istio for retries/failover.

    • Azure SQL + Redis for data + caching.

    • Monitor with App Insights.

    • Secure with Azure AD, Key Vault, mTLS.

 
 
 

Recent Posts

See All
Ops Efficiency 30 % improvement

how did you achieve 30 % operational efficiency Achieving 30% operational efficiency in a BFSI-grade, microservices-based personal...

 
 
 

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
  • Facebook
  • Twitter
  • LinkedIn

©2024 by AeeroTech. Proudly created with Wix.com

bottom of page