2026-01-26 - 2026-01-26-DDIA_3

| 1 min read

chp 2 start

  • non-functional requirements seem obvious and doing them a given but understanding them and listing them explicitly is important
  • some non-functional reqs this book will cover: perf, reliability, scalability, maintainability
  • materialization: if you have a heavy query sometimes you want to run it ahead of time of the user calling it, so when it they do call it returns results instantaneously
  • if reads are heavier than writes optimizing for them makes sense with stuff like materialized views, but prioritizing reads over writes means that you might always get the latest writes as soon as possible
  • depending on the application you are build treating "celebrity" cases differently than everyone the same way makes the system much better
  • metric for software perf
    • response time: from user click to response
    • throughput: requests/sec, bytes/sec, posts/sec, writes/sec, x/sec
  • usually the response time goes up as throughput goes up, more reqs = system doing more = reqs queuing more
  • retry storm: reqs queue so long they timeout and retry causing an already overloaded system to struggle more
    • things that can help: exponential backoff, token bucket algorithm, load shedding, backpressure (to look at outside this book)
  • metastable failure: "self-sustaining collapse", system continues to be in a degraded state long after a stressor is removed