@@ -4,8 +4,6 @@ description: Optimizing your merge queue for maximum efficiency.
44---
55
66import MergeQueueCalculator from " ../../../components/MergeQueueCalculator/MergeQueueCalculator"
7- import rcvDiagram from " ../../images/merge-queue/rcv-theorem.png"
8- import {Image } from ' astro:assets' ;
97
108As development teams scale and the volume of pull requests grows, achieving an
119optimal balance between merge speed, reliability, and resource usage becomes a
@@ -30,9 +28,92 @@ Similar to the [CAP theorem](https://en.wikipedia.org/wiki/CAP_theorem) for
3028data stores, you can only optimize two of these properties simultaneously. This
3129is what we term the ** RCV theorem** .
3230
33- <figure style = { { maxWidth: ' 66%' , margin: ' auto' }} >
34- <Image src = { rcvDiagram } alt = " RCV theorem" />
35- </figure >
31+ ``` neato aria-label="Venn diagram showing the Reliability, Cost, Velocity trade-offs" role="img" style="max-width: 520px; margin: 2rem auto; display: block;"
32+ graph RCV {
33+ graph [bgcolor="transparent", margin=0, overlap=true];
34+ node [shape=circle, style="filled,setlinewidth(2)", fontname="Helvetica", fontsize=16, width=2.5, height=2.5, penwidth=2, fixedsize=true, pin=true];
35+
36+ Reliability [label="Reliability", color="#2563eb", fillcolor="#2563eb33", pos="0,0!", tooltip="Maximize test confidence"];
37+ Velocity [label="Velocity", color="#16a34a", fillcolor="#16a34a33", pos="2.2,0!", tooltip="Ship pull requests fast"];
38+ Cost [label="Cost", color="#ea580c", fillcolor="#ea580c33", pos="1.1,1.95!", tooltip="Keep CI usage low"];
39+ }
40+ ```
41+
42+ <div
43+ role = " note"
44+ aria-label = " RCV legend"
45+ style = { {
46+ display: ' flex' ,
47+ flexWrap: ' wrap' ,
48+ gap: ' 0.5rem' ,
49+ justifyContent: ' center' ,
50+ margin: ' 1rem auto 0.5rem' ,
51+ fontSize: ' 0.9rem' ,
52+ }}
53+ >
54+ <span
55+ style = { {
56+ display: ' inline-flex' ,
57+ alignItems: ' center' ,
58+ gap: ' 0.35rem' ,
59+ padding: ' 0.35rem 0.75rem' ,
60+ borderRadius: ' 999px' ,
61+ border: ' 1px solid #93c5fd' ,
62+ }}
63+ >
64+ <span
65+ style = { {
66+ width: ' 0.65rem' ,
67+ height: ' 0.65rem' ,
68+ borderRadius: ' 50%' ,
69+ background: ' linear-gradient(135deg,#2563eb,#16a34a)' ,
70+ }}
71+ ></span >
72+ Reliability + Velocity → Parallel Checks
73+ </span >
74+ <span
75+ style = { {
76+ display: ' inline-flex' ,
77+ alignItems: ' center' ,
78+ gap: ' 0.35rem' ,
79+ padding: ' 0.35rem 0.75rem' ,
80+ borderRadius: ' 999px' ,
81+ border: ' 1px solid #fca5a5' ,
82+ }}
83+ >
84+ <span
85+ style = { {
86+ width: ' 0.65rem' ,
87+ height: ' 0.65rem' ,
88+ borderRadius: ' 50%' ,
89+ background: ' linear-gradient(135deg,#2563eb,#ea580c)' ,
90+ }}
91+ ></span >
92+ Reliability + Cost → Sequential Validation
93+ </span >
94+ <span
95+ style = { {
96+ display: ' inline-flex' ,
97+ alignItems: ' center' ,
98+ gap: ' 0.35rem' ,
99+ padding: ' 0.35rem 0.75rem' ,
100+ borderRadius: ' 999px' ,
101+ border: ' 1px solid #86efac' ,
102+ }}
103+ >
104+ <span
105+ style = { {
106+ width: ' 0.65rem' ,
107+ height: ' 0.65rem' ,
108+ borderRadius: ' 50%' ,
109+ background: ' linear-gradient(135deg,#16a34a,#ea580c)' ,
110+ }}
111+ ></span >
112+ Velocity + Cost → Batch Mode
113+ </span >
114+ </div >
115+
116+ <em >Pick any two—every setup sacrifices one dimension.</em >
36117
37118Based on this trade-off, there are 3 scenarios that you can optimize for:
38119
0 commit comments