5 ms·
The most important part if the blog entry is that they are building on top of async Tokio but not Hyper, so other companies can probably consider Tokio as produ
by xiphias2 4y ago
The most important part if the blog entry is that they are building on top of async Tokio but not Hyper, so other companies can probably consider Tokio as production ready for large scale workloads.
- perrohunter 4y agoDo you think there’s problems with Hyper?
- onei 4y agoI believe the lack of using Hyper was so they could be more flexible in what nonstandard parts of HTTP they could support, e.g. status codes into the 900s.
- IceWreck 4y agoHyper conforms to HTTP but a bit too much. Cloudflare has to proxy users who may send invalid HTTP like status code 666 or something.
- db48x 4y agoAnd conforming to HTTP is a good thing when you are writing a server, where you want all your responses to be perfectly formed. But for a proxy that is mostly passing through other people's traffic unaltered, it is not so important.
- iforgotpassword 4y agoYou could almost argue it's counter productive to an extend. One of these invalid response codes might become valid in the future and then suddenly your proxy breaks valid communication attempts. One of the reasons TLS1.3 has to look like TLS1.2 in the handshake.
- tialaramex 4y agoI don't know about HTTP, but TLS had explicit invariants. You could write a working TLS 1.2 proxy in say, 2010, and do it correctly, having of course no idea how TLS 1.3 will work, and it would have worked with TLS 1.3 as conceived over a year before publication, back when it admitted it was TLS 1.3 (0x03 0x04 ~= SSL 3.4) But real world systems, most prominently "middleboxes" often sold as security devices, did not obey the invariants, they were actually bad implementations of TLS 1.2, but they worked and so they'd been able to proliferate. TLS 1.3 as eventually standardised needed to cope with that nonsense. So, if there are HTTP invariants, then a proxy merely needs to get those correct and would in principle interoperate despite newer HTTP versions. With TLS 1.2 invariants talking to a TLS 1.3 client that meant a proper proxy would shrug and say "I can't speak TLS 1.3, you need to talk TLS 1.2" and that works fine. Whereas the middleboxes tended to go "OMG. A byte I didn't understand! We're under attack! Light the beacons, all men to the battlements!"
- ta-run 4y agoIsn't demo's also built on top of Tokio?
- pier25 4y agoYes
- rektide 4y agoAnd hyper, for their native HTTP extension (for http2). https://github.com/denoland/deno/blob/main/ext/http/lib.rs#L41-L49 https://github.com/denoland/deno/blob/main/ext/http/lib.rs#L...
- MuffinFlavored 4y agos/demo's/deno
- pjmlp 4y agoIn current state of affairs you can use async Rust as long as you use Tokio anyway, given that most crates aren't portable across async runtimes.