How to redirect customers to the nearest region server using their IP address, latitude/longitude?

Hi Dmitry,

We having a website in Magento2 with domain name https://www.example.com and deployed the files in four servers in different region. Now we want to redirect our customers to nearest region server using their IP address, latitude/longitude.

Please let me know how to achieve the above process by handling the redirection inside Magento2 application itself rather than DNS based geoip routing.