Skip to content
StackDecode
System Design
15. Software Design PatternsAnimated

Proxy Pattern

A stand-in that controls access to another object.

The idea

A proxy can lazy-load, cache, check permissions or call a remote service.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

ClientsReverse proxyServer AServer BServer C
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Clients see only the proxy's address.

step:
1/4
at:
Clients
1/8

The green dot is a request moving through the system.

Step by step

  1. 1Client calls the proxy
  2. 2Proxy checks or caches
  3. 3Forwards to the real object
  4. 4Returns the result

Where it is used

Remote, protection and caching proxies.

Watch out for

Extra latency and indirection.

Related