declarative relay deployment on hetzner relay.waow.tech
atproto

chore: uncommitted deploy config, infra, and backfill-status script

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+46 -53
+2 -2
deploy/relay-values.yaml
··· 14 14 RELAY_REPLAY_WINDOW: "2h" 15 15 RELAY_IDENT_CACHE_SIZE: "500000" 16 16 LOG_LEVEL: "info" 17 - GOMEMLIMIT: "3GiB" 17 + GOMEMLIMIT: "6GiB" 18 18 envFrom: 19 19 - secretRef: 20 20 name: relay-secret ··· 36 36 memory: 1Gi 37 37 cpu: 500m 38 38 limits: 39 - memory: 5Gi 39 + memory: 8Gi 40 40 41 41 defaultPodOptions: 42 42 # hostNetwork recommended for full-network relays (high packet volume).
+1 -43
deploy/zlay-ingress.yaml
··· 17 17 - host: ZLAY_DOMAIN_PLACEHOLDER 18 18 http: 19 19 paths: 20 - - path: /xrpc/com.atproto.sync.subscribeRepos 21 - pathType: Exact 22 - backend: 23 - service: 24 - name: zlay 25 - port: 26 - number: 3000 27 20 - path: / 28 21 pathType: Prefix 29 22 backend: 30 23 service: 31 24 name: zlay 32 25 port: 33 - number: 3001 34 - - path: /_health 35 - pathType: Exact 36 - backend: 37 - service: 38 - name: zlay 39 - port: 40 - number: 3001 41 - - path: /_stats 42 - pathType: Exact 43 - backend: 44 - service: 45 - name: zlay 46 - port: 47 - number: 3001 48 - - path: /metrics 49 - pathType: Exact 50 - backend: 51 - service: 52 - name: zlay 53 - port: 54 - number: 3001 55 - - path: /admin 56 - pathType: Prefix 57 - backend: 58 - service: 59 - name: zlay 60 - port: 61 - number: 3001 62 - - path: /xrpc/com.atproto.sync.requestCrawl 63 - pathType: Exact 64 - backend: 65 - service: 66 - name: zlay 67 - port: 68 - number: 3001 26 + number: 3000
+1 -1
deploy/zlay-reconnect-cronjob.yaml
··· 28 28 import json, urllib.request, time, sys 29 29 30 30 PDS_LIST_URL = "https://raw.githubusercontent.com/mary-ext/atproto-scraping/refs/heads/trunk/state.json" 31 - ZLAY_URL = "http://zlay.zlay.svc.cluster.local:3001" 31 + ZLAY_URL = "http://zlay.zlay.svc.cluster.local:3000" 32 32 33 33 print(f"fetching PDS list from {PDS_LIST_URL}...") 34 34 with urllib.request.urlopen(PDS_LIST_URL, timeout=30) as resp:
+1 -1
deploy/zlay-servicemonitor.yaml
··· 11 11 matchNames: 12 12 - zlay 13 13 endpoints: 14 - - port: http 14 + - port: metrics 15 15 path: /metrics 16 16 interval: 30s
+3 -3
docs/architecture.md
··· 110 110 111 111 | metric | value | 112 112 |--------|-------| 113 - | connected PDS hosts | ~2,738 | 114 - | collection index DIDs | ~13.6M+ (backfill in progress from bsky.network) | 113 + | connected PDS hosts | ~2,780 | 114 + | collection index DIDs | ~30.4M (backfill 1,017/1,287 collections) | 115 115 | memory (steady state) | ~2.9 GiB | 116 - | memory limit | 8 GiB | 116 + | memory limit | 5 GiB | 117 117 | PVC | 20 GiB | 118 118 | `listReposByCollection` max limit | 1000 |
+2 -2
infra/variables.tf
··· 11 11 } 12 12 13 13 variable "server_type" { 14 - description = "Hetzner server type (cpx41 = 16 vCPU, 32 GB RAM, 240 GB disk)" 14 + description = "Hetzner server type (cpx51 = 16 vCPU, 32 GB RAM, 360 GB disk)" 15 15 type = string 16 - default = "cpx41" 16 + default = "cpx51" 17 17 } 18 18 19 19 variable "location" {
+1 -1
justfile
··· 470 470 kubectl get pods -n zlay 471 471 echo "" 472 472 echo "==> health" 473 - kubectl exec -n zlay deploy/zlay -- wget -qO- http://localhost:3001/_health 2>/dev/null || echo "(zlay not ready)" 473 + curl -sf "https://$ZLAY_DOMAIN/_health" | jq . || echo "(zlay not ready)" 474 474 475 475 # tail zlay logs 476 476 zlay-logs:
+35
scripts/backfill-status
··· 1 + #!/usr/bin/env bash 2 + set -euo pipefail 3 + cd "$(dirname "$0")/.." 4 + source .env 5 + 6 + : "${ZLAY_ADMIN_PASSWORD:?set ZLAY_ADMIN_PASSWORD}" 7 + : "${ZLAY_DOMAIN:=zlay.waow.tech}" 8 + 9 + ACTION="${1:-status}" 10 + 11 + case "$ACTION" in 12 + start) 13 + SOURCE="${2:-bsky.network}" 14 + curl -sf -X POST \ 15 + -H "Authorization: Bearer $ZLAY_ADMIN_PASSWORD" \ 16 + "https://$ZLAY_DOMAIN/admin/backfill-collections?source=$SOURCE" | jq . 17 + ;; 18 + status) 19 + curl -sf --max-time 30 \ 20 + -H "Authorization: Bearer $ZLAY_ADMIN_PASSWORD" \ 21 + "https://$ZLAY_DOMAIN/admin/backfill-collections" | jq '{ 22 + running, total, completed, in_progress, total_imported, 23 + recent: [.collections[] | select(.completed == false)] | .[0:5] 24 + }' 25 + ;; 26 + full) 27 + curl -sf --max-time 30 \ 28 + -H "Authorization: Bearer $ZLAY_ADMIN_PASSWORD" \ 29 + "https://$ZLAY_DOMAIN/admin/backfill-collections" | jq . 30 + ;; 31 + *) 32 + echo "usage: $0 [status|start [source]|full]" 33 + exit 1 34 + ;; 35 + esac