Wednesday, April 3, 2019

Spring Boot Interview Q&A Part-2

1. What are the challenges with spring boot microservices ? 

Answer:- 

1. Data Synchronization (Consistency)
2. Security
3.  Services Communication
4. Discovery
5. Data Staleness
6. Distributed Logging, Cyclic Dependencies of Services and Debugging
7. Testing
8. Monitoring & Performance
9. DevOps Support
10. Fault Tolerance

2. How to manage transaction in spring boot microservices ?
Answer:- 

3. Distributed transaction in spring boot microservices ?
Answer :- 

4. How to manage central configuration in spring boot microservices ? 
Answer :- 

5. How to manage central logging in spring boot microservices ?
Answer:- We can use Spring Cloud Sleuth with Zipkin to achieve the same.

6. How to secure spring boot microservices ?
Answer:- We can use 2 way to secure spring boot microservices.

1. Spring Security and OAuth 2.0
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.security.oauth.boot</groupId>
    <artifactId>spring-security-oauth2-autoconfigure</artifactId>
    <version>2.0.5.RELEASE</version>
</dependency>

2. Microservices Security using JWT(JSON Web Token) Authentication Gateway

7. How to manage distributed transaction in spring boot microservices ?
Answer :-

  • saga design pattern
  • 2 phase commit protocol



No comments:

Post a Comment