Gathering: Automated Earth Observation Data Ingestion & Orchestration Architecture¶
Comprehensive Briefing & Presentation Deck for Satellite Data Processing Orchestration Target Audience: System Architects, Data Engineers, Satellite Processing Teams, DevOps / Platform Engineers.
Executive Summary¶
Satellite data processing pipelines (such as Sentinel, MTG FCI, PACE, MODIS, EarthCARE, and ground validation networks) are traditionally plagued by a common architectural anti-pattern: coupling data acquisition, authentication, and download retries directly inside heavy scientific processing jobs.
gathering is a specialized, cloud-native Python package, CLI, and containerized orchestration microservice designed to decouple and master data ingestion:
- 10 Integrated Providers: Unifies spaceborne (Copernicus CDSE, EUMETSAT EUMDAC, Himawari AHI, ESA EarthCARE, NASA PACE, NASA MODIS) and ground networks (AERONET, ACTRIS Ares, ACTRIS Cloudnet, Pandonia PGN).
- Orchestration-First (Argo Workflows / Kubernetes): Ingestion runs as an ultra-lightweight worker (500m CPU / 1Gi RAM), downloading and verifying files onto shared volumes (CephFS / /archive) before heavy scientific pods (8 CPU / 512Gi RAM) ever boot.
- Deterministic Asset-Level Integrity (v2026.9.5): Replaces dangerous directory-level cache checks with authoritative provider inventory validation, binary magic header inspection (\x89HDF), HTTP error payload rejection, and automated corrupt file pruning.
- Dynamic Credential Pooling: Eliminates provider API rate-limiting and concurrent connection drops by dynamically pooling and rotating credentials from Kubernetes Secrets.
- Declarative & S3-Native: Accepts jobs via s3:// URLs, local PVC paths, or built-in templates, outputting a deterministic downloaded-files.txt manifest directly to object storage alongside the input configuration.
1. The Core Problem: Monolithic Processing vs. Decoupled Ingestion¶
The Legacy Anti-Pattern¶
flowchart LR
subgraph MonolithicPod ["Monolithic Heavy Pod (8 CPU / 512Gi RAM)"]
direction TB
A1["Download & Auth (NASA/ESA/EUMETSAT)"] --> A2["Extract & Decompress"]
A2 --> A3["Scientific Processing / Inversion"]
end
A1 -.->|"Network drops / 429 Quota / Corrupted chunk"| Fail["Pod Crashes & Retries from 0"]
Fail -.->|"Wasted Compute & Hours"| MonolithicPod
In monolithic pipelines:
1. Compute Waste: Multi-gigabyte scientific containers allocate expensive GPUs or large RAM pools (e.g. 512 GiB for MTG FCI chunk reconstruction) while sitting idle for hours waiting on external network I/O from NASA or ESA servers.
2. Cascading Failures: When external provider APIs throttle connections or return transient HTTP 504 errors, the entire multi-hour pipeline crashes, forcing a full retry from scratch.
3. Silent Cache Corruption: Incomplete downloads, zero-byte files, or HTML error pages disguised with HTTP 200 headers remain on disk. Naive os.path.exists() or directory checks assume the file is valid, causing downstream NetCDF/HDF parsers to abort unrecoverably.
4. Credential Lockouts: Multiple parallel workflows reuse identical hardcoded service accounts, quickly triggering IP bans and daily concurrency limits from providers like EUMETSAT or Copernicus CDSE.
2. The Solution: Gathering Architecture¶
gathering acts as a deterministic Data Gatekeeper and Ingestion Engine:
flowchart TD
subgraph Orchestrator ["Kubernetes & Argo Workflows"]
Config["Declarative Config (s3://.../job.yaml)"] --> Template["WorkflowTemplate: gathering-downloader"]
Template --> IngestionPod["Ingestion Worker (gathering:v2026.9.5)<br/>[Requests: 500m CPU / 1Gi RAM]"]
end
subgraph ExternalProviders ["Remote Providers (10 Sources)"]
IngestionPod <-->|"OData / STAC / CMR / REST"| Sources["CDSE · EUMETSAT · Himawari AHI · EarthCARE<br/>MODIS · PACE · AERONET · ACTRIS · Pandonia"]
end
subgraph Security ["Secret Management"]
K8sSecret["Kubernetes Secret: gathering-credentials<br/>(Rotated Credential Pools)"] -.-> IngestionPod
end
subgraph Storage ["Shared Cluster Storage"]
IngestionPod -->|"Integrity Verified & Cached"| Archive["Archive PVC (/archive) / CephFS"]
IngestionPod -->|"S3 Put Object"| S3Manifest["s3://.../downloaded-files.txt"]
end
subgraph Downstream ["Scientific Processing DAG"]
S3Manifest --> Proc1["FCI DataPrep / IDPIX Pod<br/>(8 CPU / 512Gi RAM)"]
S3Manifest --> Proc2["GRASP Satellite / Inversion Pod"]
Archive -.->|"Direct Read Verified NetCDF/HDF"| Proc1
Archive -.->|"Direct Read Verified NetCDF/HDF"| Proc2
end
3. Key Benefits in Satellite Orchestration¶
A. Resource Optimization & Cost Reduction¶
- Separation of Concerns: By splitting data gathering from processing, ingestion runs in an ultra-lightweight container (
ghcr.io/astral-sh/uvbased runtime, < 250MB image). - Cluster Efficiency: 8-core, 512GB worker nodes are never blocked on network bandwidth or rate-limiting delays.
- Resource Profiling:
gathering-downloader:cpu: 500m-2000m,memory: 1Gi-4Gi.scientific-processing:cpu: 2-8,memory: 16Gi-512Gi(only scheduled aftergatheringsucceeds).
B. Asset-Level Integrity & Zero-Flake Caching (v2026.9.5)¶
In satellite observation, a single missing band or truncated granule ruins an entire atmospheric retrieval.
- Authoritative Provider Query: Rather than assuming local folders represent the state of the universe, gathering always queries the provider for the authoritative granule list matching the spatial and temporal criteria.
- Strict Verification Ladder:
1. File existence and minimum size check (> 0 bytes).
2. Exact byte-size comparison against remote content-length or provider metadata.
3. Header magic-byte inspection:
- NetCDF-4 / HDF5: \x89HDF\r\n\x1a\n
- NetCDF-3: CDF\x01, CDF\x02, CDF\x05
- Compressed archives: Gzip (\x1f\x8b), Bzip2 (BZh), Zip (PK\x03\x04 with CRC testzip())
4. Web Server HTML Error Detection: Detects and rejects HTML error pages (401 Unauthorized, 404 Not Found, 502/503 Gateways) saved with .nc or .hdf extensions.
5. Cryptographic Hashes: MD5 and SHA-256 validation when provided by the catalog (e.g. Cloudnet API, CDSE OData).
- Automatic Self-Healing Cache: If a corrupt or truncated file is encountered on disk, gathering unlinks the corrupt asset immediately and re-downloads it cleanly.
C. Multi-Credential Pooling & Rate-Limit Resilience¶
- Dynamic Secret Rotation: Through
GATHERING_CREDENTIAL_POOL_<SERVICE>, multiple sets of credentials (e.g. 5 EUMETSAT consumer key/secret pairs, multiple CDSE accounts) are stored in Kubernetes Secrets. - Atomic Identity Selection: Each worker pod selects a distinct, validated credential record at runtime, multiplying the pipeline's aggregate throughput across concurrent workflows without exceeding provider rate limits.
- Non-Leaking Architecture: Authentication parameters are separated from task specifications, guaranteeing credentials are never serialized into output YAMLs, logs, or downstream S3 artifacts.
D. Cloud-Native & Argo Workflow Integration¶
- S3-In, S3-Out Orchestration:
- Argo inputs:
config-path: s3://my-bucket/jobs/2026-09-15/config.yaml - Execution:
gatheringresolves S3 options, runs the tasks, verifies local cache, and writes the resulting list of absolute file paths tos3://my-bucket/jobs/2026-09-15/downloaded-files.txt. - Argo outputs: Emits
downloaded-files-path: s3://.../downloaded-files.txtas a workflow parameter for seamless DAG chaining into subsequent steps. - Resilient Fallback: Local configuration files or built-in examples automatically route manifests to the local volume without raising path errors.
4. Supported Sources Matrix¶
| Source / Mission | Provider | Observation Type | Query Protocol | Cache Target Hierarchy | Concurrency |
|---|---|---|---|---|---|
| Copernicus CDSE | ESA / Copernicus | Sentinel-1, 2 (MSI L1C/L2A), 3 (OLCI/SLSTR), 5P | OData REST API & S3 Direct | <cache>/cdse/<platform>/YYYY/MM/DD/<granule>/ |
Parallel (max_workers) |
| EUMETSAT EUMDAC | EUMETSAT | MTG FCI (swaths/full-disk), MSG SEVIRI, Metop IASI | EUMETSAT Data Store REST API | <cache>/eumdac/<instrument>/YYYY/MM/DD/<granule>/ |
Parallel (max_workers) |
| ESA EarthCARE | ESA / MAAP | ATLID Lidar, CPR Radar, MSI Imager, BBR | ESA MAAP STAC API (SpatioTemporal Asset Catalog) | <cache>/earthcare/<product_type>/YYYY/MM/DD/ |
Parallel (max_workers) |
| NASA PACE | NASA GSFC | OCI (hyperspectral), SPEXone, HARP2 (polarimeters) | NASA CMR Granule Search API | <cache>/pace/<instrument>/<level>/YYYY/MM/DD/ |
Parallel (max_workers) |
| NASA MODIS | NASA LAADS / LP DAAC | Terra & Aqua AOD (MOD04_L2/MYD04_L2), MAIAC (MCD19A2), Albedo (MCD43) |
NASA CMR Granule Search API | <cache>/modis/<satellite>/<product>/YYYY/MM/DD/ |
Parallel (max_workers) |
| Himawari AHI | JAXA / EORC | Full-disk Level-1 gridded radiance (R21), Level-2 daytime cloud properties (L2CLP) |
JAXA P-Tree FTP Archive | <cache>/AHI/<NC\|CLP>/YYYY/MM/DD/ |
Parallel (max_workers) |
| NASA AERONET | NASA GSFC | Sun photometer Aerosol Optical Depth (AOD) & Inversions | GSFC REST API | <cache>/aeronet/<data_type>/<station>_... |
Task Sequential |
| ACTRIS Ares | ACTRIS / EARLINET | Aerosol Lidar profiles & in-situ optical properties | EARLINET REST API | <cache>/actris_ares/<station>/YYYY/MM/ |
Task Sequential |
| ACTRIS Cloudnet | ACTRIS / FMI | Cloud Radar, Doppler Lidar, Microwave Radiometer | Cloudnet REST API & Checksums | <cache>/actris_cloudnet/<station>/YYYY/MM/ |
Task Sequential |
| Pandonia (PGN) | NASA / ESA / LuftBlick | Atmospheric trace gases (NO₂, O₃, HCHO, SO₂) | PGN HTTP API & BZ2 Decompression | <cache>/pandonia/<station>/YYYY/MM/ |
Task Sequential |
5. Architectural Comparison: Before & After¶
| Capability | Legacy Custom Download Scripts | Gathering Orchestration Architecture |
|---|---|---|
| API Coverage | Fragmented scripts scattered across repos (bash, python, curl) | 10 unified sources in a single audited, versioned package |
| Cache Validation | Naive directory existence (if [ -d folder ]) |
Authoritative per-file inventory verification (magic headers, size, CRC) |
| Corrupt Downloads | Fails downstream in processing; requires manual cleanup | Auto-detected, pruned from disk, and re-downloaded seamlessly |
| Orchestration | Complex bash wrappers inside processing pods | Standard WorkflowTemplate in Argo with structured S3 I/O |
| Resource Efficiency | Heavy pods (512Gi RAM) blocked waiting on HTTP downloads | Ingestion isolated to 1Gi RAM pods; processing starts only on success |
| Credential Safety | Hardcoded env vars and plaintext tokens in job manifests | Kubernetes Secret pools, zero credential leakage in serialized configs |
| Observability | Inconsistent stdout logs, silent network failures | Structured Loguru logs, stdlib interception, and tqdm progress |
| Local vs Cloud | Cloud-only or impossible to test on developer laptops | 100% identical execution via CLI, Python API, or Argo Workflow |
6. Slide-by-Slide Presentation Structure (12-Slide Pitch)¶
Slide 1: Title & Vision¶
- Title: Gathering: Decoupling and Mastering Satellite Data Ingestion in the DIVA Platform
- Subtitle: Deterministic, Cloud-Native Earth Observation Data Orchestration
- Key Message: Moving from fragile, monolithic in-pod downloads to a resilient, cached, and audited ingestion tier.
Slide 2: The Satellite Data Challenge¶
- Pain Points: 10 different providers, multi-gigabyte files, rate-limits, flaky connections, different API styles (OData, STAC, CMR, REST).
- The Cost: When ingestion fails 3 hours into a job, expensive 512GB processing nodes are wasted.
Slide 3: Core Philosophy¶
- Separation of Concerns: Data Ingestion $\ne$ Scientific Inversion.
- Downstream Simplicity: Scientific algorithms (
grasp-satellite,grasp-process,fci-datapreparation) should only receive verified local paths (list[Path]). They should never know what an API token or HTTP request is.
Slide 4: Unified Multi-Source Spectrum¶
- Visual breakdown of the 10 sources:
- Global Ground Truth: AERONET, ACTRIS Ares, ACTRIS Cloudnet, Pandonia.
- Geostationary & Polar Satellite Fleets: CDSE (S-2/3/5P), EUMETSAT (MTG FCI/MSG), Himawari AHI (JAXA P-Tree), EarthCARE, MODIS, PACE.
Slide 5: Asset-Level Integrity & Self-Healing Cache (v2026.9.5)¶
- Why "Directory Exists" is a lie in data pipelines.
- Binary magic byte validation (
\x89HDF,CDF,PK,BZh). - Erroneous HTML detection (catches HTTP 200 containing error portals).
- Automatic corrupt asset pruning and re-download.
Slide 6: Multi-Credential Pools & High Availability¶
- How
GATHERING_CREDENTIAL_POOLprevents API rate limits and throttling. - Kubernetes Secret integration (
gathering-credentials). - Atomic selection: each pod gets a clean identity; zero crosstalk.
Slide 7: Argo Workflows & Cloud-Native Topology¶
- Diagram of
WorkflowTemplate/gathering-downloader. - S3 in, S3 out: configuration at
s3://.../job.yaml$\rightarrow$ manifest ats3://.../downloaded-files.txt. - Output parameter integration with downstream DAG steps.
Slide 8: Ceph Storage & Volume Topology¶
- Highlighting Ceph storage mounts on DIVA:
/archive(archive-cephfs): Long-term validated data lake./workspace/shared_data(shared-data-ceph): Intermediate shared data./workspace/shared_grasp: Code, configs, and shared toolings.
Slide 9: Developer Experience (Python, CLI, YAML)¶
- 3 ways to use
gathering: - Python API: Type-safe
Task.eumdac(...)andPipeline.run()with tqdm and HTML summary tables. - CLI:
gathering run config.yamlorgathering examples run example:pace/.... - Cloud: Declarative YAML in Argo Workflows.
- Zero-cost lazy imports (< 0.2s CLI startup).
Slide 10: Real-World Case Study: MTG FCI Ingestion¶
- MTG FCI full-disk 1km processing requires massive memory.
- Before: Download failure crashed the 512GB worker node; retry took 4+ hours.
- After:
gathering-downloaderpre-fetches and validates the 10-minute swath in 2 minutes using 500m CPU. Processing pod boots only with guaranteed data.
Slide 11: Production Verification & Metrics¶
- 403 automated hermetic offline unit/integration tests running in < 4 seconds.
- 100% test coverage for cache hits, corrupted file recovery, and S3 configuration routing.
- Validated in GitLab CI and published to internal PyPI and Docker registries (
v2026.9.5).
Slide 12: Next Steps & Roadmap¶
- Scaling additional satellite missions (e.g. Landsat-9, CHIME).
- Automated pre-fetching daemon based on satellite overpass schedules.
- Open collaboration across DIVA and GRASP processing teams.
7. Concrete Example: Argo Workflow Integration¶
Here is the exact production workflow definition connecting gathering-downloader with a downstream processing task:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: satellite-pipeline-
namespace: argo-workflow
spec:
entrypoint: main
arguments:
parameters:
- name: s3-config-path
value: "s3://datasets/AIRSENSE/JOB-FCI-2026-09-17/config/eumdac_mtg_fci.yaml"
templates:
- name: main
dag:
tasks:
# Step 1: Lightweight data ingestion (500m CPU / 1Gi RAM)
- name: ingest-satellite-data
templateRef:
name: gathering-downloader
template: execute-gathering
arguments:
parameters:
- name: config-path
value: "{{workflow.parameters.s3-config-path}}"
- name: image-tag
value: "v2026.9.5"
# Step 2: Heavy scientific processing (8 CPU / 512Gi RAM)
# Executes ONLY after gathering succeeds and passes the verified manifest
- name: scientific-processing
dependencies: [ingest-satellite-data]
template: process-data
arguments:
parameters:
- name: file-list-uri
value: "{{tasks.ingest-satellite-data.outputs.parameters.downloaded-files-path}}"
- name: process-data
inputs:
parameters:
- name: file-list-uri
container:
image: docker.grasp-cloud.com/grasp-satellite:latest
resources:
requests:
cpu: "2000m"
memory: "8Gi"
limits:
cpu: "8000m"
memory: "512Gi"
command: [python, -c]
args:
- |
import sys, os
from pathlib import Path
print("Consuming verified files from: {{inputs.parameters.file-list-uri}}")
# Read verified downloaded files list directly from S3 or local volume
# Proceed to scientific processing with zero network flakiness!
Summary Checklist for Presenters¶
- [x] Lead with the pain point: Processing pods crashing because of transient network errors or rate limits.
- [x] Emphasize decoupling: 500m CPU ingestion pod vs 512GB scientific processing pod.
- [x] Highlight integrity (v2026.9.5): Magic headers, anti-HTML error checking, and per-asset verification.
- [x] Explain credential pooling: How Kubernetes Secrets prevent API throttling across parallel workers.
- [x] Demonstrate end-to-end flow: S3 config in $\rightarrow$
downloaded-files.txtmanifest out $\rightarrow$ downstream processing.