← Back to Blog

How We Achieve Sub-Millisecond Latency

January 5, 2025 Engineering

When we set out to build Shilish, we had a non-negotiable requirement: decisions must be made in under 1 millisecond. Here's how we achieve that.

Edge Computing

Our detection logic runs at the edge, in data centers around the world. When a request arrives, it's processed by the nearest node—no round trips to a central server.

Optimized Data Structures

We use bloom filters and probabilistic data structures for fast lookups. These allow us to check millions of entries in constant time.

Pre-computation

Many detection signals can be computed ahead of time. We pre-process threat intelligence, reputation scores, and model features so they're ready when needed.

Rust and WASM

Performance-critical code is written in Rust and compiled to WebAssembly. This gives us near-native performance at the edge.

Results

The result is detection that happens faster than network latency. Your users won't notice any slowdown—but the bots will be stopped.