Path preference and failover are the same policy seen from two sides: what wins normally, and what wins when it is gone.
BGP path selection follows an ordered decision process. In the standard process, local preference is compared before AS-path length, so it governs outbound choice within your own autonomous system, while prepending and MED are only signals to neighbors that apply their own policy first. Vendor-specific steps such as weight, and options that change defaults such as how MED is compared, are confirmed against current documentation for your platforms and versions.
Common preference tools and what they actually influence
Failover analysis separates detection — hold timers, or BFD where supported — from convergence: how quickly the alternate path is installed everywhere, including firewalls, load balancers and cloud gateways that hold their own state. The high-availability design of the surrounding data center must agree with the routing policy, or a redundant pair can still fail as one.