Skip to main content
NVIDIA
NVIDIA cuDF Router
Collection
NVIDIA
NVIDIA cuDF Router

Automation framework for analysis, tuning, routing, and migration of Apache Spark workloads from CPU to GPU.

NVIDIA cuDF Router

NVIDIA cuDF Router helps teams evaluate and migrate Apache Spark workloads from CPU to GPU with cuDF for Apache Spark. It analyzes Spark event logs, recommends Spark and cluster configuration, records job history, validates CPU/GPU results, and makes CPU/GPU routing decisions from accumulated evidence.

NVIDIA cuDF Router has two primary usage options:

OptionUse Case(s)Primary Interface
1. Active Router with Spark ConnectPlatforms that can run Spark Connect jobs and want transparent inline CPU/GPU routing.Standalone Router with gRPC proxy
2. API integration with capture and replayPlatforms that own job submission and want to interface with the cuDF Router at job lifecycle boundaries.cuDF Router REST APIs

Common Setup

The cuDF Router NGC collection provides the following:

  • Resource bundle (cudf-router) with the Python wheel, install script, and all runtime artifacts
  • Container images and a Helm chart for Kubernetes deployments will be available in the next release

For example, install the cuDF Router from the resource bundle and initialize configuration:

bash cudf-router_v<version>/install-<version>.sh \
  -w cudf-router_v<version>/nvidia_aether-<version>-py3-none-any.whl \
  -p <platform>

source venv-aether/bin/activate
aether config init
aether config set core.selected_platform <platform>
aether migrate apply

GPU execution requires a Spark runtime with the cuDF for Apache Spark plugin jar installed on the target GPU nodes. The cuDF Router also needs read access to Spark event logs and write access to its output, cache, and any platform artifact locations.

For local single-user usage, SQLite is the default job-history database. For shared REST or router deployments, use PostgreSQL and run the cuDF Router REST service and workers from the same durable database.

aether config set database.job_history_db_type postgresql
aether config set database.job_history_connection <postgres-connection>
aether migrate apply

Use aether config list for the full configuration surface.

Supported platforms:

Platform<platform> value
On-premisesonprem (default)
Amazon EMRemr
Google Cloud Dataprocdataproc
Google Kubernetes Enginegke
Databricks on AWSdatabricks.aws

Spark and sandbox support differs by integration path:

AreaCurrent Guidance
Active RouterSpark 4.0+ Spark Connect environments
Capture and replaySpark 3.5+ capture hosts and Spark Connect replay targets
Sandbox replayIceberg sandboxing on Spark 3.5+; Delta sandboxing on Spark 4.0+ where Delta is on the classpath

Platform support for sandbox replay is separate from Spark version support. Check the platform guide before enabling shadowRun.requiresSandbox=true or enable_runtime_sandbox=true.


1. Active Router With Spark Connect

Use the Active Router when Spark clients can connect through a Spark Connect proxy. The Smart Router sits between the client and CPU/GPU Spark Connect servers. It asks the cuDF Router REST service for routing decisions, injects recommended Spark configuration into sessions, records CPU sessions, and can run background GPU shadow replay after a CPU run completes.

This path requires Spark Connect protocol compatibility between clients, the router, and upstream Spark Connect servers. The active inline router path is intended for Spark 4.0+ environments. Capture and replay support for non-inline flows can cover Spark 3.5+ environments; see API integration with capture and replay.

Deployment

  1. Deploy the cuDF Router REST service. For local development:

    aether rest run
    

    Production-style router deployments should use PostgreSQL and durable workers. To enable interactive API docs at http://<host>:8000/docs, run aether config set rest.enable_docs true.

  2. Deploy the Smart Router. The Smart Router jars are included in the nvidia_aether wheel under the aether/resources/smart-router/ package directory.

    Choose a local runtime directory for the router and set ROUTER_HOME to that path; the examples below use /opt/cudf-router/smart-router, but any directory readable by the router process is fine. Copy both com.nvidia.grpc-proxy-*.jar and aether-connect-*.jar from the installed wheel's aether/resources/smart-router/ directory into ROUTER_HOME.

  3. Provide TLS material for the router. For production, use a certificate and key issued by the deployment environment. For local testing, a self-signed certificate is sufficient:

    openssl req -x509 -newkey rsa:4096 -nodes -days 365 \
      -keyout "$ROUTER_HOME/server.key" \
      -out "$ROUTER_HOME/server.crt" \
      -subj "/CN=<router-host>" \
      -addext "subjectAltName=DNS:<router-host>,IP:<router-ip>"
    
  4. Create a Smart Router config:

    proxy:
      port: 15002
      certChainPath: /path/to/server.crt
      privateKeyPath: /path/to/server.key
    
    aether:
      apiUrl: http://localhost:8000
    
    cluster:
      cpu:
        # Use one of sparkConnectUri, clusterId, or configFile.
        configFile: /path/to/cpu-cluster.yaml
      gpu:
        configFile: /path/to/gpu-cluster.yaml
        # Optional target cluster file with enforced Spark properties:
        # targetClusterFile: /path/to/gpu-target-cluster.yaml
    
    shadowRun:
      enabled: true
      requiresSandbox: false
    

    sparkConnectUri connects to a pre-existing Spark Connect server, clusterId uses an existing platform cluster and lets the cuDF Router start/stop Spark Connect, and configFile lets the cuDF Router provision the cluster and Spark Connect server. Platform support varies:

    PlatformActive Router Support
    On-premisesExisting clusters only
    EMRExisting clusters or clusters created by the cuDF Router
    DataprocExisting clusters or clusters created by the cuDF Router
  5. Start the router with Java 17 or newer:

    export ROUTER_CP="$(ls "$ROUTER_HOME"/com.nvidia.grpc-proxy-*.jar):$(ls "$ROUTER_HOME"/aether-connect-*.jar)"
    
    java -Dconfig.file=/path/to/smart-router.yaml \
      -cp "$ROUTER_CP" \
      com.nvidia.smartrouter.GrpcGateway
    

    In production, run this command as a managed service, container entrypoint, or Kubernetes workload. Expose the configured gRPC port, and mount the YAML file plus TLS cert/key into the paths referenced by the config.

  6. Ensure network access:

    • Spark clients can reach the Smart Router gRPC port.
    • Smart Router can reach the cuDF Router REST service.
    • Smart Router can reach the CPU/GPU Spark Connect servers.
    • Spark event logs are written to storage the cuDF Router can read.

Usage

Point the Spark client at the Smart Router and use a stable connect_id for repeated runs of the same logical job:

export GRPC_DEFAULT_SSL_ROOTS_FILE_PATH=/path/to/server.crt
export SPARK_REMOTE="sc://<router-host>:15002/;use_ssl=true;token=spark-secret-token;connect_id=<job-id>"

spark-submit your_job.py

The first run normally routes to CPU while the cuDF Router collects evidence. When the client calls spark.stop(), the router releases the primary endpoint, sends the completed event log to the cuDF Router, and, when shadow runs are enabled, replays the recorded session on GPU. If the GPU shadow run profiles successfully, validates successfully, and satisfies the cuDF Router routing policy, later runs with the same connect_id can route to GPU.

When replay could mutate production data, enable sandbox replay only on platforms where runtime sandboxing is configured and supported:

shadowRun:
  enabled: true
  requiresSandbox: true

With sandbox replay, the cuDF Router starts sandbox-aware GPU Spark Connect servers for staging and workload phases so GPU validation does not write to production tables. Configure platform.<platform>.cluster.sandbox.warehouse_path and the required sandbox artifacts for the platform before enabling this mode.


2. API Integration With Capture And Replay

Use API integration when the platform owns job submission and cannot, or should not, put the Smart Router in the live Spark Connect path. The platform calls the cuDF Router before a job starts and after it finishes. The cuDF Router owns the routing decision and evidence processing; the platform owns execution, isolation policy, quotas, and job lifecycle controls.

The two required lifecycle calls are:

BoundaryEndpointPurpose
Before executionGET /api/v2/route_jobDecide CPU vs GPU and return Spark configuration to apply.
After completionPOST /api/v2/process_completed_jobRecord the run, process the event log, and trigger shadow replay when needed.

Deployment

  1. Deploy the cuDF Router REST service:

    aether rest run
    

    For production, run the REST service and worker processes from a managed service or container deployment using the same durable database.

    Set rest.enable_docs=true when interactive API docs should be available at http://<aether-host>:8000/docs.

  2. Configure the platform and event-log access along with shadow run iteration settings:

    aether config set core.selected_platform <platform>
    aether config set platform.<platform>.spark_event_log_dir <event-log-dir-uri>
    aether config set migration.min_shadow_runs 1
    aether config set migration.max_shadow_runs 2
    
  3. Enable capture handoff when the cuDF Router should return Spark Workload Replay capture properties from route_job:

    aether config set platform.<platform>.provide_capture_plugin true
    aether config set platform.<platform>.set_capture_on_unknown true
    aether config set platform.<platform>.spark_workload_capture_dir <capture-output-dir-uri>
    aether config set platform.<platform>.workload_replay_capture_jar_uri <capture-plugin-jar-uri>
    

    Leave workload_replay_capture_jar_uri unset only when the platform prepares the capture plugin through another mechanism, such as bootstrap or a preinstalled runtime.

  4. Provide a GPU shadow execution path. Replay driven by the cuDF Router uses Spark Connect server lifecycle APIs and the Spark Workload Replay client:

    • POST /api/v2/cluster or POST /api/v2/cluster/register
    • POST /api/v2/spark_connect_server
    • POST /api/v2/spark_connect_server/spark_workload_replay
    • DELETE /api/v2/spark_connect_server
    • DELETE /api/v2/cluster when the cuDF Router created the cluster

    If replay can mutate data, configure an isolated GPU sandbox with read-only production access, a writable sandbox warehouse, and platform policy for authentication, authorization, network isolation, quota, and cost controls.

Usage

Call route_job before each logical job run:

curl -sS \
  "http://<aether-host>:8000/api/v2/route_job?aether_job_id=<job-id>&custom_job_run_id=<run-id>" \
  | python3 -m json.tool

Apply the response as follows:

ResponsePlatform Action
next_run_type=CAPTURERun on CPU and merge the returned recommended_spark_configuration into the job's Spark config to enable capture.
next_spark_runtime=SPARKRun on CPU. If capture properties are present, apply them on top of the platform's normal Spark config.
next_spark_runtime=SPARK_RAPIDSRun on GPU and apply the returned recommended Spark configuration.
404No routing evidence exists and capture-on-unknown is not enabled; run the normal CPU path and report completion.

After the job finishes, call process_completed_job with the event log or the platform job ID:

curl -sS -X POST "http://<aether-host>:8000/api/v2/process_completed_job" \
  -H "Content-Type: application/json" \
  -d '{
        "aether_job_id": "<job-id>",
        "custom_job_run_id": "<run-id>",
        "job_status": "finished",
        "event_log": "<event-log-uri>",
        "enable_shadow_run": true
      }'

Poll completion status:

curl -sS \
  "http://<aether-host>:8000/api/v2/process_completed_job/status?aether_job_id=<job-id>" \
  | python3 -m json.tool

When a CPU run has a replay capture and the cuDF Router policy requires a shadow run, the cuDF Router replays the captured workload on a GPU Spark Connect server, profiles the GPU event log, validates against the CPU run, and updates the next routing decision. The platform can inspect readiness and the latest issued route:

curl -sS "http://<aether-host>:8000/api/v2/job_migration_readiness?aether_job_id=<job-id>"
curl -sS "http://<aether-host>:8000/api/v2/route_decision?aether_job_id=<job-id>"

Supporting Capabilities

CapabilityPurpose
QualificationAnalyze CPU event logs to estimate GPU acceleration potential and generate initial recommendations.
ProfilingAnalyze GPU event logs, identify bottlenecks, and generate updated recommendations.
TuningRun iterative GPU trials to optimize Spark configuration and, optionally, cluster shape.
ValidationCompare CPU and GPU outputs or event-log metrics to confirm correctness.
RoutingDecide CPU vs GPU from qualification, profiling, validation, cost, SLA, and shadow-run evidence.
ReportingShow job history, performance, cost, and migration status through CLI output and the report UI.
SandboxRedirect supported table reads/writes during replay so GPU evaluation does not mutate production data.

What's Included

The cuDF Router NGC collection includes the following artifacts:

ArtifactTypeDescription
cudf-routerResourcenvidia_aether Python wheel, offline wheelhouses (Python 3.10–3.12), install script, and bundled runtime JARs (Smart Router, sandbox plugin, workload-replay capture and replay).

Appendix

CLI Commands

CommandPurpose
aether configManage cuDF Router configuration, selected platform, and runtime settings.
aether qualifyAnalyze CPU Spark event logs or platform jobs to estimate GPU acceleration potential and generate initial recommendations.
aether profileAnalyze GPU Spark event logs or platform jobs to identify bottlenecks and generate updated recommendations.
aether submitSubmit a GPU-accelerated Spark job using a stored job ID or Spark configuration ID.
aether runRun the end-to-end CLI workflow: qualify a CPU job, provision or reuse a GPU cluster, submit GPU trials, tune, and validate.
aether validateCompare CPU and GPU job outputs or event-log-derived metrics to verify correctness.
aether tuneIteratively submit and profile GPU runs to optimize Spark configuration and optional cluster shape.
aether reportGenerate job, performance, and cost reports, or launch the report UI.
aether clusterCreate, register, inspect, resize, list, and delete platform clusters.
aether restRun the cuDF Router REST API server or durable REST worker pools.
aether diagnoseDiagnose paired CPU/GPU event logs with query matching and performance comparison.
aether databaseInspect and manage the job-history database.
aether trainTrain a custom QualX model from validated CPU/GPU job pairs.
aether migrateApply, list, or roll back job-history database schema migrations.
aether versionDisplay cuDF Router version and build information.

Core REST APIs

APIPurposeFunction
GET /api/v2/route_jobReturn the next CPU/GPU route and Spark configuration for a logical job.Pre-run integration boundary for platforms and the Smart Router.
GET /api/v2/route_decisionRead the current persisted routing decision without recalculating it.Lets UIs and operators inspect the last recorded route state.
GET /api/v2/job_recommendationsReturn recommended Spark configuration and cluster shape for a job.Supplies either tool-generated TUNING config or BEST_TESTED historical config.
GET /api/v2/job_migration_readinessReturn qualification, profile, validation, and next-run readiness state.Explains whether the next run should be CPU, GPU, or shadow run.
POST /api/v2/process_completed_jobAsynchronously process a completed Spark job.Post-run integration boundary; records success/failure, runs qualify/profile, and can trigger shadow replay.
GET /api/v2/process_completed_job/statusPoll process_completed_job state by aether_job_id.Lets callers wait for asynchronous evidence processing to finish.
POST /api/v2/qualifyQualify CPU workload event logs or platform jobs.Produces initial GPU suitability, cost, cluster, and Spark configuration recommendations.
GET /api/v2/qualify/statusPoll asynchronous qualification state by aether_job_id.Used when POST /qualify is submitted with async preference.
POST /api/v2/profileProfile GPU workload event logs or platform jobs.Produces GPU performance analysis and updated Spark configuration recommendations.
GET /api/v2/profile/statusPoll asynchronous profiling state by aether_job_id.Used when POST /profile is submitted with async preference.
POST /api/v2/validateValidate a GPU job against the corresponding CPU job.Confirms whether CPU and GPU results match before GPU routing is trusted.
GET /api/v2/clusterGet details for one cluster tracked by the cuDF Router.Inspect platform cluster state and metadata.
GET /api/v2/clustersList clusters tracked by the cuDF Router.Inventory managed and registered compute resources.
POST /api/v2/clusterCreate a cluster in the selected platform.Provision CPU, GPU, sandbox, or Spark Connect-ready clusters when the cuDF Router owns lifecycle.
POST /api/v2/cluster/registerRegister an externally created cluster.Let the cuDF Router use an existing cluster without taking ownership of its lifecycle.
DELETE /api/v2/clusterDelete a cluster created by the cuDF Router.Clean up platform resources that the cuDF Router owns.
POST /api/v2/spark_connect_serverStart a Spark Connect server on a cluster tracked by the cuDF Router.Create an endpoint for router traffic or workload replay.
DELETE /api/v2/spark_connect_serverStop a Spark Connect server started by the cuDF Router.Release the Spark Connect process and related lifecycle record.
POST /api/v2/spark_connect_server/spark_workload_replayReplay a captured workload through Spark Connect.Run GPU shadow replay from a Spark Workload Replay capture file or captured job tracked by the cuDF Router.
GET /api/v2/spark_configRetrieve the latest recommended Spark configuration by platform or custom job-run ID.Resolve recommended Spark properties for a job run.
POST /api/v2/spark_configRegister a Spark configuration and return its ID.Deduplicate and reference Spark properties from cluster/server lifecycle calls.
GET /api/v2/job_routing_listView routing allowlist and denylist entries.Inspect routing policy overrides.
POST /api/v2/job_routing_listAdd or update routing allowlist and denylist entries.Control whether specific jobs are eligible for routed execution.
DELETE /api/v2/job_routing_list/{aether_job_id}Remove one routing list entry.Return a job to the default routing policy.
GET /healthzReturn REST readiness and database connectivity.Database-aware readiness.
GET /liveReturn REST process liveness.REST API availability.
GET /versionReturn cuDF Router version information.Runtime compatibility and support diagnostics.

License

This project requires, and may download and install, additional third-party open source software projects. Review the license terms of these open source projects before use.

NVIDIA cuDF Router
Publisher
NVIDIA
UpdatedNovember 3, 2026 UTC

Modal Content

NVIDIA uses cookies to improve your experience on our web site. We and our third-party partners also use cookies and other tools to collect and record information you provide as well as information about your interactions with our websites for performance improvement, analytics, and to assist in marketing efforts. By clicking "Accept All", you consent to our use of cookies and other tools as described in our Cookie Policy. You can manage your cookie settings by clicking on "Manage Settings." By continuing to use this site or by clicking one of the buttons below, you agree to our Terms of Service (which contains important waivers). Please see our Privacy Policy for more information on our privacy practices.