Response Time Law
Performance Engineering

Meaning

The Response Time Law states that the total time a system takes to respond equals the sum of its processing time and any waiting time. It helps engineers quantify latency and identify where delays occur, addressing the difficulty of pinpointing performance bottlenecks. It is applied whenever a service must meet latency targets or service‑level agreements.

Primary Function

Performance monitoring

Communicative Purpose

Ensures that system response times are measured and kept within acceptable limits

Pattern

measure response time → compare to threshold → trigger alert

Core Structure

response_time = processing_time + waiting_time

Função primária

Performance monitoring

Propósito comunicativo

Ensures that system response times are measured and kept within acceptable limits

Situações de gatilho

Web services: API endpoint latency exceeding SLA Database access: query response time spikes during peak load

Contextos

Microservice architectures, cloud‑native services, high‑frequency trading platforms

Padrão

measure response time → compare to threshold → trigger alert

Estrutura central

response_time = processing_time + waiting_time

Colocados típicos

  • latency
  • threshold
  • alert
  • histogram
  • percentile

Substituições comuns

  • Use moving average instead of raw measurements — smoother but hides spikes
  • Use 95th percentile instead of mean — captures tail latency but requires more data

Erros comuns

Measuring only server‑side processing time and ignoring network wait time, which leads to under‑estimating true latency Recording timestamps at the wrong points (e.g., before request dispatch) causing inflated response times Using wall‑clock time instead of monotonic clocks, resulting in inconsistent measurements when the system clock changes

Similar / contraste

Throughput Law focuses on volume of work processed per unit time, whereas Response Time Law focuses on the latency of individual operations

Interferências

Coming from JavaScript: assuming async callbacks guarantee ordering — Response Time Law requires measuring actual elapsed time, not just callback start

Família do chunk

  • Throughput Law
  • Latency Distribution
  • Service Level Objective

Nuance

Do not apply when latency is irrelevant to user experience, such as batch jobs; Measuring adds minimal overhead but can affect tight‑loop performance; Edge cases include clock drift and timer resolution limits

Efeito pragmático

Enables teams to detect latency regressions early and maintain SLA compliance, preventing user‑visible slowdowns

Dica de memória

Response Time Law is like a speed‑limit sign for your code: it tells you how fast you must go before you get a ticket.

Upgrade path

Progress to latency budgeting and Service Level Objective (SLO) design

Frequência: MediumFormulaicidade: FixedTipo de construção: conceptPrioridade de aquisição: Active recallPrioridade de output: InputTag de espaçamento: Medium-term

Log in to save chunks.