text stringlengths 0 1.32k |
|---|
[498.22 --> 513.34] And when we start getting into the real-world benchmarks of, you know, like real applications rather than the peak load type benchmarks that I've been doing currently, I think we'll see much more efficient use of Node and of the connection there. |
[513.34 --> 523.08] But it does require a different way of thinking about your web applications, your web APIs, because you're not just pipelining individual requests one at a time. |
[523.64 --> 531.44] You can have, you know, the protocol provides no limits to the number of in-flight requests and responses you can have simultaneously over a single connection. |
[532.14 --> 534.88] And then you add things like push streams on top of that. |
[534.88 --> 548.72] It adds a significant new thing that you just have to consider of how you're building your applications and, you know, what the interaction is going to be with your, you know, in terms of performance and concurrency and all these things that you just don't currently have to deal with. |
[549.60 --> 559.16] So I think there's going to be a lot of just kind of coming to terms with the protocol and getting experience with the protocol and kind of figuring out what those best practices are. |
[559.16 --> 565.06] Because it's still a very young protocol, you know, and there's not a lot of industry best practice to draw from. |
[565.70 --> 573.62] So, you know, it's just kind of let's get it out there and get it in the hands of people to use and, you know, see how it evolves from there. |
[574.34 --> 579.40] I talked to Michael Rogers earlier about kind of the state of the union, so to speak, for Node.js. |
[579.40 --> 587.40] And he was coming at it from a direction and governance side, less of a code side. |
[587.44 --> 592.30] But one thing he said was a really important factor in this next year is security. |
[592.90 --> 599.94] And so how does H2 play into or the work you're doing on H2 support the overall mission of being more secure? |
[600.28 --> 600.42] Right. |
[600.72 --> 602.82] So there's two things there. |
[602.82 --> 613.30] With H1 in core right now, a number of design decisions were made early on to favor performance over spec compliance, right? |
[614.92 --> 624.28] It turns out that there are a number of compliance things in the spec that says, you know, don't allow white space in headers, right? |
[624.28 --> 630.86] And there's very good reasons for that because you get into, you know, requests smuggling and, you know, response splitting. |
[631.08 --> 638.38] And there's a lot of real specific security issues that come if you allow invalid characters into an H1 request. |
[639.06 --> 641.96] Node was like, yeah, you know, we want things to go fast. |
[642.10 --> 643.28] So we're not going to check this. |
[643.36 --> 644.20] We're not going to check that. |
[644.20 --> 653.80] And it was a very deliberate decision not to fully support the H1 spec. |
[654.28 --> 662.36] And what we found is that that caused a number of security issues that we've been dealing with, you know, over the past year or two years and stuff like that. |
[664.44 --> 671.96] With H2, we're going to be taking an approach where we're going to be very spec compliant, right? |
[672.04 --> 674.40] And we're not favoring performance over that. |
[674.46 --> 676.22] We're not sacrificing one or the other. |
[677.06 --> 682.76] It is going to be absolutely compliant to the specification without taking those kind of performance shortcuts. |
[682.76 --> 697.62] And that is something that I am emphasizing, you know, in my own development as I'm going through this, that making sure that we can, that we're hitting all of those, you know, you must do this or you must not do this that are fine in that specification. |
[697.62 --> 707.62] And I think by adhering to the spec as closely as we possibly can, we mitigate a lot of those potential security issues. |
[707.62 --> 717.90] The other important thing is that even though H2 does not require TLS, you know, per the spec, you can do plain text if you want. |
[718.50 --> 733.84] The browser implementations, the primary clients of H2 right now, you know, Chrome, Firefox, Safari, and some of the others, they require that they will only talk to H2 server over TLS, right? |
[733.84 --> 734.64] It's just mandated. |
[734.80 --> 736.32] They won't even connect to a plain text server. |
[736.44 --> 742.26] So automatically out of the gate, you're using, you know, secured connections. |
[742.90 --> 746.16] And that alone is going to be a significant improvement to security. |
[746.94 --> 754.90] The one kind of limiting factor there is Node hasn't really had a great reputation as a TLS terminator. |
[755.84 --> 759.36] A lot of people, it's just the best practice, put a proxy in front of it, right? |
[759.36 --> 765.52] And then they'll reverse proxy back over a plain text connection back to Node and just to ensure the performance. |
[765.88 --> 770.94] A lot of that has to do with the way the crypto works with the event loop and OpenSSL and that kind of thing. |
[771.38 --> 774.90] So I think a lot of work is going to need to go in to try to improve that. |
[775.18 --> 781.82] If we want to improve the performance of Node as a TLS endpoint and make that, you know, improve on that story. |
[781.82 --> 788.62] So what gets you most excited about H2 being available? |
[789.14 --> 794.70] I know you're working on things like you talked about the state of things, but what's the most exciting to you that's going to change things for it? |
[795.42 --> 801.54] Just seeing the getting into the hands of developers and seeing what they do with it, right? |
[802.52 --> 804.76] It is a very young protocol, right? |
[804.76 --> 807.00] It is brand new and I have my issues with it. |
[807.00 --> 813.08] I was actually involved with, you know, the working group for a while that was actually creating it and I was one of the co-editors on the draft. |
[813.20 --> 817.46] So it was early on, you know, you know, had, you know, some interest in where it could go. |
[818.26 --> 819.74] Then I got out of it for a little while. |
[819.84 --> 824.52] I had some issues with how it was designed and I'm not completely happy with the protocol by any stretch. |
[824.62 --> 826.26] I do have my issues with it. |
[827.22 --> 829.56] But I want to see what developers do with it, right? |
[829.56 --> 837.58] And I love seeing all the different ways that people are using Node today in ways we didn't even imagine that, you know, that they could or would or anything else. |
[838.28 --> 851.96] And I want to see that also with the protocol, just the experimentation and just the all the different new types of applications that could be, you know, that could be developed or all the different ways that it could be innovated on and built on. |
[851.96 --> 856.16] Any ideas, any pontification you could do on what could be built? |
[856.38 --> 861.94] There are all kinds of opportunities for more interesting RESTful APIs. |
[862.22 --> 869.48] You know, push streams are something that are really interesting. |
[869.62 --> 874.00] And so far they've only really been looked at as a way of pre-populating a request cache, right? |
[874.10 --> 876.94] You know, I'm going to push it out so you don't have to do it. |
[876.94 --> 892.62] But I think with REST APIs, push streams offer some really interesting opportunities for new kinds of APIs that are providing, you know, event notifications or, you know, the servers more proactively pushing data to the client. |
[892.62 --> 909.00] One person I was talking to and one of the ways that they were kind of prototyping stuff and, you know, using H2 is they have they would create a tunnel using over an H2 connection where they would, you know, open the connection with their client. |
[909.00 --> 919.60] But then once the connection was established, they would switch roles, right, and allow the server to act as the client, you know, to the server, you know, and the client was acting as the server. |
[919.72 --> 925.78] And they were doing this as a way of doing testing over their network environment. |
[925.78 --> 930.50] That kind of thing, you can't do that with H1, right? |
[930.60 --> 940.54] But because of the, you know, the multiplexing and, you know, the communication model that exists in H2, that kind of stuff is allowed, right? |
[940.56 --> 941.38] It's something you can do. |
[942.60 --> 952.64] H2 is going to enable new extensibility models, kind of new possibilities for new kinds of protocols that kind of coexist with H2P semantics. |
[952.64 --> 955.68] And we already see some of that work already happening within the working group. |
[955.84 --> 960.54] There's proposals for other kinds of protocols that are layered into the mix. |
[962.44 --> 965.16] And, you know, you kind of wonder, well, you know, who would do that kind of thing? |
[965.22 --> 966.52] Well, look at WebSockets, right? |
[966.80 --> 975.90] Look how WebSockets emerged and, you know, its relationship with H1 and kind of the difficulties that existed trying to get those two things to work together, right? |
[975.90 --> 988.72] With this, the framing model is going to allow you to more naturally experiment with those kinds of new protocols without the pain that we had with, you know, trying to introduce WebSockets into it. |
[988.80 --> 993.92] So there's a lot of new types of innovations, I think, that could come out of it. |
[993.96 --> 999.40] But we need to build a kind of a collective experience working with it in order to be able to tease those things out. |
[999.40 --> 1003.54] You mentioned some things you're not happy with with the H2P protocol. |
[1003.64 --> 1006.12] I couldn't let you not tell me what those are. |
[1006.42 --> 1008.52] So what are the gotchas? |
[1008.62 --> 1010.74] What are the things that are just bugging you about this protocol? |
[1013.00 --> 1014.06] Staple header compression. |
[1016.02 --> 1017.74] It's very effective, right? |
[1017.88 --> 1023.90] You get some, you know, in terms of headers in H2P are very repetitive. |
[1023.90 --> 1032.22] You know, you're sending the same data over and over and over again, you know, cookies or, you know, user agent strings, you know, all these kinds of things. |
[1032.32 --> 1037.98] And when it comes to actually what's transmitted over the wire, it's a lot of waste, like a date, right? |
[1038.24 --> 1041.92] And each one is 29 bytes because it's encoded as a string. |
[1042.62 --> 1050.46] You know, that can be, like, more compactly encoded as just a couple of bytes if you're using a more efficient encoding, right? |
[1050.46 --> 1053.52] So it's very, very wasteful as it exists today. |
[1054.94 --> 1061.92] HPAC, which is the stateful header compression protocol in H2, uses this state table that's maintained at both ends. |
[1062.34 --> 1064.02] There is actually two in each direction. |
[1064.20 --> 1066.80] So the sender has two, the receiver has two. |
[1067.94 --> 1072.38] And it, you know, the receiver gets to say how much state is actually stored. |
[1072.52 --> 1075.82] The sender gets to say what's actually stored in that table. |
[1075.82 --> 1083.36] But for the entire life of the connection of that socket, however long that socket is kept open, you have to maintain the state, right? |
[1083.76 --> 1085.86] And that doesn't exist in H1 today. |
[1085.96 --> 1088.10] H1 is a completely stateless protocol. |
[1089.06 --> 1093.08] So H2 switches that and makes it where you have to maintain state. |
[1093.32 --> 1098.26] You have to maintain this server affinity, right, over a long-lived connection. |
[1098.26 --> 1112.74] And even though you're multiplexing multiple requests in flight at the same time, you have to process those headers sequentially and serialize the access to those things. |
[1113.56 --> 1117.60] Because if that state table gets out of sync at any point, you just tear down the connection. |
[1117.78 --> 1119.94] You can't do anything else on it. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.