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.25.tar.gz (8.7 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.25-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: golem_vm_discovery-0.1.25.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.9.23 Linux/6.11.0-1018-azure

File hashes

Hashes for golem_vm_discovery-0.1.25.tar.gz
Algorithm Hash digest
SHA256 eaa1017f0f9d16714b98017773f3c534497cd4d42685ba52bfdf2da7025ccca4
MD5 fb37a1f12551ddfa772c698716af250a
BLAKE2b-256 755610c6c704b78914d5c58dab28e3df308e204f50f20bfb4d63cd8b2fd250e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: golem_vm_discovery-0.1.25-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.9.23 Linux/6.11.0-1018-azure

File hashes

Hashes for golem_vm_discovery-0.1.25-py3-none-any.whl
Algorithm Hash digest
SHA256 9e2f46f600efd21a5b17cf78fcabee1f9de1e44e19da5454ec9bf6e66c293305
MD5 880efcca6902a6da8dfbf11016a1ba01
BLAKE2b-256 f7f3b06bc6d58cffc085274f43c9be549c5817494be8ed943276642e4a2cbc25

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