samizdatco/ngx-http-auth-digest — Issue #1: Bottleneck in accessing the nonce red-black tree
Author: samizdatco
Created: 2011-11-04 23:37:25+00:00
State: open

all requests to digest-protected pages are funneled through a single mutex accessing an rbtree of recently issued nonce values. the logic for evicting saved nonces from the tree over time is fairly simple, but what is unclear to me is how to schedule these garbage collection runs.

the cleanup hook on the request's pool seems like a good candidate since it won't block the request that triggered it. perhaps with an atomic flag in the shm segment preventing traffic jams of cleanup?