Load testing the live deploy showed full-quality content-search caps at ~6
concurrent with 4 render slots; renders past the 60s stage timeout silently
drop pages (graceful degradation, not errors). Double the render slots and
size RAM/CPU to match.
- RENDER_CONCURRENCY default 4 -> 8 (the shared, stack-wide render cap)
- renderer deploy limits now env-driven: RENDERER_CPUS (default 4),
RENDERER_MEMORY (default 4G), was hardcoded 2 CPU / 2G
- .env.example documents the concurrency<->RAM scaling rule (~350-450 MB per
concurrent render + ~300 MB base) so raising slots doesn't OOM
Host must have the RAM/CPU; tune down on light VPSs (concurrency 4 -> 2G/2CPU).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Two bugs surfaced deploying behind Cloudflare+Caddy at a public domain:
1. MCP streamable-HTTP DNS-rebinding protection has empty allowed_hosts by
default, so a proxied public Host returns 421 'Invalid Host header'. Added
MCP_ALLOWED_HOSTS (comma-separated; '*' disables) wiring into the FastMCP
transport_security settings; localhost added automatically.
2. The /mcp -> /mcp/ mount redirect downgraded to http:// because uvicorn
ignored X-Forwarded-Proto. Run uvicorn with --proxy-headers
--forwarded-allow-ips='*' so redirects stay https behind the proxy.
Verified locally: valid Host+token initializes (200 SSE), redirect Location is
https, spoofed Host still 421, missing token still 401.
Set MCP_ALLOWED_HOSTS=websearch.neilbantoc.dev on the deployment and redeploy.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- renderer: Node/Playwright, single browser + pooled contexts with concurrency
cap and FIFO queue, Redis render cache (graceful no-op without Redis)
- extractor: FastAPI + Trafilatura, HTML -> {title, text, metadata}
- orchestrator: /scrape (render -> extract) with per-stage trace, aggregated
/health, structured JSON logging on all services
- docker-compose for orchestrator/renderer/extractor/redis with healthchecks
Verified locally: end-to-end scrape of example.com and Wikipedia; error paths
for unreachable hosts and bad schemes.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>