Open tomaka opened 7 years ago
What's the status on this work? It could be good to combine this with #154 as a new major version (realistically for a major version bump I'd drop rustc-serialize entirely).
The code here is working, but it's not tested. I was more or less hoping that Rust would support generators soon-ish (not async, just coroutines for parsing), but it looks like we're still far away from them.
What would the process be to get this PR and the Serde PR implemented? These two PRs would be a great boost for the project though I'm sure other concerns come in to play here.
Well the Serde update is ready for review. It has obvious backwards compat issues so there is a question there.
So the problem with this PR right now is that it breaks websockets. Websockets is a bit tricky because it's touching the topic of asynchronous I/O in Rust.
Other than that, I think there are some minor problems such as HTTP error codes not being returned in some situations (eg. request line too long), and performances could be improved.
The performance gains from this PR are really impressive! Running the hello-world
example goes from 19k req/s to 83k req/s (with wrk -t4 -c100 -d10s
)
I did notice two issues though:
panic
s, the connection hangs. Once the client kills the connection, the cpu usage explodes for all server threads.wrk -t4 -c100 -d10s
run, but each subsequent run gets worse and worse. (req/s) 83k -> 41k -> 35k -> 32k -> 27k -> 23k -> 22k -> 19k .... eventually down to zero. The server needs to be restarted to reset performance.Thanks for the investigation! That's unfortunate.
cc #27