feat: production-grade routing cache + stale detection fixes
Three-tier routing cache (ESL global -> file -> HTTP) eliminates HTTP
from call path for 2500-5000 concurrent calls. Lua reads cached route
in ~0.1us instead of blocking on api:execute('curl', ...).
Engine fixes:
- recalcBestLocked now skips stale nodes (was 5 min bug -> now ~10-15s)
- PickNodeForCall action_type='node' checks staleness for consistency
- onMetric callback pushes cache on every metric (no ticker delay)
Config:
- stale_threshold_sec default 20 -> 10 (industry standard)
- contrib/ included in Makefile deploy target
- route.lua paths updated for /opt/pulse-lets-go
This commit is contained in:
@@ -53,14 +53,16 @@ build-prod:
|
||||
# Деплой в PREFIX: бинарник + статика + data + log
|
||||
deploy: build-prod
|
||||
@echo "→ Деплой в $(PREFIX)"
|
||||
install -d $(PREFIX)/bin $(PREFIX)/data $(PREFIX)/web $(PREFIX)/log
|
||||
install -d $(PREFIX)/bin $(PREFIX)/data $(PREFIX)/web $(PREFIX)/log $(PREFIX)/contrib
|
||||
install -m 755 $(BINDIR)/$(APP) $(PREFIX)/bin/
|
||||
cp -r $(WEB_DIR)/build/. $(PREFIX)/web/
|
||||
cp contrib/*.lua contrib/*.json $(PREFIX)/contrib/ 2>/dev/null || true
|
||||
@echo "✓ Готово: $(PREFIX)"
|
||||
@echo " $(PREFIX)/bin/$(APP)"
|
||||
@echo " $(PREFIX)/web/ (SvelteKit статика)"
|
||||
@echo " $(PREFIX)/data/ (config.json, trunks.json, users.json)"
|
||||
@echo " $(PREFIX)/log/ (ASCII-лог метрик)"
|
||||
@echo " $(PREFIX)/contrib/ (route.lua, конфиги агентов)"
|
||||
|
||||
# Установка systemd unit
|
||||
install-systemd:
|
||||
|
||||
Reference in New Issue
Block a user