50 microservices interview questions for Java developers

Upasana | November 22, 2020 | 2 min read | 1,250 views | microservices-architecture


In this article we will discuss top 50 Spring Microservices interview questions for experienced Java Developers.
  • What is Spring Boot? What are advantages of using Spring Boot?

  • What are microservices?

  • What are differences between SOA and Microservices architecture?

  • Why would you opt for microservices architecture?

  • What are advantages and disadvantages of microservices?

  • What are key characteristics of Microservices?

  • What is Spring Cloud?

  • What are advantages of using Spring Cloud?

  • How will you decompose a given business functionality into microservices architecture?

  • Define Domain Driven Design?

  • What is Bounded Context?

  • What is Idempotent operation? Which methods should be made idempotent?

  • What is eventual consistency?

  • What is client side load balancing, how is it implemented in Spring Cloud?

  • How to implement server side load balancing using Spring Cloud?

  • How will you write a bare minimal spring cloud application?

Concepts

  • What is 12 factor app?

  • What is coupling and cohesion?

  • How does microservices architecture look like?

Security

  • What is OAuth2 protocol at a high level?

  • How to propagate security context from one microservice to another?

  • What is client credentials?

Testing

  1. How will you test microservices? What are major challenges in microservices testing?

  2. What is PACT?

  3. What is CDC? Consumer Driven Contracts,

  4. How to test a single component using Spring Boot WebMvcTest?

Deployment

  • How do you deploy a simple spring boot based application?

  • What is blue-green deployment pattern?

  • What is Docker? how to deploy spring boot application using docker?

Best Practices

  1. Common Mistakes Made While Transitioning To Microservices

Microservices Design Patterns

Service Boundary Decomposition Patterns

  1. Decompose by Domain (aka business capability)

  2. Strangler Pattern

Integration Patterns

  1. Service registration and discovery pattern: Netflix Eureka Service, Discovery Client, etc.

  2. API Gateway pattern: Netflix Zuul API Gateway, Spring Cloud Gateway.

  3. Aggregator pattern

Database Patterns

  1. Database per service pattern

  2. What is Saga pattern?

Logging Patterns

  1. Log correlation and distributed tracing pattern: How to correlate logs when a single API call spans across multiple microservices? Anything about Zipkin and Sleuth?

  2. Log aggregation: How to aggregate logs from different microservices into a centralized system for easy access. ELK (Elastic Search Logstash and Kibana), and Graylog, etc.

  3. Performance metrics: How to gather performance metrics? Tracing in distributed systems.

Resiliency Patterns

  1. What is Circuit Breaker Design Pattern in microservices? Talk about netflix hystrix implementation.

  2. Bulk head design pattern. Hystrix implementation using netflix OSS

  3. Client side load-balancing. How to achieve client side load balancing using netflix ribbon.

Development Patterns

  1. Distributed configuration management

  2. Asynchronous messaging: RabbitMQ, Kafka, ActiveMQ etc for asynchronous messaging in distributed systems.

  3. Inter-service communication: Async and Sync communication. RestTemplate and WebClient for inter service communication. OpenFeign as a declarative REST client.

Deployment Patterns

  1. Blu-Green deployment pattern

  2. Using AWS Code deploy for deployment

  3. Docker containerization


Buy my ebook for complete question bank

Most of these questions has been answered in my eBook "Cracking the Core Java Interview" updated on June 2018, that you can buy from this link:

Buy from Shunya (DRM Free PDF download with updates)

Top articles in this category:
  1. Cracking Spring Microservices Interviews - question bank
  2. Why Microservices are better than Monoliths
  3. How will you Partition a typical e-shop into Microservices Architecture
  4. Is it a good practice to deploy multiple microservices in a single tomcat container
  5. Spring Cloud and its advantages
  6. What is Spring Boot and what are its advantages

Recommended books for interview preparation:

Find more on this topic:
Buy interview books

Java & Microservices interview refresher for experienced developers.