Skip to main content

Link Local Discovery

Link Local Discovery enables nodes on the same WiFi or LAN to discover and communicate with each other directly, without any cloud dependency.

Overview

AttributeValue
ScopeSame local network (WiFi, LAN)
Cloud dependencyNone
CommunicationDirect node-to-node
CapabilitiesFull HTTP, WebSocket, SSE

How It Works

Link Local Discovery uses a supernode architecture:

  1. Supernode election: One node broadcasts via mDNS to become the supernode. If multiple nodes start simultaneously, capability-based negotiation determines the supernode.

  2. Node registration: New nodes discover the supernode via mDNS and register themselves, including their capabilities and available services.

  3. Discovery queries: When a node needs to find other nodes or services, it queries the supernode, which returns a list of matching registered nodes.

  4. Direct communication: Nodes communicate directly with each other. The supernode is a registry only and does not relay traffic.

Supernode Role

The supernode maintains a registry of all nodes on the local network. It does not participate in actual data communication between nodes.

Supernode responsibilities:

  • Accept node registrations
  • Respond to discovery queries
  • Maintain heartbeat with registered nodes

Supernode election criteria:

  • Device stability and uptime
  • Available resources
  • Network connectivity
  • Stationary devices preferred over mobile

Failover: If the supernode goes offline, remaining nodes automatically elect a new supernode through capability-based negotiation.

API Usage

Discover nodes on your local network using the Insight API:

curl -X GET "http://localhost:8083/mimik-mesh/insight/v1/nodes?type=linkLocal" \
-H "Authorization: Bearer $API_KEY"

Response (200 OK)

{
"data": [
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Living Room Hub",
"os": "linux",
"addresses": [
{
"type": "local",
"url": { "href": "http://192.168.1.101:8083" }
}
],
"services": []
}
]
}

Each node in the response includes a local address you can call directly:

curl -X GET "http://192.168.1.101:8083/my-agent/v1/data" \
-H "Authorization: Bearer $API_KEY"
tip

Link-local discovery does not require a stored JWT. The API key from the addon manifest is sufficient.

Use Cases

  • Offline applications: No internet connectivity required
  • Low-latency: Direct node-to-node communication
  • Privacy-first: Data stays on local network
  • Smart home: Nodes on home WiFi
  • Enterprise: Nodes on corporate LAN

Network Requirements

  • All nodes on the same subnet
  • mDNS (UDP port 5353) not blocked by firewall
  • HTTP ports accessible between nodes

Limitations

  • Same network only (cannot discover nodes on different networks)
  • Some enterprise networks block mDNS

For discovering nodes across different networks, use Account-Based Discovery or Proximity Discovery.