I have several servers with different IPs, deployed in different datacenters (mostly geographically close to our users). Let's imagine that this is simple web servers.
What I'd like to have is a single IP address for server so all users simple use it and it will route client to the nearest server.
I think using anycast address may help me. What I don't understand is
Anycast, as I see, used (only) for DNS servers. I believe this is due to pretty simple (stateless) DNS protocol nature. Will anycast work for webservers? Will session that routed to one server stays connected to that only server (so, say, all keepalive requests be routed to the same server), or every request may go to different server?
How can I implement anycast in practice? I understand I need an autonomous system (ok, I have one), then I need some server-state aware BGP announcer (so it will announce my anycast address only if/when the server is able to answer) - and I don't know what to use.
Did someone have any experience with anycast deployment? The idea is simple but I found too few information on its practical implementation.
Thank you in advance!