Microservices MCQs

  1. Which of the following is true about Service Discovery?
    a) Allows services to find each other dynamically
    b) Implemented via registries like Eureka, Consul, Zookeeper
    c) Promotes scalability and flexibility
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  2. What will be printed?
    1 import com.netflix.discovery.*;
    2 public class Test {
    3 public static void main(String[] args) {
    4 System.out.println("Eduinq Service Discovery Ready");
    5 }
    6 }
    a) Eduinq Service Discovery Ready
    b) Eduinq
    c) Compilation error
    d) Runtime exception
    View Answer

    Correct answer: A — Eduinq Service Discovery Ready

  3. Which of the following is true about API Gateway?
    a) Provides single entry point for clients
    b) Handles routing, authentication, logging
    c) Can implement cross cutting concerns
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  4. What will be printed?
    1 class EduinqGateway {
    2 public void route(){ System.out.println("Eduinq API Gateway Routing"); }
    3 }
    4 public class Test {
    5 public static void main(String[] args) {
    6 new EduinqGateway().route();
    7 }
    8 }
    a) Eduinq API Gateway Routing
    b) Eduinq
    c) Compilation error
    d) Runtime exception
    View Answer

    Correct answer: A — Eduinq API Gateway Routing

  5. Which of the following is true about Circuit Breaker pattern?
    a) Prevents cascading failures
    b) Stops calls to failing service
    c) Implemented via libraries like Hystrix, Resilience4j
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  6. What will be printed?
    1 import io.github.resilience4j.circuitbreaker.*;
    2 public class Test {
    3 public static void main(String[] args) {
    4 System.out.println("Eduinq Circuit Breaker Active");
    5 }
    6 }
    a) Eduinq Circuit Breaker Active
    b) Eduinq
    c) Compilation error
    d) Runtime exception
    View Answer

    Correct answer: A — Eduinq Circuit Breaker Active

  7. Which of the following is true about Bulkhead pattern?
    a) Isolates resources per service/component
    b) Prevents one service from exhausting all resources
    c) Improves resilience
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  8. Which of the following is true about Saga pattern?
    a) Manages distributed transactions
    b) Uses sequence of local transactions
    c) Compensating actions handle failures
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  9. What will be printed?
    1 class EduinqSaga {
    2 public void execute(){ System.out.println("Eduinq Saga Transaction"); }
    3 }
    4 public class Test {
    5 public static void main(String[] args) {
    6 new EduinqSaga().execute();
    7 }
    8 }
    a) Eduinq Saga Transaction
    b) Eduinq
    c) Compilation error
    d) Runtime exception
    View Answer

    Correct answer: A — Eduinq Saga Transaction

  10. Which of the following is true about Resilience patterns?
    a) Include Circuit Breaker, Bulkhead, Retry, Timeout
    b) Improve fault tolerance
    c) Essential in microservices
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  11. Which of the following is true about Retry pattern?
    a) Retries failed requests
    b) Can use exponential backoff
    c) Prevents transient failures
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  12. Which of the following is true about Timeout pattern?
    a) Limits waiting time for response
    b) Prevents resource blocking
    c) Improves responsiveness
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  13. Which of the following is true about Service Registry?
    a) Stores service instances
    b) Provides dynamic lookup
    c) Used with client side or server side discovery
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  14. Which of the following is true about API Gateway best practices?
    a) Implement rate limiting
    b) Secure endpoints
    c) Provide monitoring and logging
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  15. Which of the following is true about distributed tracing?
    a) Tracks requests across services
    b) Tools include Zipkin, Jaeger
    c) Helps debug latency issues
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  16. Which of the following is true about Hystrix?
    a) Netflix library for Circuit Breaker
    b) Provides fallback mechanisms
    c) Improves resilience
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  17. Which of the following is true about Resilience4j?
    a) Lightweight fault tolerance library
    b) Supports Circuit Breaker, Retry, Bulkhead, RateLimiter
    c) Designed for functional programming
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  18. Which of the following is true about API Gateway routing?
    a) Routes requests to appropriate microservice
    b) Can transform requests/responses
    c) Supports load balancing
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  19. Which of the following is true about service mesh?
    a) Manages service to service communication
    b) Provides observability, security, traffic management
    c) Examples include Istio, Linkerd
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  20. Which of the following is true about distributed transaction challenges?
    a) Difficult to maintain ACID properties
    b) Require patterns like Saga
    c) Need compensating actions
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  21. Which of the following is true about Rate Limiting?
    a) Controls number of requests per time unit
    b) Prevents abuse of services
    c) Implemented via API Gateway or Resilience4j
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  22. Which of the following is true about Fallback mechanisms?
    a) Provide alternative response when service fails
    b) Improve user experience
    c) Implemented via Circuit Breaker libraries
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  23. What will be printed?
    1 class EduinqFallback {
    2 public String call(){ return "Eduinq Fallback Response"; }
    3 }
    4 public class Test {
    5 public static void main(String[] args) {
    6 System.out.println(new EduinqFallback().call());
    7 }
    8 }
    a) Eduinq Fallback Response
    b) Eduinq
    c) Compilation error
    d) Runtime exception
    View Answer

    Correct answer: A — Eduinq Fallback Response

  24. Which of the following is true about Idempotency in microservices?
    a) Same request produces same result
    b) Prevents duplicate side effects
    c) Essential for retries
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  25. Which of the following is true about Service Mesh observability?
    a) Provides metrics, logs, traces
    b) Improves monitoring of services
    c) Tools include Istio, Linkerd
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  26. Which of the following is true about API Gateway security?
    a) Implements authentication and authorization
    b) Supports JWT, OAuth2
    c) Protects backend services
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  27. Which of the following is true about Distributed Logging?
    a) Collects logs from multiple services
    b) Tools include ELK stack, Splunk
    c) Helps debug issues
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  28. Which of the following is true about Monitoring microservices?
    a) Tools include Prometheus, Grafana
    b) Provides metrics like latency, throughput
    c) Essential for reliability
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  29. Which of the following is true about Debugging microservices?
    a) Requires tracing requests across services
    b) Uses correlation IDs
    c) Involves analyzing logs and metrics
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  30. Which of the following is true about Resilience best practices?
    a) Use Circuit Breaker, Retry, Timeout
    b) Implement Bulkhead isolation
    c) Provide fallback responses
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  31. Which of the following is true about API Gateway load balancing?
    a) Distributes requests across instances
    b) Improves performance
    c) Prevents overload
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  32. Which of the following is true about Service Mesh traffic management?
    a) Controls routing between services
    b) Supports canary deployments
    c) Enables fault injection for testing
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  33. Which of the following is true about Microservices scalability?
    a) Scale services independently
    b) Use container orchestration like Kubernetes
    c) Monitor resource usage
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  34. Which of the following is true about API Gateway caching?
    a) Stores responses temporarily
    b) Reduces backend load
    c) Improves performance
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  35. Which of the following is true about Service Mesh security?
    a) Provides mutual TLS
    b) Enforces policies
    c) Secures service to service communication
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  36. Which of the following is true about Microservices resilience testing?
    a) Includes chaos engineering
    b) Simulates failures
    c) Validates fault tolerance
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  37. Which of the following is true about API Gateway logging?
    a) Captures request/response details
    b) Useful for auditing
    c) Helps debugging
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  38. Which of the following is true about Distributed Configuration?
    a) Centralized config management
    b) Tools include Spring Cloud Config
    c) Supports dynamic refresh
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  39. Which of the following is true about Microservices fault tolerance?
    a) Achieved via resilience patterns
    b) Requires monitoring and alerting
    c) Essential for reliability
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  40. Which of the following is true about API Gateway throttling?
    a) Limits request rate
    b) Prevents abuse
    c) Protects backend services
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  41. Which of the following is true about Service Mesh policy enforcement?
    a) Defines rules for communication
    b) Enforces security and compliance
    c) Managed centrally
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  42. Which of the following is true about Microservices health checks?
    a) Provide service status
    b) Used by orchestrators for scaling
    c) Implemented via /health endpoints
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  43. Which of the following is true about API Gateway authentication?
    a) Validates client identity
    b) Supports OAuth2, JWT
    c) Protects backend services
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  44. Which of the following is true about Microservices observability pillars?
    a) Logs
    b) Metrics
    c) Traces
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  45. Which of the following is true about Service Mesh sidecar proxy?
    a) Runs alongside service instance
    b) Handles communication and policies
    c) Examples include Envoy proxy
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  46. Which of the following is true about Microservices deployment strategies?
    a) Canary releases
    b) Blue green deployments
    c) Rolling updates
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  47. Which of the following is true about API Gateway resilience?
    a) Implements retries and timeouts
    b) Provides fallback responses
    c) Ensures availability
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  48. Which of the following is true about Microservices monitoring best practices?
    a) Collect metrics at service level
    b) Use dashboards for visualization
    c) Set alerts for anomalies
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  49. Which of the following is true about Service Mesh advanced features?
    a) Traffic shadowing
    b) Fault injection
    c) Policy enforcement
    d) All of the above
    View Answer

    Correct answer: D — All of the above

  50. Which of the following is true about Microservices best practices overall?
    a) Design for resilience and scalability
    b) Implement observability and monitoring
    c) Secure communication and endpoints
    d) All of the above
    View Answer

    Correct answer: D — All of the above

Quick Links to Explore