CI/CD design pattern principles – monorepo and polyrepo scalability
In this section of the chapter, we will look at two different approaches to storing and managing code – monolithic repository (monorepo) and polylithic repository (polyrepo). We will learn the differences in scaling between the two.
Before we dig deeper into this, let’s quickly recap the two concepts:
- Monorepo: In this pattern, all code is stored in one code repository in a version control system (VCS). It is important to understand that this doesn’t mean the application code only, but also configurations and infrastructure.
- Polyrepo: This pattern enforces separation. Projects contain many repositories and every repository stores code for one application.
The following diagrams represent examples of monorepos and polyrepos. Understanding how the directories are designed is less important than getting a high-level picture of the principles. The following figure presents...