Fundamentals & Scalability — Series 2

Preview — 3 of 10 questions

What's the difference between a forward proxy and a reverse proxy?

AA forward proxy sits in front of one or more clients, forwarding their outgoing requests on their behalf (e.g., for anonymity or content filtering); a reverse proxy sits in front of one or more servers, receiving client requests on the servers' behalf and routing them internally (e.g., for load balancing or caching)
BThey're two names for the exact same component — the terms are interchangeable
CA reverse proxy is only used to reverse the direction of TCP packets, which has no relevance to HTTP traffic
DA forward proxy is only used by servers, while a reverse proxy is only used by clients

A company's users are spread across the globe, but its servers are all in one data center. Why would they add a CDN (Content Delivery Network)?

AA CDN replaces the need for a database entirely
BA CDN caches static content (images, CSS, JS, video) at edge servers physically closer to users around the world, so a user in Tokyo doesn't have to wait for a round trip to a data center in Virginia — reducing latency and offloading traffic from the origin server
CA CDN is only useful for websites that don't use HTTPS
DA CDN's only function is to block malicious bots — it has no effect on page load speed

Why do most web APIs aim to be stateless — meaning each request contains all the information needed to process it, with no server-side memory of previous requests from that client?

AStatelessness makes servers slower but more secure, which is always worth the trade-off
BIt's a purely historical convention with no practical benefit today
CStateless servers require every request to include authentication credentials, which is a security flaw
DA stateless server can handle any incoming request from any client, since it doesn't depend on session data stored locally on that specific server — this makes it trivial to add more server instances behind a load balancer, since any instance can serve any request

Sign up free to play

Answer all 10 questions (7 more), see explanations for every answer, and track your score.