~/talk

Fast IP Address Matching in Elixir (...) & Persistent Term

Talkat Code BEAM America 2022 · 2022-11-03..11-04· [web-performance]
links:none on file
slides:none on file

Solves matching 1 million IP prefixes by parsing CIDR into bit-keyed structs and storing them in a radix tree so lookups stay in microseconds versus list scans that become 5,000× slower at 10k and ~33 ms at 100k. Avoids a GenServer bottleneck and ETS because ETS forces a ~28 MB memory copy per caller, causing memory spikes (example: ~3 GB with 20 processes). Uses persistent_term to publish the radix tree once, keeping memory flat for many readers; updates trigger global GC and are expensive.

AI-written summary · about

  1. 0:00Start
  2. 1:59Kat and Black Cat Concert Tickets
  3. 2:59Problem 1: Fast Matching on IP Prefixes
  4. 8:59Textbook example from getting started
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.