Skip to content

Add support for separate metadata and execution servers in REST function API #25331

@tdcmeehan

Description

@tdcmeehan

Expected Behavior or Use Case

The REST function API should allow metadata servers to specify different execution servers for each function. When a client queries for function metadata, it should receive an optional execution endpoint URL that tells it where to actually execute the function.

Presto Component, Service, or Connector

  • REST function server API (presto-openapi)
  • REST function namespace manager
  • Reference REST function server
  • C++ worker

Possible Implementation

Add an optional executionEndpoint field to the JsonBasedUdfFunctionMetadata schema:

  executionEndpoint:
    url: "https://compute-cluster-1.example.com"  # optional

When present, the client would execute the function at: {url}/v1/functions/{schema}/{functionName}/{functionId}/{version}

If not provided, the client determines where to execute (same server, local config, etc).

Example Screenshots (if appropriate):

N/A

Context

Currently the REST function server API assumes the same server handles both metadata and execution. This creates problems for distributed deployments where you want a lightweight metadata server for function discovery, but need execution to happen on different servers (e.g. for load balancing, scaling, or specialized hardware)

This change is backwards-compatible.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions