a love letter to tangled (android, iOS, and a search API)
1# Metrics To Watch
2
3Use this after rolling out the Coolify + PostgreSQL deployment.
4
5## Goals
6
7Confirm that:
8
9- `api` stays stable under browse-heavy traffic
10- `indexer` keeps search current through Tap
11- PostgreSQL handles ingest, queue churn, and activity writes without backlog
12
13## Coolify Application
14
15Watch both services for 24 to 48 hours after deploy.
16
17### API
18
19Expected direction:
20
21- lower latency spikes
22- stable memory
23- flat restart count
24
25Useful checks:
26
27- request latency
28- CPU and memory
29- `/readyz` failures
30- restart count
31
32### Indexer
33
34Expected direction:
35
36- steady-state load during Tap ingest
37- bounded spikes during `backfill`, `enrich`, and `reindex`
38- `/health` stays green outside deploy windows
39
40Useful checks:
41
42- CPU and memory
43- restart count
44- Tap reconnect frequency
45- queue drain time after backfill
46
47## PostgreSQL
48
49Expected direction:
50
51- predictable connection count
52- stable write latency during ingest
53- no long-lived lock buildup in `indexing_jobs`
54- bounded table growth in `jetstream_events` and `indexing_audit`
55
56Useful checks:
57
58- connections
59- disk growth
60- slow queries
61- write latency
62- backup duration and restore confidence
63
64## Admin Signals
65
66If admin routes are enabled, compare:
67
68- `read_through.pending`
69- `read_through.processing`
70- `read_through.failed`
71- `read_through.dead_letter`
72- `tap.cursor`
73- `jetstream.cursor`
74
75Healthy behavior:
76
77- pending stays near zero most of the time
78- processing drains after bursts
79- failed and dead-letter stay small and explainable
80
81## Success Signals
82
83- `/readyz` and `/health` remain consistently green
84- search freshness tracks Tap ingest
85- backfill and enrich jobs complete without manual cleanup
86- PostgreSQL latency stays stable during bootstrap and normal use
87
88## Failure Signals
89
90- queue counts rise and do not drain
91- `/readyz` flips during normal browse traffic
92- search misses rise after cutover
93- PostgreSQL write latency climbs during normal ingest
94- restores or backups are failing or taking too long