Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,43 @@ export default defineConfig({
],
],

/**
* Per-page description, og:title and canonical.
*
* VitePress gives every page a unique <title> but leaves `description` and the
* og:* tags at whatever the site-level config says — so all 19 pages shipped
* the same meta description and the same og:title. Search Console reports that
* as duplicate metadata, the search snippet for every page is identical, and
* sharing a deep link shows the homepage's card no matter which page it is.
*
* `description` comes from page frontmatter, falling back to the site default.
*/
transformPageData(pageData) {
const path = pageData.relativePath.replace(/(^|\/)index\.md$/, "$1").replace(/\.md$/, "");
const canonical = `${SITE}${base}${path}`;
const title = pageData.frontmatter.title ?? pageData.title;
const description = pageData.frontmatter.description ?? pageData.description;

pageData.frontmatter.head ??= [];
pageData.frontmatter.head.push(
["link", { rel: "canonical", href: canonical }],
["meta", { property: "og:url", content: canonical }],
);
if (title) {
const scoped = path === "" ? "resilix — load limiting for JavaScript" : `${title} · resilix`;
pageData.frontmatter.head.push(
["meta", { property: "og:title", content: scoped }],
["meta", { name: "twitter:title", content: scoped }],
);
}
if (description) {
pageData.frontmatter.head.push(
["meta", { name: "description", content: description }],
["meta", { property: "og:description", content: description }],
);
}
},

themeConfig: {
siteTitle: "resilix",
outline: [2, 3],
Expand Down
4 changes: 4 additions & 0 deletions docs/decisions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Why resilix is shaped the way it is — sixteen design decisions with the alternatives that were rejected. Every ADR-00N comment in the source resolves here."
---

# Design decisions

Why resilix is shaped the way it is. Source comments cite these by number (`ADR-007`), so this
Expand Down
4 changes: 4 additions & 0 deletions docs/guide/breaker.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Three trip conditions — failure rate, slow-call rate and a consecutive backstop — over a dual-bound window, and an honest account of when a circuit breaker is the wrong tool."
---

# Circuit breaker

<!--@include: ../../README.md#trip-conditions-->
Expand Down
4 changes: 4 additions & 0 deletions docs/guide/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Install resilix and build your first pipeline: slow-call circuit breaking, marking time-to-first-byte on streams, and classifying SQL errors correctly."
---

# Getting started

```bash
Expand Down
4 changes: 4 additions & 0 deletions docs/guide/hedging.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Hedged requests at the measured p95, Netflix's four criticality buckets, and relative per-tenant fairness that needs no quota to configure."
---

# Hedging, criticality and fairness

<!--@include: ../../README.md#hedging-->
Expand Down
4 changes: 4 additions & 0 deletions docs/guide/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Why resilix exists: JavaScript's load limiting is locked inside gRPC and the AWS SDK, and a failure-rate circuit breaker is blind to an upstream that degrades without erroring."
---

# What resilix is

<!--@include: ../../README.md#why-->
Expand Down
4 changes: 4 additions & 0 deletions docs/guide/limiter.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Adaptive concurrency limiting for JavaScript: Vegas queue estimation over an O(1) P² quantile estimator, shedding load proportionally rather than at a cliff."
---

# Adaptive concurrency limiting

<!--@include: ../../README.md#limiter-->
Expand Down
4 changes: 4 additions & 0 deletions docs/guide/manual-control.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Drive resilix policies by hand with gate(). Every policy is a synchronous state machine, so it works from a stream consumer or a queue worker."
---

# Driving policies by hand

<!--@include: ../../README.md#manual-->
Expand Down
4 changes: 4 additions & 0 deletions docs/guide/opossum.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Migrate from opossum in one line. The compatibility shim passes 362 of 362 of opossum's own test suite, run unmodified."
---

# Migrating from opossum

<!--@include: ../../README.md#opossum-->
4 changes: 4 additions & 0 deletions docs/guide/reading-the-code.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "A map from every source file to the paper or chapter behind it, and a dependency-ordered path through the codebase."
---

# Reading the code

Every non-obvious number and control loop in resilix came from somewhere. This page is the index
Expand Down
4 changes: 4 additions & 0 deletions docs/guide/retry.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Retry with full jitter, shared budgets that hold amplification near 1.1x instead of 3x, Google SRE client-side throttling, and a token-bucket rate limiter."
---

# Retry, budgets and throttling

<!--@include: ../../README.md#retry-->
Expand Down
4 changes: 4 additions & 0 deletions docs/guide/roadmap.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "What has shipped in each resilix version, what is coming next, and what is deliberately not planned."
---

# Roadmap

resilix is **pre-release**. The public API is settling but not frozen; anything user-visible
Expand Down
4 changes: 4 additions & 0 deletions docs/guide/telemetry.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Built-in OpenTelemetry instrumentation: counters, histograms and pull-based gauges, with an observer that can neither influence nor break an admission decision."
---

# Telemetry

<!--@include: ../../README.md#otel-->
4 changes: 4 additions & 0 deletions docs/guide/undici.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Compose resilix onto undici's Dispatcher and every call site in the process is guarded at once, including ones you do not own."
---

# Guarding undici

`resilix/fetch` covers the WHATWG API, but Node services overwhelmingly reach the network through
Expand Down
4 changes: 4 additions & 0 deletions docs/guide/verdicts.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "One settled call, read differently by each policy. Why a 404 is healthy, a 429 is backpressure, and our own rejections are never evidence about the upstream."
---

# The verdict model

<!--@include: ../../README.md#verdicts-->
Expand Down
4 changes: 4 additions & 0 deletions docs/specs/adaptive-limiter.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "The v0.3 spec: Vegas queue estimation, P² streaming quantiles, the baseline problem, and every default with its source."
---

# Spec: adaptive concurrency limiter (v0.3)

**Status:** implemented in v0.3.
Expand Down
4 changes: 4 additions & 0 deletions docs/specs/hedging-and-priority.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "The v0.5 spec: hedged requests, Netflix criticality buckets, and relative tenant fairness."
---

# Spec: hedging, criticality and tenant fairness (v0.5)

**Status:** implemented in v0.5. Two of the four open questions are now resolved; see §7.
Expand Down
4 changes: 4 additions & 0 deletions docs/specs/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Design specs written before the code they describe, each carrying the provenance of every default it proposes."
---

# Specs

A spec is the *how* — the algorithm, the field list, the edge cases, the provenance of every
Expand Down
4 changes: 4 additions & 0 deletions docs/specs/retry-and-throttling.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "The v0.4 spec: jitter strategies, retry budget arithmetic, and Google SRE's client-side throttling formula."
---

# Spec: retry, budgets, throttling and rate limiting (v0.4)

**Status:** implemented in v0.4.
Expand Down
Loading