Hot-potato routing is a mechanism employed in the border gateway protocol (BGP), when the BGP selects the interdomain egress with the closest egress point based on intradomain path costs. Recent work has shown that it can impact the robustness of interdomain routing especially for large ISP backbones. Some mechanisms have been proposed to replace the hot-potato routing such as interdomain traffic engineering by tweaking BGP routes, the tunable Interdomain Egress Selection mechanism and so on. However, these methods often ignore the issue of link failures or the failure duration, which arise as part of everyday network operations. In this paper, we propose a flexible mechanism for routers to select the egress point robust to transient link failures with satisfying traffic engineering goals. The proposed RTF_TIE algorithm can also satisfy the purpose of real time in routers. Experiments with topology, routing data, traffic flow data from Abilene network demonstrate that the algorithm is effective