8.2.1: Microservices Architecture

Introduction to Cloud Computing · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    8.2.1: Microservices Architecture

    Cloud-native applications are almost synonymous with a microservices architecture. In a microservices approach, an application is broken into many small services, each responsible for a specific piece of functionality (for example, a payment service, an inventory service, a user-authentication service in an e-commerce app). These services communicate with each other via network calls (often HTTP/REST APIs or messaging systems) but are otherwise independent – they can be developed, deployed, and scaled in isolation. This is a stark contrast to monolithic architectures where all components are packaged and deployed as one unit.

    The microservices architecture yields several advantages crucial for cloud-native development:

    • Independent Scaling: Each microservice can scale out as needed based on its own resource demand. For instance, the authentication service can scale to 10 instances while the reporting service might only need 2, if that reflects actual load. This fine-grained horizontal scaling makes efficient use of cloud resources.
    • Independent Deployment: Each service can be updated or released on its own schedule without redeploying the entire application. This enables frequent releases and fast iteration. As long as the service’s external API contract remains compatible, it can be deployed without coordinating with every other team – a practice known as loose coupling. Cloud-native teams often organize around microservices, with each team owning one or a few services and delivering updates continuously.
    • Polyglot Freedom: Different services can use different technology stacks best suited to their function. One microservice might use Python and a NoSQL database for rapid development, while another uses Java and an SQL database for transaction integrity. The services communicate through language-neutral APIs. This allows leveraging the right tool for each job, though it also requires robust DevOps practices to manage heterogeneity.
    • Fault Isolation: The failure of one microservice ideally does not crash the entire system. For example, if the recommendation service is down, the rest of an e-commerce site (search, product pages, cart, checkout) can still function – perhaps with some degraded user experience – instead of the whole site going offline. Microservices are loosely coupled enough that they handle partner service outages gracefully (often via timeouts or fallback logic).

    It’s important to note that microservices introduce distributed complexity. Because a single user request may now flow through dozens of small services instead of a single program, observability (logging, tracing) and inter-service communication become critical concerns (addressed in Section 8.3 and Section 8.5). Additionally, careful design is needed to avoid creating tightly coupled distributed components; otherwise one might just end up with a distributed monolith. Techniques like well-defined APIs, asynchronous messaging, and service discovery help maintain proper decoupling in a microservices system.


    This page titled 8.2.1: Microservices Architecture was last modified on Tue, 22 Sep 2026 21:13:39 GMT and is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Felix Amoruwa.