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.18.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.18-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: golem_vm_discovery-0.1.18.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.18.tar.gz
Algorithm Hash digest
SHA256 02ecaf70b2f3b8982b642057b17e5d2661aee57477079708f83c22c0e0eb4105
MD5 3106c5be68bb6737274d82d1c9154387
BLAKE2b-256 13915cdcf56d8674a21bc07e043ae3019330c193e408f744b39bc3016bc2c5d4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: golem_vm_discovery-0.1.18-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.18-py3-none-any.whl
Algorithm Hash digest
SHA256 404eb8565ec890ba5c7cb5c22997418a93ce59cbd6bb9e61918af467db90ab53
MD5 033ac130865afac41ea951d850b247fc
BLAKE2b-256 23249b15801c337f40045bfca96f48cd961acb2501a77b9f5c79fdee2dee2ea6

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