Skip to content
AnswerWell geo Documentation

Answerwell tools · 4 min read · Answerwell

Managed Website Hosting

Distributed website infrastructure: caching, queues, SLOs, geographic latency and reproducible resilience testing.

Managed infrastructure is the system of compute nodes, networks, storage and operating processes that keeps a website available. For a search crawler, its output is observed as name resolution, connection setup, the HTTP response and the time taken to receive the document. For a visitor, JavaScript execution, loading dependencies and interacting with the interface are added on top. A good server response is therefore necessary but not sufficient for a good user experience.

A typical chain: DNS → edge node/CDN → load balancer → application → database. A cache can complete a request before it reaches the application. Checking only the origin will not reveal a DNS, certificate or regional routing failure. The observation model should keep external availability checks separate from internal telemetry. Google SRE describes four main classes of signals: latency, traffic, errors and resource saturation [1].

Layer Observation Diagnostic meaning
DNS and TLS Resolution success, connection time Whether a client can start a request
CDN Hit ratio, object age How often the origin is needed
Application Latency quantiles and errors Whether the useful operation is performed
Storage Latency, queue, replication Whether consistency is preserved
Region External probes and real sessions Whether the service is available to the target audience

HTTP caching is defined by RFC 9111: object freshness, validation, and request and response directives [2]. no-cache requires validation before reuse; no-store forbids storage within the semantics defined by the standard. A shared cache must not mix personalised responses. A product’s price or stock level needs a different policy from a versioned font file.

A simplified model of mean latency:

E[T]=hThit+(1−h)Tmiss.\mathbb E[T]=hT_{hit}+(1-h)T_{miss}.

Here hh is the hit ratio, and ThitT_{hit} and TmissT_{miss} are the mean latencies of the respective paths. This is our own diagnostic model; the mean does not describe the slow tail. With h=0.8h=0.8, Thit=40T_{hit}=40 ms and Tmiss=400T_{miss}=400 ms, the mean is 112 ms. A cache change is also evaluated by the correctness of the content and by p95/p99.

Little’s law links the mean number of requests in a stable system LL, the arrival rate λ\lambda and the mean time spent in the system WW [3]:

L=λW.L=\lambda W.

At 100 requests per second and 0.2 seconds per request, the mean number of requests being served at once is 20. The law does not promise stability under overload. Concurrency limits, backpressure and controlled retries are needed so that a temporary slowdown in a dependency does not trigger an avalanche of requests.

For a target success level ss, the error budget over NN eligible requests is:

B=(1−s)N,b=e1−s,B=(1-s)N,\qquad b=\frac{e}{1-s},

where ee is the observed error rate and bb is the relative burn rate of the budget. With a 99.9% SLO and a million requests, a thousand errors are allowed in the chosen window. The definition of a successful request and of the window must be fixed in advance; the Google SRE example policy shows how the budget ties into decisions about releasing changes [4].

Our own robots measure availability from target regions and replay crawler load profiles. Models forecast saturation, latency anomalies and the consequences of caching changes. Compute clusters are used for repeatable simulations and for training on the observation log. The grounds for the models and the data versions are recorded according to the general methodology.

Response time forecasts are tested on later periods and on new regions. A good average forecast error does not excuse systematic errors on rare incidents. Optimisation must take into account the correctness of the document, availability for people and robots, and the cost of resources, not a single CPU load figure.

  1. Select the critical operations, regions, page templates and acceptable latencies.
  2. Measure cold and warm cache, mobile network, dependency failures and peak load.
  3. Test node failover, restoring from backup and data integrity; distinguish RTO — the recovery time — from RPO — the acceptable loss of changes.
  4. After a change, repeat a comparable load profile and the external probes. Present distributions, the number of observations and failed attempts.
  1. Rob Ewaschuk; ed. Betsy Beyer. Monitoring Distributed Systems, Google SRE, 2016. Book chapter.
  2. R. Fielding, M. Nottingham, J. Reschke. RFC 9111: HTTP Caching, 2022. Specification.
  3. John D. C. Little. A Proof for the Queuing Formula: L = λW, 1961. Operations Research.
  4. Steven Thurgood. Example Error Budget Policy, Google SRE Workbook, 2018. Policy and worked example.

See also: regional performance, bot analytics.