BuildFlow is building a CI/CD platform. When a developer pushes code, a pipeline is triggered that builds, tests, and deploys the application. Features:
- Pipeline definition - YAML-based pipeline config with stages (build, test, deploy) and steps. Steps within a stage can run in parallel.•Isolated execution - each step runs in a fresh container (Docker). The user specifies the base image. No cross-contamination between steps or pipelines.•Artifact passing - steps within a pipeline can pass files between each other (e.g., build step produces a binary → test step uses it).•Caching - cache dependencies (node_modules, Maven .m2) between pipeline runs to speed up builds. Cache key based on lockfile hash.•Secrets management - inject secrets (API keys, tokens) as environment variables. Encrypted at rest, never logged.•Live logs - stream build output to the browser in real time, line by line.•Webhook triggers - trigger pipelines on git push, PR open, tag creation, or manual trigger.•Concurrency - a team may have 10 pipelines running simultaneously. The platform manages a pool of worker nodes.
Handle 100,000 pipeline runs per day across 5,000 teams.
Design a CI/CD platform (like GitHub Actions) that runs build pipelines in isolated containers with parallel steps and artifact caching. Build this architecture under realistic production constraints, then validate tradeoffs in the design lab simulation.
Request path: The solution keeps ingress, service logic, and stateful dependencies separated so each layer can scale independently.
Reference flow: Web Clients -> Load Balancer -> API Service -> Primary SQL DB -> Message Queue -> Background Workers -> Object Storage -> Monitoring