Question

    Which of the following is a common challenge in

    transitioning from a monolithic to a microservices architecture? 
    A Managing a single code repository Correct Answer Incorrect Answer
    B Ensuring consistent, single-point deployment Correct Answer Incorrect Answer
    C Handling distributed transactions across services Correct Answer Incorrect Answer
    D Limiting scalability for individual components Correct Answer Incorrect Answer
    E Increasing dependency on centralized databases Correct Answer Incorrect Answer

    Solution

    A key challenge in migrating from a monolithic to a microservices architecture is managing distributed transactions. In a monolithic system, transactions are typically managed within a single database and within a single application boundary, simplifying transaction integrity. In microservices, however, services often manage their own data stores, making it complex to maintain transaction consistency across multiple services. Techniques such as the Saga pattern are often used to ensure distributed transaction management, but these solutions require additional effort and may increase application complexity. Distributed transactions, as such, present a unique challenge in a microservices architecture that is generally not encountered in monolithic setups. Option A - With microservices, it's common to have multiple repositories, not a single codebase, allowing more flexible development. Option B - Microservices avoid single-point deployments by deploying services independently. Option D - Scalability is generally enhanced in microservices as each component can scale separately. Option E - Dependency on centralized databases is more common in monolithic architectures than microservices, which encourage distributed databases.

    Practice Next

    Relevant for Exams: