Skip to main content

VM on Golem Discovery Service - Central hub for provider discovery and resource matching

Project description

Golem VM Discovery Server

The Discovery Server acts as the central hub for the Golem Network, enabling requestors to find providers with matching resources.

Installation

pip install golem-vm-discovery

Running the Server

The Discovery Server comes with sensible defaults and can be run immediately after installation:

golem-discovery

The server will start with the following default configuration:

  • Listen on all interfaces (0.0.0.0) port 9001
  • Store data in SQLite at ~/.golem/discovery/discovery.db
  • Rate limit to 100 requests per minute per IP
  • Clean up expired advertisements every minute
  • Require provider advertisement refresh every 5 minutes

Configuration

All settings have built-in defaults and can be optionally overridden using environment variables:

# Override only what you need:

# Change the port
GOLEM_DISCOVERY_PORT=8000

# Enable debug mode
GOLEM_DISCOVERY_DEBUG=true

# Use a different database location
GOLEM_DISCOVERY_DATABASE_DIR="/custom/path"

Default Settings

Setting Default Environment Variable Description
Host 0.0.0.0 GOLEM_DISCOVERY_HOST Listen interface
Port 9001 GOLEM_DISCOVERY_PORT Listen port
Debug false GOLEM_DISCOVERY_DEBUG Enable debug mode
Database Dir ~/.golem/discovery GOLEM_DISCOVERY_DATABASE_DIR Database directory
Database Name discovery.db GOLEM_DISCOVERY_DATABASE_NAME Database filename
Rate Limit 100 GOLEM_DISCOVERY_RATE_LIMIT_PER_MINUTE Requests per minute per IP
Ad Expiry 5 GOLEM_DISCOVERY_ADVERTISEMENT_EXPIRY_MINUTES Minutes until ads expire
Cleanup Interval 60 GOLEM_DISCOVERY_CLEANUP_INTERVAL_SECONDS Seconds between cleanups

API Endpoints

  • GET /health - Health check endpoint
  • GET /api/v1/advertisements - List available providers
  • POST /api/v1/advertisements - Register a provider

Environment Variables

All settings can be configured through environment variables:

Variable Description Default
GOLEM_DISCOVERY_HOST Server host 0.0.0.0
GOLEM_DISCOVERY_PORT Server port 9001
GOLEM_DISCOVERY_DEBUG Enable debug mode false
GOLEM_DISCOVERY_DATABASE_DIR Database directory ~/.golem/discovery
GOLEM_DISCOVERY_DATABASE_NAME Database filename discovery.db
GOLEM_DISCOVERY_RATE_LIMIT_PER_MINUTE Rate limit per IP 100
GOLEM_DISCOVERY_ADVERTISEMENT_EXPIRY_MINUTES Advertisement TTL 5
GOLEM_DISCOVERY_CLEANUP_INTERVAL_SECONDS Cleanup interval 60

Development

To run the server in development mode:

GOLEM_DISCOVERY_DEBUG=true golem-discovery

This will enable auto-reload on code changes and more detailed logging.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

golem_vm_discovery-0.1.12.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

golem_vm_discovery-0.1.12-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file golem_vm_discovery-0.1.12.tar.gz.

File metadata

  • Download URL: golem_vm_discovery-0.1.12.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.9.21 Linux/6.8.0-1021-azure

File hashes

Hashes for golem_vm_discovery-0.1.12.tar.gz
Algorithm Hash digest
SHA256 e4bfda83a91a9f1aa96417cdb4cd23b1a49a2200f20eacbf47e56b0adfb3be95
MD5 c5e2752c76ecbecf9fa99c041de14eb4
BLAKE2b-256 759aac40529706408f03d9e55a282cb247e55cf07348bd9fcc85c93e4c188b41

See more details on using hashes here.

File details

Details for the file golem_vm_discovery-0.1.12-py3-none-any.whl.

File metadata

  • Download URL: golem_vm_discovery-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.9.21 Linux/6.8.0-1021-azure

File hashes

Hashes for golem_vm_discovery-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 66f128762a15f0fcb36d6275f21d622ebcf9a6ffcaef645fada936d96578b430
MD5 3f8a43d365d91071295b0f2f7bac0d21
BLAKE2b-256 0fda4eaa77c84eda4b677de8758c2cf03745848aa06adce57b0056448ce469b9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page