do you work on a fast HTTP router implementation? #894
Replies: 6 comments 20 replies
-
Someone on Twitter pointed out the router inside of (I haven't run them yet though.) |
Beta Was this translation helpful? Give feedback.
-
I explored this in sozu a few years ago, and there's a benchmark repository you can explore. I ended up with a tradeoff where routing was done with a trie for the hostname, possibly handling a glob pattern, and then for the URL testing for equality or regular expressions. I'd love to see something that is more flexible and could hande different patterns for the hostname and that could manage both hostname and URL in the same structure. |
Beta Was this translation helpful? Give feedback.
-
I wrote a simple router a while back here. It's very rudimentary. I'm not sure how helpful it would be but figured I'd share. The crate could use some polish for sure. |
Beta Was this translation helpful? Give feedback.
-
path-tree is a very small implementation. The benchmarks is here. Plan: redesign it, add regex for more cases. viz-rs/path-tree#18 |
Beta Was this translation helpful? Give feedback.
-
Hello, This one's not exactly a HTTP router, more from the observability & logging arena. It may be quite a drift away from the exact think you're looking for, but seems like a similar situation.
|
Beta Was this translation helpful? Give feedback.
-
If so, I'd like to hear from you. For context, I'm investigating the feasibility of using regexes in this particular domain. It seems like they could be a good fit (and I say that without any particularly relevant experience with the HTTP router domain), and I wonder whether folks are actually using them. So if you do work on an HTTP router, and you'd be willing to lend some of your time, I'd appreciate if you could take a stab at the following questions:
regex
crate in your implementation? If not, why not?RegexSet
from theregex
crate? If not, why not?(For the "why not" questions, I'm not necessarily looking for a novel or anything. Answers like "I didn't know about it" or "I tried but it ended up being really slow" are totally fine.)
EDIT: To be clear, I am not looking to build a router myself. I am looking to use HTTP routers as a real world use case driving optimizations inside the regex crate.
Beta Was this translation helpful? Give feedback.
All reactions