Commit Graph

15 Commits

Author SHA1 Message Date
Luke Berndt
5b177eca58 Raise nginx connection limits and microcache /calls polling
A traffic surge exhausted nginx's 3 x 4096 worker_connections (each
proxied websocket uses two), so Cloudflare got empty responses (520)
and the backend's listen queue filled.

- worker_processes auto (8 cores), worker_connections 16384,
  worker_rlimit_nofile 65535.
- Cache public /calls endpoints on api.*: 5s for live lists, 60s for
  historical ones, with cache lock and stale-while-updating so bursts
  collapse to one backend query. Origin is in the cache key because
  the backend's CORS header varies by Origin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 22:42:11 -05:00
Luke Berndt
6825aaf9a4 Reduce backend per-upload CPU to relieve upload timeouts
The Node main thread was saturated at about 39 uploads/s, overflowing the
listen queue so uploads timed out connecting from nginx.

- Enable keepAlive on the S3 agent; every upload did a full TLS handshake
- Remove OpenTelemetry tracing
- Cache the system key lookup for 60s
- Use lean queries when listing calls
- Serialize each call once in notify_clients, not per recipient
- Add an nginx upstream keepalive pool, and hold Node's keepAliveTimeout
  above it so nginx never reuses a connection Node has closed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 18:06:48 -05:00
Luke Berndt
591e245fa6 add marcsip 2024-09-25 19:11:54 -04:00
Luke Berndt
5817bea3b7 smaller buttons 2024-09-21 11:05:51 -04:00
Luke Berndt
475c67eed7 handle play in background 2024-09-21 10:19:01 -04:00
Luke Berndt
a9020da84d all in on certbot 2024-02-03 11:15:34 -05:00
Luke Berndt
6cf5161a40 certbot fix 2024-02-03 08:54:52 -05:00
Luke Berndt
8130ff42bc update nginx routing 2023-11-15 10:58:44 -05:00
Luke Berndt
8fbe4665ed auto let's encrypt 2023-11-14 21:24:21 -05:00
Luke Berndt
b5a610eb4d goodby pngs 2023-02-15 13:25:29 -05:00
Luke Berndt
b76bf1df9d focused logging 2023-02-15 12:45:53 -05:00
Luke Berndt
c87c57c3ab limited logs 2023-02-15 09:33:57 -05:00
Luke Berndt
fe9ed36ba0 Blocking BergenNJ
Syslog for NGINX
2023-02-05 21:49:08 -05:00
Luke Berndt
22a9f36093 fixed some live stuff 2023-02-03 11:08:29 -05:00
Luke Berndt
3b0d3f290f First Commit 2020-06-09 22:11:11 -04:00