It's TCP vs. RPC All over Again
&gt; the Internet seems to be missing a standard protocol for the request&#x2F;response paradigm, with repeated attempts to force-fit TCP leading to inevitable mismatches<p>HTTP <i>is</i> that.  QUIC is that over <i>UDP</i>.<p>We&#x27;ve discussed Ousterhout&#x27;s paper about replacing TCP in the data center.  Last I looked the answer was &quot;not with what is described in the paper&quot;.<p>&gt; I have never understood why the Internet has worked so persistently to adapt TCP in support of request&#x2F;reply workloads instead of standardizing an RPC transport protocol to complement TCP.<p>&gt; ...<p>&gt; But my original question was to ask why that hasn’t happened. The only answer I can come up with is that judgment often reflects biases.<p>I can explain this.  Some of it is bias, as TFA surmises, but there&#x27;s a lot more to it.<p>First off, there <i>is</i> an Internet RPC protocol, and it&#x27;s the ONC RPC protocol, the one that NFS uses.  ONC RPC does run over TCP and UDP, which, yes, TFA doesn&#x27;t seem to want.<p>Second point: adding new upper layer protocols (ULPs) like TCP and UDP and SCTP is fraught with middlebox and over-design problems, and you can look at SCTP for details.<p>The third point is that the ability to implement and iterate quickly means that having to wait for kernel support for the new thing is a non-starter.  This is the strongest reason why you won&#x27;t see a new RPC ULP happen quickly and why there has been little interest in one.<p>So between the middlebox issues and iteration latency issues the only way to do a new ULP is as <i>a new binding</i> of the RPC <i>which must also have</i> TCP and UDP bindings.<p>I.e., all request-response protocols we have pretty much have to run on top of TCP or UDP.<p>This fact of Internet life may suck, but that&#x27;s just how it is.  Making it go away will require lots of time.  Developers don&#x27;t have lots of time.<p>Fourth point: running a request response protocol over UDP is quite reasonable, especially in the datacenter.<p>Fifth point: building a new ULP will risk yielding the same over-design issues as SCTP all over again unless it&#x27;s a new binding of another protocol.<p>I&#x27;m beating a dead horse here; let&#x27;s switch to the &quot;bias&quot; issue.<p>RPC got a really bad rap in the 90s and 00s.  The reason is that the RPC frameworks that came out of the 80s, and the more modern versions that followed them in the 90s and 00s, were all [mostly] synchronous.  There&#x27;s no reason for that: it was the easiest way to implement back then.<p>Another aspect of synchrony is that RPC == remote procedure call and comes from an era when it was fashionable to build things like distributed remote shared memory (which is a performance disaster).  The idea that RPC is like a function call instantly evokes synchrony even though RPCs are not condemned to be synchronous.  That suggestion leads to aversion.<p>Another reason that RPC frameworks got a back rap back then was the encoding systems used.  It doesn&#x27;t matter if the encoding system was trivial like XDR or complex like NDR or DER or PER or whatever -- the tooling for encoding rules from the 80s and 90s was just not remotely universal.  As well we had the XML era (e.g., SOAP), which was very buzzword-rich and efficiency-poor.<p>That bad reputation is undeserved, really, but there it is.  Nowadays RPC is making a comeback via gRPC and friends, but it shouldn&#x27;t surprise that they typically run over HTTP.<p>Meanwhile the web folks iterated quickly.  HTTP user-agent stacks quickly became async.  HTTP APIs iterated from XML to JSON, and either way, with JavaScript and HTML, web apps got a great deal of flexibility and performed great by comparison to RPC apps.<p>Plus the web security model is atrocious mainly because of the most useful thing about HTML: pages can have cross-site links.  Cross-site linking is so incredibly useful that it can&#x27;t be done without.  And now you need a fancy user-agent (browsers), so the web folks built one (browsers).<p>HTTP won out over RPC.<p>Why not use HTTP for everything, then?  Well, HTTP&#x2F;1.1 is... not efficient.  H2 is much better, but still over TCP.  H3&#x2F;QUIC should be perfectly fine in the datacenter, and for some things on the web (and eventually maybe all things on the web?), and runs over UDP.<p>But HTTP is a request&#x2F;response protocol.  Just like any RPC!<p>Plus ça change, plus ça devient la même chose.<p>My argument: HTTP <i>is the protocol you&#x27;re looking for</i>.  And if ever we need a new ULP and are confident that we can deploy it, then we should design one <i>for HTTP</i> because a) that will satisfy the RPC need, b) it will tend to quash over-design instincts, c) it will have the same APIs&#x2F;semantics as a protocol we&#x27;re all already very familiar with, d) having one protocol with bindings to all applicable ULPs will help us get over the kernel support issues.  (d) is especially appealing: you get to target one API and you get the best ULP locally supported.<p>We do have a widely-deployed Internet RPC protocol called HTTP, and you get to run it over TCP or UDP, and its semantics are stable when we add new ULP support.  That&#x27;s a pretty good outcome.  Though maybe it requires getting over one&#x27;s own biases :)<p>&gt; That we have since turned HTTP into the Internet’s de facto RPC protocol (and then now realizing that it is suboptimal, are trying to optimize it by collapsing all the layers into the new QUIC protocol), is only a testament to how small a role technical rationale plays in what happens in industry.<p>I object to the characterization of HTTP as suboptimal for RPC.  TFA is clearly referring to TCP as being suboptimal for RPC, but not really covering how UDP is suboptimal for RPC.  And TFA does not discuss why NFS switched from using UDP to TCP, say.<p>It feels like TFA is just emoting that we ought to have a ULP specifically for pure RPC.  That seems like a very biased position.<p>Suppose we built a ULP for RPC though.  We could easily expect HTTP to get adapted to run over it.  What does HTTP add that an RPC doesn&#x27;t need?  Mostly headers, which the RPC can just not use, and URI components, which the RPC can also set to the smallest possible values, say.<p>There&#x27;s not that much light between RPC and HTTP.  Both are request-response protocols.  Accept HTTP as <i>an RPC</i> and you might be happy.