What does the 'layered system' constraint mean in REST, and what are its benefits?

Last updated 29 June 2026

  • The architecture can be built from hierarchical layers (proxies, gateways, caches, load balancers), and each component only knows its immediate neighbor. A client can't tell if it reaches the origin server or an intermediary.

  • Benefits: scalability (add caching and load balancing freely), security (enforce policy at a boundary), and evolvability (refactor backends behind a stable interface).

  • Trade-off: extra layers add latency, often offset by shared caching.

  • https://dev.to/kennedy01crypto/http-rest-principles-and-api-design-fundamentals-2coe
  • https://aws.amazon.com/what-is/restful-api/
  • https://dev.to/ari-ghosh/mastering-rest-api-an-in-depth-guide-to-building-and-utilizing-restful-web-services-540d
All REST API interview questions