Sunday, May 6, 2018

Cracking Microservices Architecture Java Interview Questions

Table of Contents

IDE and softwares required for microservices developmen

1. Core Concepts in Microservices

1.1. Cohesion

1.2. Coupling

1.3. Immutability in Microservices

1.4. Open/Close Principle

1.5. DRY (Don’t Repeat Yourself)

1.6. SOLID

1.7. Single Responsibility Principle

1.8. 8 Fallacies of Distributed Computing

1.9. Continuous Integration (CI)

1.10. CAP Theorem
1.11. 12 Factor App

1.12. Typical Git workflow for a real project.

2. Introduction to Microservices.

2.1. Characteristics of a microservices architectur

2.2. Benefits of using Microservices Architecture

2.3. Challenges in Microservices.

2.4. Difference between Microservices and SOA 


3. Microservices Interview Questions .

3.1. How will you define Microservices Architecture
3.2. What is Domain Driven Design?
3.3. What is Bounded Context?
3.4. What is polyglot persistence? Can this idea be used in monolithic applications as well?
3.5. Why Microservices are better than Monoliths?
3.6. Isn’t in process communication in monolithic application faster than tons of remote network
calls in microservices architecture?
3.7. How microservices are different than SOA?
3.8. What is difference between small-services and microservices?
3.9. What are benefits of using microservices architecture?
3.10. How to partition a large application into microservices architecture, correctly?
3.11. How big a single microservice should be?
3.12. How do microservices communicate with each other?
3.13. What shall be preferred communication style in microservices: synchronous or asynchronous?
3.14. What is difference between Orchestration and Choreography in microservices context?
3.15. How to maintain ACID in microservice architecture?
3.16. How frequent a microservice be released into production?
3.17. How to achieve zero-downtime during the deployments?
3.18. How to achieve zero downtime deployment(blue/green) when there is a database change?
3.19. How to slowly move users from older version of application to newer version?
3.20. How will you monitor fleet of microservices in production?
3.21. How will you troubleshoot a failed API request that is spread across multiple services?
3.22. What are different layers of a single microservice?
3.23. How will you develop microservices using Java?
3.24. Is it a good practice to deploy multiple microservices in a single tomcat container (servlet container)?
3.25. What are Cloud Native applications?
3.26. What is Spring Boot?
3.27. What is Spring Cloud?
3.28. What is difference between application.yml and bootstrap.yml?
3.29. How will you implement service discovery in microservices architecture?
3.30. How does Eureka Server work?
3.31. How to externalize configuration in a distributed system?
3.32. How will you use config-server for your development, stage and production environment?
3.33. What is difference between config first bootstrap and discovery first bootstrap in context of Spring Cloud Config client?
3.34. How to halt a Spring Boot based microservice at startup if it can not connect to Config Server during bootstrap?
3.35. How to refresh configuration changes on the fly in Spring Cloud environment?
3.36. How to achieve client side load balancing in Spring Microservices using Spring Cloud
3.37. How to use client side load-balancer Ribbon in your microservices architecture?
3.38. How to use both LoadBalanced as well as normal RestTemplate object in the single microservice?
3.39. How will you make use of Eureka for service discovery in Ribbon Load Balancer?
3.40. Can we use Ribbon without eureka?
3.41. How will you use ribbon load balancer programmatically?
3.42. What is difference between @EnableEurekaClient and @EnableDiscoveryClient?
3.43. How to make microservices zone aware so as to prefer same zone services for inter-service communication using Spring Cloud?
3.44. How to list all instances of a single microservice in Spring Cloud environment
3.45. What is API Gateway?
3.46. How to protect internal endpoints leaking from API Gateway?
3.47. How to protect Sensitive Security Tokens from leaking into downstream system?
3.48. How to retry failed requests at some other available instance using Client Side Load Balancer?
3.49. What is Circuit Breaker Pattern?
3.50. What are Open, Closed and Half-Open states of Circuit Breaker
3.51. What are use-cases for Circuit Breaker Pattern?
3.52. What are benefits of using Circuit Breaker Pattern?
3.53. Can circuit breaker be used in asynchronous communication?
3.54. What is Hystrix?
3.55. What are main features of Hystrix library?
3.56. How to use Hystrix for fallback execution?
3.57. When not to use Hystrix fallback on a particular microservice?
3.58. How will you ignore certain exceptions in Hystrix fallback execution?
3.59. What is Strangulation Pattern in microservices architecture?
3.60. What is Circuit Breaker?
3.61. What is difference between using a Circuit Breaker and a naive approach where we try/catch a remote method call and protect for failures?
3.62. What is Request Collapsing feature in Hystrix?
3.63. What is difference between Circuit Breaker and Hystrix?
3.64. Where exactly should I use Circuit Breaker Pattern?
3.65. What is bulkhead design pattern?
3.66. How does Hystrix implements Bulkhead Design Pattern?
3.67. What is Hystrix approach to Bulkhead Pattern?
3.68. In microservices architecture, what are smart endpoints and dumb pipes?
3.69. What is difference between Semaphore and ThreadPool based configuration in Hystrix?
3.70. How to handle versioning of microservices?
3.71. What is difference between partitioning microservices based on technical capabilities vs business capabilities? Which one is better?
3.72. Running Spring boot app at different port on server startup.
3.73. How will you run certain business logic at the app startup?
3.74. How to correctly implement a reporting microservice in a distributed system?
3.75. What is Event Sourcing and CQRS? When should it be used? Should be use it for the entire 84
system?
3.76. How to send business errors from a RESTful microservice to client application?
3.77. Is it a good idea to share common database across multiple microservices?
3.78. How will you make sure that the email is only sent if the database transaction does not fail?
3.79. How will you atomically update the database and publish an event to message broker from single transaction?
3.80. How will you propagate security context of user when one microservice calls another microservice on behalf of user?
3.81. What is Token Relay in Spring Security?
3.82. How to Enable Token Relay?
3.83. How to revoke Access and Refresh Tokens on data breach to limit the damage?
3.84. Shall Authentication and Authorization be one service?
3.85. What is API Key security?
3.86. What are best practices for microservices architecture?
3.87. Shall we share common domain models or DTOs across microservices?
3.88. How to share common code across multiple microservices?
3.89. What is continuous delivery?
3.90. How will you improve the performance of distributed system?
3.91. How will you implement caching for microservices?
3.92. Which protocol is generally used for client to service and inter-service communication?.
3.93. What are advantages of using asynchronous messaging within microservices architecture?
3.94. What is good tool for documenting Microservices?
3.95. How will you integrate Swagger into your microservices?
3.96. What are common properties for a Spring Boot project

4. Security in Microservices.

4.1. Why Basic Authentication is not suitable in Microservices Context?
4.2. Why OAuth2?
4.3. How OAuth2 Works?
4.4. What are different OAuth2 Roles?
4.5. What are different OAuth 2.0 grant types (OAuth flows)?
4.6. When shall I use resource owner credentials
4.7. When shall I use Authorization Code grant
4.8. When shall I use client credentials?
4.9. OAuth2 and Microservice
4.10. What is JWT?
4.11. What are usecases for JWT
4.12. How does JWT looks like
4.13. What is AccessToken and RefreshToken
4.14. How to use a RefreshToken to request a new AccessToken?
4.15. How to call the protected resource using AccessToken?
4.16. Can a refreshToken be never expiring? How to make refreshToken life long valid?
4.17. Generate AccessToken for Client Credentials.
4.18. Why there is no RefreshToken support in Oauth2 Client Credentials workflow?
4.19. How to implement the Logout functionality using JWT?
4.20. Security in inter-service communication
4.21. How to setup multiple authentications in Spring Security?
4.22. What is purpose of @EnableResourceServer?
4.23. What is purpose of @EnableOAuth2Sso?
4.24. What is purpose of @EnableOAuth2Client?
4.25. How can we add custom claims to JWT AccessToken?
4.26. Security Best Practice
4.27. How to enable spring security at service layer?

5. Testing Spring Boot based Microservices

5.1. Tools and Libraries available for testin
5.2. What is Mike Cohn’s Test Pyramid?
5.3. Testing Strategies
5.4. Mock vs Stub?
5.5. Unit Testing
5.6. Integration Tests
5.7. Contract-Driven Tests
5.8. End to End Tests
5.9. Best Practices in Testing


For all these questions, buy my ebook:

https://books.shunyafoundation.com/pdf-cracking-microservices-architecture-interview-questions-for-java-developers/dp/VWVTPZ3A?affid=crackingjavainterviews

https://books.shunyafoundation.com/pdf-cracking-microservices-architecture-interview-questions-for-java-developers/dp/VWVTPZ3A

No comments:

Post a Comment

Your comment will be published after review from moderator