BGP Failover

I am having 2 inputs.

What is the best solution for a fail over for BGP?

I want input 2 to switch over once input 2 goes down.

Thank you.

its 2 bgp peers? - use distance

Yes two bgp peers.

I tried using distance but face routing issues.

The TX goes from one peer and the RX goes from other Peer.

Can you please guide me to a page with rules so I can what if I have done something incorrect.

Thank you.

Just use simple attributes with your peers. Set local pref higher than 100 with main peer, and set med to 50 to your reserve peer.