Based on Border Gateway Protocol (BGP) paths, Anycast routes packets to the geographically closest server. When a router near a client requests the path to an IP address, it receives a list of available routes and chooses the shortest one. When using anycast, the system always takes the quickest path.
Hope this is helpful!
Join Masters in Cyber security course to learn more.