Liquefaction and then transportation to the market is one of the promising options for the utilization of associated natural gas resources which are produced in oil fields. However, the flow of such resources is normally unsteady. Additionally, the associated gas in one oil field may exhaust in a few years and the liquefaction plant should be moved to another oil field with different specifications. In order to tackle such challenges, liquefaction systems not only must be optimally designed and operated but also should be flexible with respect to the gas flow fluctuations. The flexibility analysis of such processes is usually ignored in the optimization studies. In this research, first, the economic performance of two small-scale liquefaction processes (a single mixed-refrigerant process, SMR, and a nitrogen expander process) was optimized and compared. The results showed that the SMR process is economically more attractive (49% lower lifecycle cost compared to the nitrogen expander process). As a post-optimization step, flexibility analysis was performed to investigate the ability of optimal designs in overcoming gas flow fluctuations. For this purpose, five-thousand feed samples with different flowrate and methane content were supposed which formed a feasibility-check region. The results showed that with respect to the design constraints, the optimal SMR process is more flexible and feasibly operates in the entire region. However, the nitrogen expander process cannot feasibly operate for the gas feed with high flowrate and low methane content.