There was talks about throttling gerrit, which is also running in jetty. The same basic mechanism could be reused, so extracting this code to a separate project / jar might help code reuse.
Note that the current implementation might need to be generalized a bit to be usable outside of wdqs.