Skip to content

Feature Request: Add Persistent Services Layer (Analogous to Kubernetes Services)Β #5048

@laciferin2024

Description

@laciferin2024

✨ Feature Request: Add Persistent Services Layer (Analogous to Kubernetes Services)

🧠 Summary

Enable Bacalhau nodes to host and expose long-lived background services (e.g. wallet servers, auth endpoints, RPC nodes), with internal and external service discovery, similar to Kubernetes’ Service abstraction.


πŸš€ Motivation

Bacalhau currently supports jobs to connect to internet. However, to support full-stack decentralized applications, there is a need for persistent services that are internally routable or selectively exposed.

This feature would allow Bacalhau to go beyond stateless or batch jobs and unlock support for more complex microservice-based architectures in decentralized environments.


🧰 Use Cases

Examples of decentralized services that could be hosted:

  • πŸ” Auth services (e.g., zk verifiers on TEE)
  • πŸ’³ Wallet infrastructure (nonce managers, transaction relayers)
  • πŸ”— Blockchain nodes (e.g., local RPC endpoints, light clients)
  • 🧠 AI/ML inference APIs
  • πŸ“¦ Databases or key-value stores (e.g., decentralized Postgres wrappers)
  • πŸ”Ž Data indexing / search APIs
  • πŸ”„ Internal APIs for chained Bacalhau jobs

πŸ’‘ Proposed Design

Introduce a services plane to Bacalhau with:

  • type: service β€” New job type for perpetual, long-lived workloads
  • expose: internal
  • Service discovery layer β€” Allow job-to-job communication via logical service names
  • DNS-like resolution β€” e.g., verifier-service.bacalhau, db-service.bacalhau
  • Health checks & restarts β€” Optional liveness probes or TTLs
  • Lifecycle management β€” Ability to update, scale, or destroy services

βœ… Benefits

  • Unlocks full decentralized app infrastructure on Bacalhau
  • Enables composable, multi-service deployments
  • Mirrors Kubernetes-like patterns developers already know
  • Supports modular AI/crypto infra stacks
  • Sets foundation for future orchestration features (like job dependency graphs)

πŸ“Ž Related Inspiration

  • Kubernetes Service, ClusterIP, Headless Service
  • Hashicorp Consul / Nomad internal routing
  • libp2p peer routing for internal-only DApps

Metadata

Metadata

Assignees

No one assigned

    Labels

    request/newRequest: Indicates a new request that has been submitted and awaits initial triagetype/enhancementType: New features or enhancements to existing features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions