CryoHealth-geo Service Architecture

CryoHealth-geo Service Architecture An architecture diagram generated by Archify. backfill CLI · operator-run date range · CryoHealth-geo container · uvicorn · one-shot backfill CLI operator-run date range one-shot FastAPI service · APScheduler 24h · /run · /run-hazard · CryoHealth-geo container · uvicorn · :8000 FastAPI service APScheduler 24h · /run · /run-hazard :8000 Observation batch · batch.py · NDWI + cloud mask · CryoHealth-geo container · uvicorn · per lake Observation batch batch.py · NDWI + cloud mask per lake Hazard pass · hazard_batch.py · hazard.py · CryoHealth-geo container · uvicorn · per lake Hazard pass hazard_batch.py · hazard.py per lake SceneSource · CdseSource · PlanetaryComputer · CryoHealth-geo container · uvicorn · aligned bands SceneSource CdseSource · PlanetaryComputer aligned bands db.py · psycopg · no migrations · CryoHealth-geo container · uvicorn · idempotent db.py psycopg · no migrations idempotent Terrain + exposure · dem.py · exposure.py · CryoHealth-geo container · uvicorn · cached Terrain + exposure dem.py · exposure.py cached Sentinel-2 L2A · CDSE Process API · PC fallback · Architecture component Sentinel-2 L2A CDSE Process API · PC fallback PostgreSQL + PostGIS · lakes · observations · Architecture component · PostgreSQL PostgreSQL + PostGIS lakes · observations Copernicus GLO-30 DEM · Planetary Computer STAC · Architecture component Copernicus GLO-30 DEM Planetary Computer STAC WorldPop PAK 2025 · 100 m constrained raster · Architecture component WorldPop PAK 2025 100 m constrained raster CryoHealth-api · tier + alert policy · Architecture component · :3000 CryoHealth-api tier + alert policy :3000 run_backfill 1 · run_latest 2 · run_hazard_pass B03 · B08 · SCL STAC + OAuth2 upsert observation read 548-day series ON CONFLICT DO NOTHING slope + population mean slope 5 km buffer POST /alerts/hazard-scores CryoHealth-geo container · uvicorn

Two write paths

  • • Observations: direct psycopg insert, deduped per lake/day/source
  • • Hazard scores: POST to CryoHealth-api with x-api-key, so tier and alert policy stay there

Failure isolation

  • • One lake's error is recorded and the batch moves on
  • • Hazard pass closes its DB connection before slow DEM, WorldPop and API calls

Swappable scene source

  • • CdseSource when CDSE_CLIENT_ID is set, else Planetary Computer
  • • read_bands always returns pixel-aligned 10 m bands