MicroServices - prkirankumar/interview-preparation GitHub Wiki

  1. Explain microservices boundaries - core principles (Cohesion, Single Responsibility & Loose Coupling)

  2. Explain methods of decomposition of monolithic application to microservices (decomposition by business capabilities vs decomposition by domain/subdomain)

  3. Explain strangler fig pattern of microservices migration

  4. Explain micro-frontends architecture pattern in microservices

  5. Explain difference between Api gateway & load balancer

  6. Explain event driven vs request response model in microservices

  7. Explain use cases for event driven architecture and request response model in microservices

  8. Explain the following two event delivery patterns event streaming & pub/sub

  9. What problem does the saga pattern solve in microservices?

  10. Explain the CQRS pattern and its benefits in microservices.

    • Need of CQRS

      • Data is often more frequently queried than altered or vise versa.
      • It allows you to scale the commamnd and query APIs independently from each other.
      • This could result in fewer lock contentions, which is generally as a result of executing command and query operations on the same model
      • It also allows you to optimise your reads and write data schemas where the schema of the read side can be optimised for queries, while the schema on the write or command side, can be optimized for writes or updates. Eg: If you store a materialzied view of your data in the read database, your query API won't have to do any complex joins between tables or collections.
      • It allows you to seperate concerns. Generally, you will find that complex business logid is applied on the write model, while the read model is usually quite simple.
      • You can improve your data security by ensuring that only the relevant command API.
    • Command

      • A Command, is a combination of expressed intent. In other words it describes an action that you want to be performed. It also contains the information that is required to undertake the desired action. Commands are always named awith a verb in the imperative mood. Eg: NewPostCommand, LikePostCommand, AddCommentCommand
  11. What problem does the event sourcing pattern solve in microservices?

    • Benefits of Event Sourcing
      • The event store basically contains a complete auditable log. In other words, all the state changes that were applied to the object or entity, instead of just storing the later or current state.
      • The state of an object, usually the aggregate, can be recreated by replaying the event store.
      • It improves write performance, since all events are simply appended to the event store. In other words, we neverdo any updated or delete operation on the event store.
      • In case of failure, the event store can be used to resotre the read database.
  12. Explain blue/green deployment in microservices

  13. What is observability in microservices and how it is different from monitoring?

  14. Explain three pillars of observability.

References:

microservices.io