Question

    Which of the following best explains why communication

    latency is generally higher in microservices compared to monolithic architectures? 
    A Microservices run on a single platform and are tightly coupled Correct Answer Incorrect Answer
    B Microservices use network-based communication for inter-service interactions Correct Answer Incorrect Answer
    C Microservices avoid communication between components altogether Correct Answer Incorrect Answer
    D Microservices architecture centralizes all components in one database Correct Answer Incorrect Answer
    E Microservices rely on shared memory communication Correct Answer Incorrect Answer

    Solution

    In a microservices architecture, services communicate with each other over the network, often via protocols like HTTP or gRPC, which introduces network latency. Unlike monolithic systems where components within the same application can interact directly, microservices operate in isolated environments and require network calls to share data and functionalities. This network-based communication, while providing flexibility and independence to each service, results in higher latency compared to direct in-process calls within a monolithic architecture. Therefore, managing and optimizing this latency is essential in microservices design to ensure overall system performance. Option A - Microservices are loosely coupled and can run on multiple platforms, often distributed across different servers or clusters. Option C - Microservices frequently communicate to maintain coherence across services; they do not avoid communication. Option D - Microservices generally decentralize databases rather than centralizing them. Option E - Shared memory communication is not a characteristic of microservices, as each service is isolated and uses network protocols for interaction.

    Practice Next

    Relevant for Exams: