Residence time constraints are commonly seen in practical production systems, where the time that intermediate products spend in a buffer is limited within a certain range. Parts have to be scrapped or reworked if their maximum allowable residence time is exceeded, while they cannot be released downstream before the minimum required residence time is reached. Such dynamics impose additional complexity onto the production system analysis. In order to optimize the production performance in a timely manner, the transient behavior of the production system and a real-time control strategy need to be investigated. In this article, we develop a Markov chain model to analyze the transient behavior of a two-machine geometric serial line with constraints on both maximum allowable residence time and minimum required residence time being. Compared with the simulation, the proposed analytical method is shown to estimate the system’s transient performance with high accuracy. Structural properties are investigated based on the model to provide insights into the effects of residence time constraints and buffer capacity on system performance. An iterative learning algorithm is proposed to perform real-time controls, which improves the system performance by balancing the trade-off between the production rate and scrap rate. Specifically, a control policy derived from Markov Decision Processes is implemented as an initial control policy, and the Bayesian method is then applied to the run time data to improve the control policy.