A variable-delay optical interferometer with 128 actively selectable delays and a technique of active phase stabilization were innovatively designed and applied for the first time in the experiment of round-robin differential phase shift quantum key distribution (RRDPS-QKD). According to the RRDPS protocol, larger number of delay channels in interferometer can ensure higher tolerance of bit errors, eliminating the fundamental threshold of bit error rate of 11% in traditional BB84 protocol. Therefore, an interferometer with 128 selectable delay paths is constructed and demands the ability of fast switching at the rate of 10 kHz, which requires dynamic stability of multiple paths. Thus, a specific designed phase stabilization technique with closed real time feedback loop is introduced to guarantee the high visibility of interferometer selections dynamically. The active phase stabilization technique employs a phase modulator (PM) driven by a DAC to adjust the relative phase between the two arms of the interferometer. By monitoring photon counting rates of two Up-Conversion Detectors (UCD) at two output ports of the interferometer, a Field Programmable Gate Array (FPGA) calculates and finds the optimal code value for the DAC, maintaining a high visibility of the interferometer every time a new light path is selected. The visibility of most of the 128 interferometer selections can simultaneously be maintained over 96% during the QKD, which strongly supports the experiment.