What HTTP/2 Means for REST APIs

The advent of HTTP/2 offers exciting prospects for the web. With key improvements like multiplexed streams, server push, header compression and a shift away from a textual protocol toward a binary one, Tomash Sidey discussed what that means for REST APIs in a post on API2Cart.

The first point worth expanding on is the new data transmission format over TCP (Transmission Control Protocol) connection. Switching to a binary protocol means computers have less work to do to process this information. While this will ease the load on servers to process heavily-loaded REST APIs, developers will have a tougher task debugging applications.

The time costs involved in processing a large number of requests with HTTP/1.1 has also been improved upon through the implementation of multiplexed streams. This addition allows several HTTP requests to run concurrently, further lightening the server load and improving the user experience through faster load time.

Server push technology allows servers to determine additional resources the client might want during request processing. This data transmission is initiated by the server without the need for the client to send additional requests. While uses for RESTful APIs may not be immediately obvious, the HTTP/2 trend toward improved efficiency at lower computational cost should be considered when designing applications.

Be sure to read the next REST article: Why You Should Consider Content Negotiation for REST APIs

Original Article

What REST API Services Can Expect from HTTP/2