Skip to main content

Multi-Machine Coordination

Multi-Machine Coordination

Last Updated: 2025-12-26
Status: Production


Overview

The BlueFly Agent Platform coordinates AI agents across two Mac machines (Mac M4 and Mac M3) to double agent processing capacity through shared infrastructure and intelligent load balancing.


Quick Navigation


Architecture

System Components


‚                    Shared Infrastructure                     ‚
‚          ‚
‚  ‚    Redis     ‚  ‚  PostgreSQL   ‚  ‚  Coordinator ‚    ‚
‚  ‚  (Router)    ‚  ‚   (Router)    ‚  ‚  (Mac M4)    ‚    ‚
‚  ˜  ˜  ˜    ‚
˜
         ²                    ²                    ²
         ‚                    ‚                    ‚
                        
    ‚        ‚          ‚         ‚          ‚         ‚
¼ ¼  ¼ ¼  ¼ ¼
‚ Mac   ‚ ‚ Mac  ‚  ‚ Mac   ‚ ‚ Mac  ‚  ‚ Mac   ‚ ‚ Mac  ‚
‚ M4    ‚ ‚ M4   ‚  ‚ M3    ‚ ‚ M3   ‚  ‚ M4    ‚ ‚ M3   ‚
‚Agent 1‚ ‚Agent ‚  ‚Agent  ‚ ‚Agent ‚  ‚Agent  ‚ ‚Agent ‚
‚       ‚ ‚  2   ‚  ‚  3    ‚ ‚  4   ‚  ‚  5    ‚ ‚  6   ‚
˜ ˜  ˜ ˜  ˜ ˜

Key Design Decisions

  1. Coordinator Location: Mac M4 (primary work machine)

    • Rationale: More stable, always-on machine
    • Handles task distribution and health monitoring
  2. Shared Infrastructure: Router-based services

    • Redis: Task queue, agent state, coordination
    • PostgreSQL: Persistent agent registry, metrics, history
  3. Agent Registration: Both Macs register agents with coordinator

    • Agents announce capabilities and health status
    • Coordinator maintains registry in PostgreSQL
    • Redis used for real-time coordination
  4. Load Balancing: Capability-aware weighted round-robin

    • Considers agent capabilities, current load, machine resources
    • Failover to healthy agents on either machine

Current Configuration

Mac M4 (Primary)

  • Tailscale IP: 100.108.129.7
  • Role: Coordinator, primary development
  • Services: Cloudflare Tunnel, GitLab Webhook Server, OrbStack K8s

Mac M3 (Secondary)

  • Tailscale IP: 100.108.180.36
  • Role: Secondary workstation, testing/QA
  • Services: OrbStack K8s (testing)

Documentation