liveBook · Manning

Multi-repo

As explained in Microservices Patterns, Second Edition

Multi-repo is a repository arrangement in which application services or components are maintained in separate repositories.

Multi-repo gives each service its own code repository, build project, and deployment pipeline. This arrangement supports independent builds, tests, and deployments, and scales by adding repositories and pipelines. section 7.2.4

Weigh the operational trade-offs:

  • Separate pipelines support team autonomy and prevent one service’s test failures from blocking other services’ deployments. section 7.3.1
  • Global changes, such as dependency upgrades, are harder to coordinate across repositories. section 7.2.4
  • A monorepo makes global changes easier, but independent deployment and scaling to many developers can be challenging; its build system may require substantial investment. section 7.2.4

Enterprise services

Order, Delivery, and Consumer Services each have a repository and pipeline. The Money Library has its own pipeline to build and test the library, then publish it to a Maven repository. section 7.3.1

Figure 7.4 Each service has its own deployment pipeline, which builds, tests and deploys the service. The Money Library subdomain has its own deployment pipeline that builds and tests the library and publishes it to a Maven repository.
microservices repository and pipeline

Shows the per-service pipelines and the separate pipeline for publishing the Money Library. section 7.2.4

How Microservices Patterns, Second Edition covers it

How deep it goes
Defines per-service repositories and pipelines, then weighs coordination costs against monorepo trade-offs.
Examples
Names Order, Delivery, and Consumer Services, plus a Money Library pipeline that publishes to a Maven repository.
What you can do after
Apply it by assigning each service its own repository and pipeline for independent building, testing, and deployment.
How it connects
Connects microservice architecture with independent deployability, deployment pipelines, and the monorepo alternative.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microservices Patterns, Second Edition. The section links point to the parts of the book it draws on.