Skip to content
academia.sh

Course Intermediate

The Traffic Layer

By the end of this course

Start course

01

Entry Points

The first stops where a request enters the system: using domain name resolution as a routing policy and failover instrument, the edge cache's effect on the number of requests reaching the application, propagating content with push and pull models, and separating the content path from the application path.

  1. 01 Domain Name System Design Designing name resolution as a routing decision: measuring the geolocation, latency-based, and weighted policies on the same request flow, showing through resolver shares why the weighted policy misses its target share, and converting the TTL's determination of the failover window into dropped requests against the introductory course's downtime budget.
  2. 02 Content Delivery Networks Treating the edge cache as a location decision: measuring wire bytes with local origin and edge processes, counting the edge hit rate and the requests reaching the application with an in-process trace, showing that chaining two caches in series leaves the second one useless, and showing which of the introductory course's computations changes.
  3. 03 Push and Pull Based Distribution Propagating content to edges with two distinct models: pull-based distribution producing the first miss and a stale-version window, push-based distribution producing wasted copies and a message multiplier, choosing between the two by content class, and the choice's effect on the introductory course's write bandwidth and storage calculations.
  4. 04 Static Content Hosting Separating the content path from the application path: measuring the combined and split arrangements with local processes, counting the requests and bytes a page load drops on the application process, and folding asset traffic into the introductory course's peak edge request rate and read egress calculations.

02

Load Balancing

The layer that decides which replica a request lands on: the load balancer's distribution, health check, and TLS termination responsibilities, the separation of connection-level distribution from content-aware routing, the comparison of round robin, least connections, and consistent hashing algorithms, the functional overlap with the reverse proxy, and the cost of session stickiness to scaling.

  1. 01 Role of the Load Balancer The three responsibilities of the layer that distributes requests among replicas doing the same work: measuring distribution with local processes, comparing the answered-request rate between setups with and without health checking when a replica goes down, treating TLS termination as a placement decision, and dividing the peak request rate computed in the introductory course by the replica count.
  2. 02 Layer 4 Balancing The decision being made once, when the connection is established, and its cost: measuring the same total load with even and uneven client shares, perfect connection distribution producing four times the request skew, counting the information read to make the decision, and computing how many replicas the measured imbalance corresponds to at the introductory course's peak rate.
  3. 03 Layer 7 Balancing The decision being made again for every request, and the request's content being read: the same client mix's request skew dropping from four times to one, splitting read and write streams into separate replica pools, external connections collapsing into internal ones, and measuring how many replicas the split costs in the introductory course's calculation.
  4. 04 Balancing Algorithms Changing the distribution rule itself: comparing the round-robin and least-connections rules by wait time and queue length under equal and slowed replicas, counting the fraction of keys that move under modulo hashing and consistent hashing when a node changes, the effect of virtual node count on distribution, and tracing that movement back to the introductory course's computation through the cache hit ratio.
  5. 05 Load Balancer and Reverse Proxy Explaining two components with the same program and where the distinction actually lies: a single relay program taking on both roles through its rule table, measuring what splitting the roles into separate processes versus gathering them into one changes through hop chains and the effect of killing a process, writing the distinction as responsibility and location, and billing the cost of adding a hop against the introductory course's composite availability computation.
  6. 06 Session Stickiness Choice becoming a constraint and the scaling bill that follows: measuring how much sticky binding breaks distribution, counting the sessions lost when a replica drops and the sessions whose binding breaks when a replica is added, the busiest replica barely dropping despite the added replica, and converting the unsplittable share into an upper bound with the introductory course's serial fraction relation.

03

Gateway Patterns

Placing the responsibilities gathered at the edge: what the API gateway does and must not do, aggregating multiple service calls into one request, offloading common work to the edge, building a client-specific interface, separating concerns with helper processes, and isolating the validation layer.

  1. 01 API Gateway Placing the responsibilities that pile up at the edge: which decision separates the API gateway from the load balancer and the reverse proxy, measuring the three layouts of five edge responsibilities by repeated lines and units regulated, and calculating which component collects the edge's peak request rate into a single point.
  2. 02 Gateway Routing and Aggregation The service map's two separate jobs: converting a path to a single service, and spreading one request across several services and merging the responses into one body; measuring three access patterns with real local processes and calculating how far aggregation cuts the request count while it grows the body at the edge.
  3. 03 Gateway Offloading Turning the move of common work to the edge into a mechanical rule: separating what is movable once a check's inputs are written down, measuring the repeated line count, the cost of the trust boundary shifting, and reading which rate a check moved to the edge runs at from the K01 calculation.
  4. 04 Backends for Frontends Splitting the edge by client type: separating three clients' field sets, measuring the unused fields and request count a single merged body carries, the batch-endpoint requirement separate edge units impose, and the client mix's effect on K01's egress calculation.
  5. 05 Ambassador and Sidecar Patterns Handing common work to a separate helper process: measuring how the ambassador separates the external contract from service code across two carrier versions, the sidecar's effect on runtime independence and the number of units republished, and the local hop the added process count costs.
  6. 06 Gatekeeper Pattern Isolating validation into a separate layer: separating checks that can be given at the gate from those that must stay at the application, measuring the rate and bytes at which invalid requests reach the application, reducing the number of units touching untrusted input, and applying the result to K01's peak edge rate.

Start typing to search.

↑↓ Esc navigate · open · close