---
title: "Architecture & Explanation"
description: "Architectural deep dives into Shaf's global edge network, Anycast routing, distributed KV-to-D1 replication, and zero-PII telemetry."
---

> Documentation Index
> Fetch the complete documentation index at: https://shaf.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Architecture & Explanation

# Architecture & Explanation

Architecture articles clarify system design, distributed data consistency models, and security boundaries across the Shaf platform.

---

## Architectural Deep Dives

- **Global Edge Network & Sub-10ms Latency** — Explore how Shaf leverages Cloudflare's Anycast edge network across 300+ PoPs, pairing distributed D1 relational storage with write-through KV caching.
- **Reverse Proxy & Subpath Architecture** — Understand the mechanics of running short links under subdirectories (`/go`), solving the TLS SNI dilemma, and preserving host isolation at the edge.
- **Custom Domain Lifecycle & DCV** — Deep dive into multi-tenant custom hostnames, automated Cloudflare for SaaS Domain Control Validation, TLS certificate issuance, and fallback routing.
- **Privacy-First Telemetry & Analytics** — Learn how Shaf aggregates high-throughput click analytics via Cloudflare Analytics Engine using daily rotating IP salts without third-party cookies or PII storage.
- **Security, WAF & Bot Defense** — Review Shaf's defense-in-depth security model: Cloudflare Turnstile token validation, WAF inspection, automated Google Safe Browsing scanning, and link password hashing.

Source: https://shaf.app/docs/explanation/index.mdx
