http://maverick.i2p/blog/darknet-dev
. /// If you're getting hammered by a botnet, bump this to 65536+. const SKETCH_WIDTH : usize = 2048 ; /// 4 hash functions gave us the best balance. const SKETCH_DEPTH : usize = 4 ; /// This is a Count-Min Sketch. /// Standard `HashMaps` die here because they allocate memory for every unique attacker (OOM vector). /// This struct uses fixed memory (O(1)) no matter how many millions of requests come in. struct CMSketch { table : [[AtomicU32; SKETCH_WIDTH]; SKETCH_DEPTH], } impl CMSketch {...