What does the 'layered system' constraint mean in REST, and what are its benefits?
Last updated
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.