
7/25/2024 · Alex Bocharov
What this post added
This post details performance optimizations for Cloudflare's WAF ML product, specifically the WAF Attack Score. It describes the system design, identifies bottlenecks in feature extraction (HashMap lookups and regex replacements), and presents an optimization using the Aho-Corasick algorithm to replace HashMap lookups, resulting in a 47.84% reduction in processing time for long inputs and a 1.64x speedup. Further optimizations for model inference are also discussed.