intermediate 2 min answer

A cost-sensitive education platform must serve large enrolment spikes and heavy video delivery on a tight budget. Which architectural choices give the largest cost reduction per unit of effort?

physics-wallahcostcdnegressefficiency
Show the full answer Hide the answer

Where the money actually is

For a video-heavy consumer education platform the cost order is usually: bandwidth and egress first, storage second, compute third, which is the inverse of where engineering attention naturally goes. Optimising application code is satisfying and rarely moves the bill.

The highest-leverage choices

  • Cache hit ratio at the CDN. Every percentage point is a direct reduction in origin egress. It is improved by consistent URL construction (query-string variation is a common silent cache-buster), longer TTLs on immutable content, origin shielding so a miss in twenty locations is one origin request, and request collapsing.
  • The encoding ladder. Serving a bitrate higher than the device can display is pure waste, and the number of renditions is a direct multiplier on both storage and transcoding cost. Fewer, better-chosen renditions usually beats more.
  • Storage tiering by access pattern. Course content follows an extreme popularity curve; the long tail can live on cold storage at a fraction of the cost, provided the retrieval latency is acceptable for content nobody is watching live.
  • Committed-use and reserved pricing on the predictable baseline, with on-demand only for the variable portion. This is a purely commercial change with no engineering risk and it is routinely left on the table.
  • Turning off non-production environments outside working hours, which is trivial and frequently a meaningful share of compute spend.

The architectural choices with a cost dimension

  • Serve as much as possible statically. A pre-rendered page on a CDN costs a rounding error compared to a dynamically rendered one, and much of an education platform's content is genuinely static between updates.
  • Batch rather than stream anything that does not need to be live. Real-time processing costs more than hourly processing, and most analytics does not need to be real-time.
  • Right-size before autoscaling. Autoscaling an oversized instance type scales the waste.

The discipline that sustains it

Unit economics as a tracked metric — cost per active student, per hour of video delivered — rather than total spend. Total spend rises with growth and tells you nothing; unit cost falling while usage grows is the only evidence that efficiency work is working, and it is the number that should be on the engineering dashboard.