feat(quinn.www/edge): cache /api/i18n + raise pseo retention to 24h (island mode G5/G6)
- /api/i18n now edge-cached (pseo_cache 6h, serve-stale) so runtime translation fetches survive a black/WG outage instead of hard-failing. - pseo_cache inactive 1h -> 24h so cold /www pages survive a multi-hour outage via proxy_cache_use_stale rather than evicting within the hour. See docs/EDGE_ISLAND_MODE.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
d34df62b4a
commit
74017f18d8
2 changed files with 16 additions and 2 deletions
|
|
@ -22,8 +22,11 @@ map $http_upgrade $connection_upgrade {
|
|||
# ---------------------------------------------------------------------------
|
||||
|
||||
# pSEO cache — /www/* and /sitemap.xml
|
||||
# Keys zone: 10m (~80k entries). Max disk: 500m. Inactive eviction after 1h.
|
||||
proxy_cache_path /var/cache/nginx/pseo levels=1:2 keys_zone=pseo_cache:10m max_size=500m inactive=1h use_temp_path=off;
|
||||
# Keys zone: 10m (~80k entries). Max disk: 500m. Inactive eviction after 24h.
|
||||
# 24h (was 1h) so cold /www pages survive a multi-hour black/WG outage via
|
||||
# proxy_cache_use_stale instead of evicting within the hour (island mode — G5,
|
||||
# see docs/EDGE_ISLAND_MODE.md). max_size still caps total disk.
|
||||
proxy_cache_path /var/cache/nginx/pseo levels=1:2 keys_zone=pseo_cache:10m max_size=500m inactive=24h use_temp_path=off;
|
||||
|
||||
# Provider data cache — /provider-api/* (30m TTL, 200m disk)
|
||||
proxy_cache_path /var/cache/nginx/data levels=1:2 keys_zone=data_cache:20m max_size=200m inactive=1d use_temp_path=off;
|
||||
|
|
|
|||
|
|
@ -385,6 +385,17 @@ server {
|
|||
proxy_connect_timeout 10s;
|
||||
proxy_send_timeout 180s;
|
||||
proxy_read_timeout 180s;
|
||||
|
||||
# Edge-cache translation reads (GET/HEAD only; POST backfill passes through
|
||||
# uncached). The SPA fetches i18n at runtime, so without this a black/WG
|
||||
# outage hard-fails translations — serve-stale keeps them up (G6).
|
||||
proxy_cache pseo_cache;
|
||||
proxy_cache_valid 200 6h;
|
||||
proxy_cache_valid 404 1m;
|
||||
proxy_cache_use_stale error timeout updating;
|
||||
proxy_cache_lock on;
|
||||
proxy_cache_background_update on;
|
||||
add_header X-Cache-Status $upstream_cache_status always;
|
||||
}
|
||||
|
||||
# Public quinn.api surface — /www/* (destinations, regions, hobby-terms, blog, tour, sitemap)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue