I am designing a simple fail over system with just a primary and standby server. The main one will be in our office, while the standby will be on the cloud. I was reading about virtual IPs and how they provide 'failover' typically for load balancers.
My question:
How are they able to switch so fast?
My limited understanding of DNS data is that they are cached on dns servers worldwide. Surely, it will take time to propagate any changes.
Virtual IPs can typically only be used within a single network, e.g. in an Oracle RAC cluster. You can't really do that between the office and the cloud.
You may have also heard of Anycast IPs but that needs a much more advanced network infrastructure than you probably have.
It also depends on what kind of server you're building. Some services are designed to support multiple servers - e.g. DNS. Some support primary/secondary servers - e.g. SMTP. Some support master/slave setup - e.g. most databases. And some can be configured in a way that it doesn't matter which server you access - e.g. stateless web servers.
Forget Virtual IPs / Anycast IPs - that's an advanced level.