Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pbezglasny/feast_server_rust

Repository files navigation

Feast Feature Server (Rust)

Unofficial Rust implementation of the Feast feature server with focus on performance.

Currently supported features

  • Online feature retrieval via HTTP REST API.
  • Online feature retrieval via gRPC API
  • TLS support for both HTTP and gRPC servers.
  • Metrics endpoint for Prometheus scraping.
  • Health check endpoint.

Supported feature stores:

  • File stores: local filesystem, GCS, S3.

Supported online stores:

  • Sqlite.
  • Redis
    • Available Redis modes: single node, cluster, and sentinel.
    • TLS connections are supported.
    • For available config options, see the CommonConnectionOptions struct in the source code.

Implementation details

Internally, interned strings are used for better performance. Theoretically, this could lead to an out-of-memory error, but this should not be a problem in standard use cases.

Test server

Easiest way to test the server is to use the pull docker image from docker hub.

docker pull pbezglasny/feast-server-rust:latest

Or build the docker image locally

docker build -t feast-feature-server-rust:latest .

Workspace Layout

  • feast-server-core: core feature-store domain logic (registry access, online store abstraction, protobuf helpers).
  • rest-server: Axum-based HTTP server that exposes online feature retrieval endpoints.
  • grpc-server: tonic-based gRPC server scaffolding.
  • cli: command-line entrypoint that wires configuration, logging, and server startup.

Prerequisites

  • Rust toolchain (stable) with cargo and rustfmt. You can install it using rustup.

Run the HTTP Server

  1. Point the CLI at a feature repository. Either change into the repo directory or pass it explicitly:
    FEATURE_REPO_DIR_ENV_VAR=<path-to-your-feature-repo> \
    cargo run -p cli -- serve -h 0.0.0.0 -p 6566
    You can also use --chdir <path> or --feature-store-yaml <file> to override the repository root and feature_store.yaml filename. These options can also be set via the FEATURE_REPO_DIR_ENV_VAR and FEAST_FS_YAML_FILE_PATH environment variables, respectively.
  2. Optional flags:
    • --metrics enables a /metrics endpoint backed by axum-prometheus.
    • --key and --cert must be provided together to serve over TLS.
    • --type grpc is accepted by the CLI, but the gRPC server is not implemented yet.

When the server starts it exposes:

  • POST /get-online-features expecting a Feast GetOnlineFeaturesRequest payload and returning the online feature vector.
  • GET /health for readiness checks (HTTP 200 on success).
  • GET /metrics when metrics are enabled.

Development Workflow

  • Format: cargo fmt --all
  • Lint: cargo clippy --all-targets --all-features -- -D warnings
  • Test: cargo test --all

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •