# CLUSTER MEET

> Connect the receiving node with another node so that both join one cluster.

URL: https://docs.hotkv.com/commands/cluster-meet/

```
CLUSTER MEET ip port [cluster-bus-port]
```

- Group: Cluster
- Complexity: O(1)
- HotKV Cloud: not available
- On-Premise: no license needed

`CLUSTER MEET` tells the receiving node to contact another node at `ip` and
`port` and bring it into its cluster. Once the two have met, they learn about
each other's peers over the cluster bus, so meeting one node of an existing
cluster is enough to join all of them.

The command replies `OK` as soon as the handshake starts. The node keeps
sending its greeting every second until the other node answers, and drops
the handshake if no answer comes in time. Check
[CLUSTER NODES](https://docs.hotkv.com/commands/cluster-nodes/index.md) to see the new node appear without
the `handshake` flag.

Give the node's IP address, not a host name: `CLUSTER MEET localhost 7006` is refused with `ERR Invalid node address specified: localhost:7006`. The bus port defaults to
`port` + 10000; pass `cluster-bus-port` when the other node uses a different
one (`cluster-port`). Meeting a node that is already known at that address
is allowed, and is how a node that was reset with
[CLUSTER RESET](https://docs.hotkv.com/commands/cluster-reset/index.md) rejoins.

## Return value

Simple string `OK` in RESP2 and RESP3, or one of these errors:

| Case | Error |
| --- | --- |
| `port` is not an integer | `ERR Invalid base port specified: <port>` |
| `cluster-bus-port` is not an integer | `ERR Invalid bus port specified: <port>` |
| Not an IP address, or a port outside 1 to 65535 | `ERR Invalid node address specified: <ip>:<port>` |
| Cluster mode is off | `ERR This instance has cluster support disabled` |

## Examples

```
127.0.0.1:6379> CLUSTER MEET 10.0.0.2 6379
OK
127.0.0.1:6379> CLUSTER MEET 10.0.0.7 7000 17100
OK
127.0.0.1:6379> CLUSTER MEET node2.example.com 6379
(error) ERR Invalid node address specified: node2.example.com:6379
```

## Compatibility

Same arguments, replies and error strings as Redis 7 and Valkey 8. A node that is not a
HotKV cluster node never completes the handshake: meeting a Redis or Valkey node answers
`OK` and leaves it in `handshake` (see [Migrate a cluster to HotKV](https://docs.hotkv.com/clustering/migrate-to-hotkv/index.md#what-does-not-work)).

## See also

[CLUSTER FORGET](https://docs.hotkv.com/commands/cluster-forget/index.md), [CLUSTER NODES](https://docs.hotkv.com/commands/cluster-nodes/index.md),
[Scaling a cluster](https://docs.hotkv.com/clustering/scaling/index.md#add-a-node)