diff --git a/docs/configuration.md b/docs/configuration.md index 85af6c1a4..acc71656b 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -100,7 +100,7 @@ Any flag that has a value that is a comma separated list on the command line bec #### Gossip Port -* Description: Port to which Pilosa should bind for internal communication. +* Description: Port to which Pilosa should bind for internal communication. If more than one Pilosa server is running on the same host, the gossip port for each server must be unique. * Flag: `--gossip.port=11101` * Env: `PILOSA_GOSSIP_PORT=11101` * Config: @@ -304,7 +304,7 @@ Any flag that has a value that is a comma separated list on the command line bec ### Example Cluster Configuration -A three node cluster could be minimally configured as follows: +A three node cluster running on different hosts could be minimally configured as follows: #### Node 0 @@ -409,3 +409,64 @@ The same cluster which uses HTTPS instead of HTTP can be configured as follows. [tls] certificate = "/home/pilosa/private/server.crt" key = "/home/pilosa/private/server.key" + +### Example Cluster Configuration (HTTPS, same host) + +You can run a cluster on the same host using the configuration above with a few changes. Gossip port and bind adress should be different for each node and a data directory should be accessed only by a single node. + +#### Node 0 + + data-dir = "/home/pilosa/data0" + bind = "https://localhost:10100" + + [gossip] + port = 12000 + seed = "localhost:12000" + key = "/home/pilosa/private/gossip.key32" + + [cluster] + replicas = 1 + type = "gossip" + hosts = ["https://localhost:10100","https://localhost:10101","https://localhost:10102"] + + [tls] + certificate = "/home/pilosa/private/server.crt" + key = "/home/pilosa/private/server.key" + +#### Node 1 + + data-dir = "/home/pilosa/data1" + bind = "https://localhost:10101" + + [gossip] + port = 12001 + seed = "localhost:12000" + key = "/home/pilosa/private/gossip.key32" + + [cluster] + replicas = 1 + type = "gossip" + hosts = ["https://localhost:10100","https://localhost:10101","https://localhost:10102"] + + [tls] + certificate = "/home/pilosa/private/server.crt" + key = "/home/pilosa/private/server.key" + +#### Node 2 + + data-dir = "/home/pilosa/data2" + bind = "https://localhost:10102" + + [gossip] + port = 12002 + seed = "locahost:12000" + key = "/home/pilosa/private/gossip.key32" + + [cluster] + replicas = 1 + type = "gossip" + hosts = ["https://localhost:10100","https://localhost:10101","https://localhost:10102"] + + [tls] + certificate = "/home/pilosa/private/server.crt" + key = "/home/pilosa/private/server.key"