One of the harder problems I solved in my open source PaaS was proximity steering.
Basically load balancing so users get routed to the physically closest server with least latency.
My goal: any node can become a proxy, terminate TLS for any service, and route to available servers. Always hitting the nearest server.
Since I couldn't afford Anycast / BGP, I went with GeoDNS. DNS always resolves to nearest server, but there was a big problem: ACME challenges.