Load Balancing without Load Balancers
blog.cloudflare.com
blog.cloudflare.com
I'd be interested to hear about the mechanism for determining if there is sufficient capacity elsewhere, and how you avoid a cascading failure.
So you have Nd DNS IPs, Nc Cache IPs, Np Proxy Ips and so on, plus some failovers. It seems to me you can only have Sum(Nsubscript) + M servers in any given pop. Which is all good, but I presume that the load on proxy and cache servers would be such that you'd need quite a few instances of each. Further, given the nature of cloudflare's services, it would seem that some CDNed sites would be heavier than others.
So how do you assign various sites to IPs? Is this via some dynamic DNS magic? Is there a lot of communication between proxy and cache instances at each pop (DHT or similar?).
Basically, what I'm saying is, using BGP to do most of the load balancing is awesome, but it seems there has to be more to it than that, otherwise you'd experience a lot of flapping between servers handling heavy sites.
That or I'm missing something, but what?
And if the routers LB to a bunch of software nodes, then aren't you sort of in the same position?
Can you help me understand?
Umm, just curious, but I thought you used a set of redundant routers at each POP?
Or is the single router used highly redundant on its own?
What you're asking about isn't really an anycast problem either, you can have the same situation with any load balancing situation; if you need the client to come back to the same server, you need the client to bring you back something that says which server to route to, for example a cookie or a hostname, and you need something in your stack that handles that and routes it (could be DNS entries, a hardware or software load balancer, application logic, etc). Avoiding sessions is better, of course, if you can (or if you can have the client keep the state information; possibly encrypted and signed).