liveBook · Manning

REST

As explained in Fast by Default

REST is an architectural style for networked interfaces that models interactions as operations on identifiable resources using standardized web semantics.

REST is a resource-oriented architectural style for networked interfaces. It represents each entity at an endpoint and uses familiar web semantics to access those resources. For example, GET /users/123 returns a user, while GET /users/123/posts returns related posts. The model is simple, widely understood, and works naturally with HTTP caching and load balancing. section 5.3.3

The main performance risk appears when a client needs related data. A REST client may make one request for each resource, wait for sequential responses, and receive fields it does not use. Each additional round trip adds latency, with slower networks and mobile clients affected most. REST therefore trades a straightforward endpoint model for potentially more requests and larger cumulative response costs. section 5.3.3

Evaluate a REST design by checking:

  • How many resource requests a common screen or workflow requires. section 5.3.3
  • Whether responses contain fields that the client does not need. section 5.3.3
  • Whether HTTP caching and load balancing can support the resource access pattern. section 5.3.3

Pull-request details on mobile

A pull-request display required separate requests for the pull request, commits, comments, and reviews. Sequential calls delayed complete information for mobile users, while each response also carried fields the client did not need. This illustrates REST's resource clarity and the round-trip costs of assembling related data. section 5.3.3

How Fast by Default covers it

How deep it goes
Explains endpoint structure and request costs, but stops short of implementation code or protocol internals.
Examples
Uses user and post endpoints plus GitHub's four-request pull-request display to show resource access and round-trip costs.
What you can do after
Evaluate REST API designs by counting round trips, inspecting payloads, and comparing alternatives for the client workload.
How it connects
Connects REST with HTTP caching, load balancing, GraphQL, gRPC, mobile clients, and related-resource requests.

Also explained in

Compare how 30 books explain REST →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Fast by Default. The section links point to the parts of the book it draws on.