liveBook · Manning

Microservice architecture

As explained in Python Concurrency with asyncio

Microservice architecture is a system design style that structures an application as a set of independently deployable services communicating over defined interfaces.

Microservice architecture structures an application as loosely coupled, independently deployable services. Each service owns a focused responsibility, data model, and technology stack, then communicates through defined protocols such as REST or gRPC. section 10.1

Compared with a monolithic architecture, this design limits the impact of change. An e-commerce application can separate product and order services, so changing product behavior does not require redeploying order management. section 10.0 section 10.1

The architecture is useful when its operational tradeoffs justify the additional coordination:

  • Scale busy services independently: increase product-service capacity for heavy browsing without scaling an unaffected order service. section 10.1.2
  • Let teams own and deploy services mostly independently, reducing shared-codebase merge conflicts and deployment coordination. section 10.1.3
  • Use asynchronous communication to issue requests to multiple services concurrently and handle grouped failures or slow responses. section 10.1.4

E-commerce storefront

A storefront can divide product, user, and order concerns into separate services, each with its own database. A backend-for-frontend service can aggregate downstream calls, while retries and a circuit breaker help contain service failures. section 10.1 section 10.4

Microservices are not automatically better: monoliths remain simpler to manage for many applications. The choice trades operational simplicity for independent scalability, deployment, team ownership, and technology choice. section 10.1 section 10.4

How Python Concurrency with asyncio covers it

How deep it goes
Explains principles, tradeoffs, scaling, team independence, asynchronous calls, and resilience patterns, then applies them to e-commerce services.
Examples
Uses e-commerce product, user, order, and backend-for-frontend services to demonstrate decomposition, scaling, communication, and failure handling.
What you can do after
Apply the architecture to an e-commerce system using independent services, asynchronous calls, retries, and a circuit breaker.
How it connects
Connects microservice architecture with monolithic architecture, REST, gRPC, concurrency, backend-for-frontend, retries, and circuit breaker patterns.

Also explained in

Compare how 14 books explain microservice architecture →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Python Concurrency with asyncio. The section links point to the parts of the book it draws on.