Card 09/ 10

ExerciseDifficulty: Intermediate1 min

Practice: Choosing the Front Door for Three Systems

A blog, a mobile API over six services, and a multiplayer game server.

Choosing between the three intermediaries, and between layer 4 and layer 7, is practised on three short briefs here. Decide the front door for each before opening the answers.

  1. A blog runs on one server. It must serve https, survive bursts when a post is shared, and keep the server's address private.
  2. A mobile app calls six backend services. Every call needs the user's token checked and a limit of 100 requests a minute per user.
  3. A multiplayer game keeps a long-lived connection from each player using its own protocol, not HTTP, across ten identical game servers.
Check your choices
  1. A reverse proxy. There is one origin, so there is nothing to balance. The proxy terminates TLS, caches the popular post through a burst, and hides the server's address.
  2. An API gateway. Six services sharing the same callers and checks is its job: one place to authenticate, one place to count requests, and routing by path. A load balancer alone spreads calls across copies, not across different services.
  3. A layer 4 load balancer. The servers are identical copies, so the job is spreading load. The protocol is not HTTP, so a layer 7 balancer would have nothing to read, and the connections are long-lived, which layer 4 keeps on one server for their whole life.