AltraMayor / gatekeeper

The first open-source DDoS protection system
https://github.com/AltraMayor/gatekeeper/wiki
GNU General Public License v3.0
1.29k stars 227 forks source link

Enable policies to load balance flows #297

Open AltraMayor opened 5 years ago

AltraMayor commented 5 years ago

Enabling policies to load balance flows markedly increases the value of Gatekeeper deployments since Gatekeeper servers act as load balancers with DDoS protection and discard the need for dedicated load balancers inside of the protected networks. In fact, Gatekeeper works as a better load balancer since the balancing is geographically distributed at Gatekeeper servers while the description of how to balance is centralized at Grantor servers, that is, Gatekeeper becomes a scalable, geographically-distributed, DDoS-protected, centrally-administrated load balancer.

This issue depends on the merge of pull request #295 since the new GK_BPF flow state enables policies to associate BPF programs to flows.

In order for policies to have a flexible infrastructure to implement the load balancing mechanism, the following items will likely be needed:

AltraMayor commented 5 years ago

When Gatekeeper acts as a load balancer, the final destinations have to decapsulate the packets themselves if direct delivery (see #230) is not possible. This can be done with a simple BPF program using XDP like Katran does. This way, the decapsulation adds a small overhead to final destinations.

AltraMayor commented 3 years ago

Other examples of large scale load balancers: Maglev, Unimog, and GLB. These examples provide design references that can be useful for Gatekeeper.