Skip to content

Commit c880571

Browse files
author
Andrea Cambieri
committed
readme
1 parent 50414e9 commit c880571

1 file changed

Lines changed: 100 additions & 2 deletions

File tree

Readme.md

Lines changed: 100 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,20 +121,118 @@ continuity pool add http://my-app.domain.com -i 30 -t 10 -d 35 --health-ok 1 --h
121121

122122
### Add a server to the pool
123123
```
124+
continuity server add --pool POOL_HOSTNAME # Pool hostname the server should be added to
125+
--address SERVER_ADDRESS:PORT # Address of the server (IP or hostname)
126+
[--health-check /healthcheck_endpoint] # Optional header name for routing condition
127+
[--condition MY_HEADER=MY_VALUE] # Optional header value for routing condition
128+
```
124129

130+
Example:
131+
```bash
132+
continuity server add --pool http://my-app.domain.com --address docker-1:8080 --health-check /health
125133
```
126134

127135
### Add a server with a routing condition to the pool
136+
```bash
137+
continuity server add --pool http://my-app.domain.com --address docker-2:8080 --condition X-HEADER=srv2
138+
```
139+
128140
### Add a server and remove an old server transactionally (zero downtime deployments)
141+
```
142+
continuity server transaction --pool POOL_HOSTNAME # Pool hostname the server should be added to
143+
-address NEW_SERVER_ADDRESS:PORT # Address of the new server (IP or hostname)
144+
--remove-server OLD_SERVER_UUID # Address of the old server to remove
145+
[--health-check /healthcheck_endpoint] # Optional header name for routing condition
146+
[--condition MY_HEADER=MY_VALUE] # Optional header value for routing condition
147+
```
148+
To obtain the server UUID, use the `continuity pool config POOLNAME` command (use `--json` for JSON output), see [View current configuration](#view-current-configuration) below.
149+
150+
Example:
151+
```bash
152+
continuity server transaction --pool http://my-app.domain.com --address docker-3:8080 --remove-server 123e4567-e89b-12d3-a456-426614174000 --health-check /health
153+
```
154+
129155
### View current configuration
130-
### Json output
156+
```bash
157+
continuity pool config POOL_HOSTNAME # Pool hostname to view configuration for
158+
[--json] # Output in JSON format
159+
```
160+
131161
### Server statistics
162+
```bash
163+
continuity pool stats POOL_HOSTNAME # Pool hostname to view statistics for
164+
[--json] # Output in JSON format
165+
```
166+
132167
### Remove a server from a pool
168+
```
169+
continuity server remove --pool POOL_HOSTNAME # Pool hostname the server should be removed from
170+
--server SERVER_UUID # UUID of the server to remove
171+
```
172+
173+
Example:
174+
```bash
175+
continuity server remove --pool http://my-app.domain.com --server 123e4567-e89b-12d3-a456-426614174000
176+
```
177+
133178
### Update a pool
179+
```
180+
continuity pool update POOL_HOSTNAME # Pool hostname to update
181+
--health-check-interval SECONDS # Seconds between health checks, default 10s
182+
--health-check-timeout SECONDS # Health check connection timeout, default 5s
183+
--health-check-initial-delay SECONDS # Initial delay on new server registration before starting health checks, default 20s
184+
--health-fail NUM_KO_RESPONSES_THRESHOLD # Number of failed health checks before marking server as down, default 3
185+
--health-ok NUM_OK_RESPONSES_THRESHOLD # Number of successful health checks before marking server as healthy, default 2
186+
[--sticky-sessions true/false] # Enable sticky sessions
187+
[--sticky-method [IP|AppCookie|LBCookie] ] # Sticky session method
188+
[--cookie-name NAME] # Name of the application cookie to use for sticky sessions
189+
```
190+
Example:
191+
```bash
192+
continuity pool update http://my-app.domain.com --health-check-interval 20 --health-fail 5
193+
```
134194
### Delete a pool
195+
```bash
196+
continuity pool delete POOL_HOSTNAME # Pool hostname to delete
197+
```
135198

136199
## Server Usage
137200

138201
### Start the server
202+
If you are using the docker image, you can start the server as shown in the [Docker installation section](#docker).
203+
204+
If you have installed the .deb or .rpm package, the server will be started automatically as a systemd service and you can manage it via systemctl:
205+
206+
```bash
207+
sudo systemctl [start/stop/restart] continuity-server
208+
```
209+
210+
if you have installed the statically linked binary or built from source, you can start the server with:
211+
212+
```bash
213+
./continuity-server -config /path/to/config.yaml
214+
```
215+
If -config is not specified, the server will look for a config.yaml file in the current directory.
216+
139217
### Configuration file auto update
140-
### View server logs
218+
219+
Every configuration update made via the CLI client or RESTful API is automatically persisted to the configuration file specified when starting the server.
220+
Please note that the file is overwritten on every change, so if you are manually editing the file don't use the CLI / API at the same time to avoid losing changes.
221+
222+
### View server logs
223+
224+
The server will print logs to stdout, so if you are running it via docker you can view the logs with:
225+
226+
```bash
227+
docker logs -f <container_id>
228+
```
229+
If you are running the server as a systemd service, you can view the logs with:
230+
231+
```bash
232+
sudo journalctl -u continuity-server -f
233+
```
234+
If you are running the server manually, the logs will be printed to the terminal and is up to you to redirect them to a file:
235+
236+
```bash
237+
./continuity-server -config /path/to/config.yaml >> /path/to/log/continuity-server.log 2>&1 &
238+
```

0 commit comments

Comments
 (0)