Interview Questions Microservices - amitbhilagude/userfullinks GitHub Wiki

  1. Explain Microservices
    1. Split the entire application into smaller pieces so that they can deploy and manage separately.
    2. Explain the scenario about our cloud suite, How many teams are there, How do they communicate with each other through APIs.
    3. Give examples of microservice which is used in your project.
    4. Always follow Domain Driven Design pattern for building Microservices.
  2. Explain Monolithic
    1. Opposite to Microservice, Single deployment with single solutions with all projects.
    2. Build and Deploy as a single Package.
  3. Advantages of Microservices
    1. Having small pieces and deploy separately, you can have any technology choice. Explain we have microservice some in .net core 2.2. some in 3.1 and some are in .Net framework 4.7
    2. Less downtime if there is targeted one microservice deployment rather than deploying entire monolithic application
    3. Low risk if it changes small piece only. but again I assume the contract is not changed.
    4. Independent deployment by each team.
  4. Challenges of Microservices
    1. It is a complex architecture, having many codebases, many build pipelines, Monitor them, and Operation overhead. We need to be planned well
    2. If two microservices are communicating with each other they need to align the contract and delivery timeline. We have managed this will versioning mechanism.
    3. Operations overhead is there for monitoring them but we build them correctly it will not more risk.
  5. When is Microservices is best suited
    1. When you have large applications and multiple teams
    2. When you want scale specific application module which can be converted into Microsoft.
  6. Common type of tests done in Microservices
    1. Unit test: to test your microservices
    2. Integration Test: To test your contract
    3. Acceptance Test: Functionality Acceptance
  7. Tools used for Microservices
    1. Defining contract we use Open API Specification and import Azure APIM to finalize the contract.
    2. Swagger and swashbuckler to create the open API specification
  8. Why use the container for Microservices
    1. Docker container help you build images with all the dependency and you can easily deploy them into any machine.
    2. If you want to scale-out the microservices then it can easily deploy into another node.
  9. Semantic Monitoring
    1. Take one critical business case and check if end to end flow works fine.
  10. CDC
    1. Consumer Driven Contract. Build contract first.
  11. Deployment Options
    1. Rolling Upgrade: Deploy each node one by one by keeping rest nodes serving the request
    2. Canary Deployment: Deploy based on geographical region
    3. Blue-Green Deployment: Allow you to test the functionality in Production without downtime e.g. Deployment slots in App service