The Secrets Behind Plumber: Managing Thousands of Pipelines at Semaphore
Blog post from Semaphore
Semaphore's CI/CD platform is powered by an orchestration engine named Plumber, which efficiently coordinates the execution of pipelines by interpreting definitions, scheduling jobs, and managing execution across distributed agents. Built using a finite state machine (FSM) model in Elixir, Plumber transitions pipelines through states such as initializing, pending, running, and done, ensuring modularity and maintainability. The system's tech stack, including PostgreSQL, RabbitMQ, and Kubernetes, supports concurrency, fault tolerance, and scalability, allowing Semaphore to manage the CI/CD needs of thousands of developers. To handle failures and extend pipeline behavior, Semaphore incorporates features like a stuck state recovery loop, manual stopping of pipelines, and queuing for sequential execution. This architecture provides reliability, scalability, fault tolerance, and extensibility, making it adaptable to evolving developer requirements. Semaphore is open source, with its code available on GitHub, and invites engagement and exploration through various online platforms.