Microservices Migration: To-Do List App Quiz Quiz

  1. Service Boundary Design

    When migrating a monolithic To-Do List application, which of the following best represents a logical service boundary for a microservices architecture?

    1. Combining task management, user authentication, and notification functionalities into a single 'Core' service.
    2. Separating task management, user management, and notifications into individual services, each with its own database.
    3. Grouping all UI-related components into a single 'Frontend' service and leaving the backend as a single monolithic service.
    4. Implementing all functionalities as serverless functions triggered by a single API gateway.
    5. Deploying the entire To-Do List application as a single containerized service.
  2. Data Consistency

    In a microservices architecture for a To-Do List application, how should you best handle data consistency when updating both the Task Management and User Management services?

    1. Using a two-phase commit (2PC) transaction across both databases.
    2. Relying on eventual consistency and compensating transactions if necessary.
    3. Sharing a single database between the Task Management and User Management services.
    4. Forcing all updates to go through the User Management service, which then updates the Task Management service.
    5. Writing directly to both databases at the same time, ignoring potential race conditions.
  3. API Gateway Role

    What is the primary responsibility of an API Gateway in the context of a microservices-based To-Do List application?

    1. To store all user data and task information.
    2. To provide a single entry point for clients and route requests to the appropriate microservice.
    3. To directly manage the deployment and scaling of individual microservices.
    4. To completely replace the need for individual microservice APIs.
    5. To handle all database transactions for the entire application.
  4. Communication Pattern

    Which communication pattern is most suitable for notifying users when a task is assigned to them in a microservices To-Do List application?

    1. Direct synchronous calls from the Task Management service to the User Management service.
    2. A shared database between the Task Management and Notification services.
    3. Asynchronous messaging using a message queue or pub/sub system.
    4. Periodic polling of the Task Management service by the Notification service.
    5. Making direct database requests.
  5. Service Discovery

    What is the purpose of service discovery in a microservices architecture like the one supporting a To-Do List application?

    1. To automatically discover and register new users in the system.
    2. To allow services to dynamically locate and communicate with each other without hardcoded addresses.
    3. To automatically generate API documentation for each microservice.
    4. To monitor the CPU usage of each microservice.
    5. To perform user authentication and authorization.
  6. Data Ownership

    In the migrated To-Do List application, which service should have exclusive ownership and control over user profile data?

    1. The Task Management service.
    2. All services should have equal access to user profile data.
    3. The API Gateway.
    4. The User Management service.
    5. The notification service.
  7. Deployment Strategy

    Which deployment strategy allows for zero downtime updates when deploying a new version of the Task Management microservice?

    1. Big bang deployment: deploying the entire new service all at once.
    2. Rolling deployment: incrementally replacing instances of the old version with the new version.
    3. Canary deployment: deploying the new version to a small subset of users first.
    4. Blue-green deployment: deploying the new version alongside the old version and switching traffic over.
    5. Redeployment: removing the old service and deploying the new service.
  8. Eventual Consistency Example

    Consider a scenario where a user updates their email address in the User Management servic How might this update propagate to the Task Management service in an eventually consistent system?

    1. The User Management service synchronously updates the Task Management service immediately after the email is changed.
    2. The Task Management service directly queries the User Management service database for every request.
    3. The User Management service publishes an event indicating the email address change, which the Task Management service consumes and updates its local copy of the user data.
    4. The Task Management service relies solely on stale data from the User Management service.
    5. A scheduled job copies the entire user database from the User Management service to the Task Management service every hour.
  9. Testing Microservices

    What type of testing is MOST crucial to perform on individual microservices for the To-Do List application after a code change?

    1. End-to-end testing that tests the entire application flow.
    2. Unit testing to verify the behavior of individual components in isolation.
    3. UI testing to ensure the user interface is working correctly.
    4. Performance testing that simulates heavy loads.
    5. Penetration testing focused on security vulnerabilities only.
  10. Avoiding Monolithic Database

    Which of the following strategies BEST prevents the creation of a 'distributed monolith' database when migrating the To-Do List application?

    1. Enforcing strict schemas and data validation across all microservices.
    2. Allowing each microservice to directly access and modify data in other microservice's databases.
    3. Using a shared database for all microservices to simplify data management.
    4. Ensuring each microservice owns its own data and avoids sharing databases.
    5. Implementing a complex data synchronization mechanism to keep all databases consistent in real-time.