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

Uploaded Python 3

File details

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

File metadata

  • Download URL: golem_vm_discovery-0.1.14.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.14.tar.gz
Algorithm Hash digest
SHA256 8e62c730fff289c4715780fe2e30acf430101917d03248b2eb1ecaa712e63fcc
MD5 d3b63ec05b83c367b533fcb38207ba7d
BLAKE2b-256 558f6c6d6c736a9981bea584e193b2bfaeb16831eef6024cf869d6dc193b4b37

See more details on using hashes here.

File details

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

File metadata

  • Download URL: golem_vm_discovery-0.1.14-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.14-py3-none-any.whl
Algorithm Hash digest
SHA256 19f3f2d65b37372179af05acd198c846617d58ad645c9491d1715ba9583b0479
MD5 6db5299c58fac8da7829d21abd797641
BLAKE2b-256 12a08ccc946527b34b412398a0b8446a03404e7b6db63a0f643038acbad78ab2

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