QuizzesMicroservices & Distributed System Patterns
advanced
system-design

Microservices & Distributed System Patterns

Service communication, fault tolerance, API gateways, distributed tracing, and common microservice patterns.

30 minutes 8 questions Pass at 70%
Time Limit
30 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

8 questions on Microservices & Distributed System Patterns. Work through them here, then start the quiz to answer them and see your score.

  1. 1.What is the Circuit Breaker pattern?

    • ARoutes requests to a backup service when the primary is slow
    • BRetries failed requests with exponential back-off
    • CStops sending requests to a failing service for a period to allow it to recover
    • DRejects all requests when the server is under high load
  2. 2.What is the Saga pattern and when do you need it?

    • AA caching strategy for microservice responses
    • BA sequence of local transactions coordinated via events or choreography to maintain consistency across microservices
    • CA design pattern for writing long-running batch jobs
    • DA two-phase commit protocol for distributed transactions
  3. 3.What is an API Gateway and what responsibilities does it take on?

    • AA message broker between microservices
    • BA single entry point that handles authentication, rate limiting, routing, SSL termination, and request aggregation
    • CA load balancer that distributes traffic at the TCP layer
    • DA database proxy that routes queries to the correct shard
  4. 4.What is the Outbox Pattern and what problem does it solve?

    • ACaching outbound API responses to reduce duplicate calls
    • BStoring failed messages in a dead-letter queue for later retry
    • CRouting outbound requests through a dedicated proxy service
    • DAtomically writing to the database and a message queue by writing to an outbox table and publishing asynchronously
  5. 5.What is service discovery and why is it needed in microservices?

    • AA tool that automatically documents all service APIs
    • BA monitoring system that tracks which services are running
    • CA pattern for routing requests to the nearest geographical service instance
    • DA mechanism for services to find each other's network locations dynamically, since IPs change in cloud environments
  6. 6.What is distributed tracing and what problem does it solve?

    • AMonitors network traffic between services for security anomalies
    • BTracks a request across multiple services using a shared trace ID to identify which service caused a slowdown
    • CReplicates application logs from all services into one file
    • DLogs all database queries across all services to a central store
  7. 7.What is the Strangler Fig pattern?

    • AA pattern for strangling deadlocks in distributed transactions
    • BKill all monolith services simultaneously and replace with microservices
    • CCompress and archive old data to reduce monolith database size
    • DGradually replace a monolith by routing new functionality to microservices while the monolith handles the rest
  8. 8.What is idempotency and why is it critical in distributed systems?

    • AA technique for deduplicating database records
    • BA property ensuring that two identical requests are processed simultaneously
    • CA guarantee that messages arrive in the order they were sent
    • DAn operation that can be applied multiple times without changing the result beyond the first application