ebook PDF - Cracking Spring Microservices Interviews for Java Developers

This ebook discusses 120 plus real problems and their solutions for Spring microservices architecture based on Spring Boot, Spring Cloud, Cloud Native Applications. It covers core concepts of microservices architecture, various design patterns, interview questions & answers, security in microservices, testing strategies and best practices in distributed system design.


Table of Contents
  1. What makes Microservices Better choice than Monotlithic Applications?

  2. Introduction to Spring Boot, Spring Cloud, Cloud Native Applications and Netflix OSS

  3. Design Patterns in microservices architecture - API Gateway, Hystrix, Strangler Pattern, Bulkhead pattern, Circuite Breaker, Fallbacks, Service Discovery etc.

  4. Securing Microservices using OAuth2 and JWT, Token relay, Security context propagation, etc.

  5. Test Strategies - Unit Testing, Integration Testing, Consumer Driven Contract Testing.

  6. Best Practices and Common Pitfalls of microservices architecture


Often bought together (Java Interviews)


199 Instant Delivery


Add to Cart
Download Sample Chapters

Covers the following topics in this ebook

  1. What makes Microservices Better choice than Monotlithic Applications?

  2. Introduction to Spring Boot, Spring Cloud, Cloud Native Applications and Netflix OSS

  3. Design Patterns in microservices architecture - API Gateway, Hystrix, Strangler Pattern, Bulkhead pattern, Circuite Breaker, Fallbacks, Service Discovery etc.

  4. Securing Microservices using OAuth2 and JWT, Token relay, Security context propagation, etc.

  5. Test Strategies - Unit Testing, Integration Testing, Consumer Driven Contract Testing.

  6. Best Practices and Common Pitfalls of micro-services architecture

Microservices Interview Questions

  • How will you define Microservices Architecture?

  • What is Domain Driven Design?

  • What is Bounded Context?

  • What is polygot persistence? Can it be used in monolithic applications as well?

  • Why Microservices are better than Monoliths?

  • How microservices are different than SOA?

  • What is difference between small-services and microservices?

  • What are benefits of using microservices architecture?

  • How to partition correctly into microservices architecture?

  • How big a single microservice should be?

  • How do microservices communicate with each other?

  • What shall be preferred communication style in microservices - synchronous or asynchronous?

  • What is difference between Orchestration and Choreography in microservices context?

  • How to maintain ACID in microservice architecture?

  • How frequent a microservice be released into production?

  • How to achieve zero-downtime during the deployments?

  • How to slowly move users from older version of application to newer version?

  • How will you monitor fleet of microservices in production?

  • How will you troubleshoot a failed API request that is spread across multiple services?

  • What are different layers of a single microservice?

  • How will you develop microservices using Java?

  • Is it a good practice to deploy multiple microservices in a single tomcat container (servlet container)?

  • What are Cloud Native applications?

  • What is Spring Boot?

  • What is Spring Cloud?

  • What is difference between bootstrap.yml and application.yml?

  • How will you implement service discovery in microservices architecture?

  • How does Eureka Server work?

  • How to externalize configuration in a distributed system?

  • How will you use config-server for your development, stage and production environment?

  • What is difference between config first bootstrap and discovery first bootstrap in context of Spring Cloud Config client?

  • How to refresh configuration changes on the fly in Spring Cloud environment?

  • How to achieve client side load balancing in Spring Microservices using Spring Cloud?

  • How to use client side load-balancer Ribbon in your microservices architecture?

  • How to use both LoadBalanced as well as normal RestTemplate object in the single microservice?

  • How will you make use of Eureka for service discovery in Ribbon Load Balancer?

  • Can we use Ribbon without eureka?

  • How will you use ribbon load balancer programatically?

  • What is difference between @EnableEurekaClient and @EnableDiscoveryClient?

  • How to make microservices zone aware so as to prefer same zone services for interservice communication using Spring Cloud? 60

  • How to list all instances of a single microservice in Spring Cloud environment?

  • What is API Gateway?

  • How to protect internal endpoints leaking from API Gateway?

  • How to protect Sensitive Security Tokens from leaking into downstream system?

  • What is Circuit Breaker Pattern?

  • What are Open, Closed and Half-Open states of Circuit Breaker?

  • What are use-cases for Circuit Breaker Pattern?

  • What are benefits of using Circuit Breaker Pattern?

  • Can circuit breaker be used in asynchronous communication?

  • What is Hystrix?

  • What does Hystrix do?

  • How to use Hystrix for fallback execution?

  • When not to use Hystrix fallback on a particular microservice?

  • How will you ignore certain exceptions in Hystrix fallback execution?

  • What is Strangulation Pattern in Microservices?

  • What is Circuit Breaker?

  • What is difference between using a Circuit Breaker and a naive approach where we try/catch a remote method call and protect for failures?

  • What is Request Collapsing feature in Hystrix?

  • What is difference between Circuit Breaker and Hystrix?

  • Where exactly should i use Circuit Breaker Pattern?

  • What is bulkhead design pattern?

  • How does Hystrix implements Bulkhead Design Pattern?

  • What is Hystrix approach to Bulkhead Pattern?

  • In Microservices what are smart endpoints and dumb pipes?

  • What is difference between Semaphore and ThreadPool based configuration in Hystrix?

  • How to handle versioning of microservices?

  • What is difference between partitioning microservices based on technical capabilities vs business capabilities? Which one is better?

  • Running Spring boot app at different port on server startup

  • How will you run certain business logic at the app startup?

  • How to correctly implement a reporting microservice in a distributed system?

  • What is Event Sourcing and CQRS? When should it be used? Should be use it for the entire system?

  • How to send business errors from a RESTful microservice to client application?

  • Is it a good idea to share common database across multiple microservices?

  • How should the technical architecture be for a single microservice?

  • What is 2 Phase commit? Why it should not be used in microservices architecture?

  • What is Eventual Consistency?

  • How will you make sure that the Email is only sent if the database transaction does not fail?

  • How will you atomically update the database and publish an event to message broker from single transaction?

  • How will you propagate security context of user when one microservice calls another microservice on behalf of user?

  • What is Token Relay in Spring Security?

  • How to Enable Token Relay?

  • How to revoke Access and Refresh Tokens on Data Breach to limit the damage?

  • How does Authorization Code Grant Type work?

  • Shall Authentication and Authorization be one service?

  • What is API Key based security?

  • What are Best Practices for Microservices Architecture?

  • Shall we share common domain models or DTOs across microservices?

  • How to share common code across multiple microservices?

  • Take a Proof of Concept Application and slowly apply all best practices to different components of system.

  • What is continuous delivery?

  • How will you improve the performance of distributed system?

  • How will you implement caching for microservices?

  • Which Protocol is generally used for client to service and interservice communication?

  • What is advantage is using Asynchronous Messaging within Microservices Architecture?

  • What is good tool for documenting Microservices?

  • How will you integrate Swagger into your microservices?

  • Where will you find the common properties for Spring Boot?

  • What are good books/resources to learn Microservices?

Product Details

  • 157
  • Munish Chandel
  • February 2018
  • 3,110
  • VWVTPZ3A
  • English
  • PDF
  • ShunyaFoundation
  • Product Available for download right after purchase.

Shunya eLearning Android App


Start your preparation for Exams like HPAS, Allied or Civil Services, Naib Tehsildar, HPPSC with Shunya eLearning Android App.

Get it on Google Play