Pizza Order Management Microservices Quiz Quiz

  1. Order Service Responsibility

    In a pizza order management system, what is the primary responsibility of the Order service?

    1. Processing payment transactions.
    2. Managing delivery driver assignments.
    3. Handling customer authentication and authorization.
    4. Creating, updating, and tracking pizza orders.
    5. Generating marketing reports on popular pizza toppings.
  2. Payment Service Interaction

    How does the Payment service typically interact with the Order service after an order is placed?

    1. It directly updates the Order service's database with payment status.
    2. It sends an asynchronous message to the Order service indicating payment success or failure.
    3. The Order service polls the Payment service every second until payment confirmation.
    4. The Payment service sends a push notification to the customer's mobile app.
    5. It ignores the order service and waits for a customer to manually verify payment.
  3. Delivery Service Coordination

    What event typically triggers the Delivery service to begin processing an order?

    1. The customer marks the order as 'out for delivery' in their app.
    2. The Payment service confirms successful payment and sends an event.
    3. The Order service receives an email from the kitchen staff.
    4. A cron job runs every hour to assign deliveries.
    5. The Delivery service scans the Order service database every minute.
  4. Data Sharing Strategy

    Which data sharing strategy is generally recommended for microservices like Order, Payment, and Delivery?

    1. A single, shared database for all services.
    2. Shared data tables within a single database.
    3. Each service having its own private database and communicating through APIs or events.
    4. Duplicating all data across all service databases for redundancy.
    5. Using a shared file system for storing order details.
  5. Asynchronous Communication

    What is the benefit of using asynchronous communication (e.g., message queues) between the Order, Payment, and Delivery services?

    1. It guarantees that all services always have the latest data.
    2. It reduces the chance of service failure cascading across the system.
    3. It simplifies debugging and troubleshooting.
    4. It ensures that all services are always running on the same server.
    5. It eliminates the need for API documentation.
  6. API Gateway Purpose

    What is the primary purpose of an API Gateway in the context of these microservices?

    1. To directly manage the database connections for each service.
    2. To act as a single entry point for external clients, routing requests to the appropriate service.
    3. To monitor the health of all microservices and automatically restart them if they fail.
    4. To automatically generate documentation for all APIs.
    5. To directly process all payments.
  7. Handling Order Updates

    If a customer changes their pizza topping after placing the order, which service is primarily responsible for handling this update?

    1. The Payment service must recalculate the order total.
    2. The Delivery service needs to reroute the delivery driver.
    3. The Order service should update the order details and notify relevant services.
    4. The customer service representative must manually update all databases.
    5. The Pizza Topping service directly updates the order.
  8. Failure Scenario: Payment Service Down

    What should happen if the Payment service is temporarily unavailable when a customer tries to place an order?

    1. The Order service should immediately reject the order.
    2. The Order service should queue the order and retry payment processing later.
    3. The Order service should bypass the Payment service and mark the order as paid.
    4. The Delivery service should assume payment will be made later.
    5. The customer's credit card should be charged without authorization.
  9. Delivery Service Communication

    How would the Delivery service typically notify the customer that their pizza is out for delivery?

    1. By directly accessing the Order service database to retrieve customer contact information.
    2. By calling the Order service API to request customer contact information.
    3. By sending a direct SMS message without interacting with other services.
    4. By relying on the Payment service to send the notification.
    5. By printing a notification and mailing it to the customer.
  10. Scalability

    To scale the Pizza Delivery system to handle increased traffic at peak hours, what is the best option?

    1. Increase the RAM on the single server where all microservices are running.
    2. Vertically scale the database server.
    3. Horizontally scale each microservice independently based on its resource usage.
    4. Disable logging to improve performance.
    5. Reduce the number of pizza toppings to simplify order processing.