Bacterial cells construct many structures, such as the flagellar hook and the type III secretion system (T3SS) injectisome, that aid in crucial physiological processes such as locomotion and pathogenesis. Both of these structures involve long extracellular channels, and the length of these channels must be highly regulated in order for these structures to perform their intended functions. There are two leading models for how length control is achieved in the flagellar hook and T3SS needle: the substrate switching model, in which the length is controlled by assembly of an inner rod, and the ruler model, in which a molecular ruler controls the length. Although there is qualitative experimental evidence to support both models, comparatively little has been done to quantitatively characterize these mechanisms or make detailed predictions that could be used to unambiguously test these mechanisms experimentally. In this work, we constructed a mathematical model of length control based on the ruler mechanism and found that the predictions of this model are consistent with experimental data-not just for the scaling of the average length with the ruler protein length, but also for the variance. Interestingly, we found that the ruler mechanism allows for the evolution of needles with large average lengths without the concomitant large increase in variance that occurs in the substrate switching mechanism. In addition to making further predictions that can be tested experimentally, these findings shed new light on the trade-offs that may have led to the evolution of different length control mechanisms in different bacterial species.