Skip to content

Commit e61c33c

Browse files
authored
Merge pull request #490 from ByteInternet/timon/haproxyctl
Add article for hypernode-haproxyctl
2 parents f99af4a + fda9910 commit e61c33c

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

docs/hypernode-platform/cluster.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ least connections.
8585
Web traffic is terminated by NGINX, which (optionally) forwards the request to varnish, which can return a cached page or send the
8686
request to [HAProxy](https://www.haproxy.org/), which sends the request to the application servers.
8787

88+
To manage the HAProxy service, you can use our utility command `hypernode-haproxyctl`. Learn more about this command in our [hypernode-haproxyctl documentation](tools/how-to-use-hypernode-haproxyctl-tool.md).
89+
8890
### Managing NGINX
8991

9092
To add custom NGINX rules for handling specific things on the loadbalancer (like serving assets), the `loadbalancer.` prefix can be
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
myst:
3+
html_meta:
4+
description: 'With the hypernode-haproxyctl tool you can inspect and manage the
5+
HAProxy service. Learn how to use the hypernode-haproxy CLI Tool. '
6+
title: How to use the hypernode-haproxyctl CLI Tool?
7+
---
8+
9+
# How to Use the hypernode-haproxyctl CLI Tool
10+
11+
Hypernode clusters use [HAProxy](https://www.haproxy.org/) to distribute HTTP requests from the loadbalancer to the application servers. With the `hypernode-haproxyctl` CLI tool you can inspect and manage the HAProxy service.
12+
13+
## Viewing the current status
14+
15+
With the `status` subcommand, you can see the current status of HAProxy and its backends.
16+
17+
```console
18+
app@abcdef-examplelb-magweb-tbbm ~ $ hypernode-haproxyctl status
19+
HAProxy v2.6.12-1+deb12u3 (released: 2025/10/03, uptime: 98d 22h33m56s)
20+
FRONTEND (OPEN): request rate(160), session rate(7), conn rate(7)
21+
exampleapp1 (UP): request rate(0), session rate(25), conn rate(0)
22+
exampleapp2 (UP): request rate(0), session rate(32), conn rate(0)
23+
exampleapp3 (UP): request rate(0), session rate(28), conn rate(0)
24+
exampleapp4 (UP): request rate(0), session rate(38), conn rate(0)
25+
exampleapp5 (UP): request rate(0), session rate(35), conn rate(0)
26+
BACKEND (UP): request rate(0), session rate(160), conn rate(0)
27+
```
28+
29+
The output has three sections:
30+
31+
- **FRONTEND**: The internet-facing entry point. Shows how many requests and connections are coming in per second.
32+
- **exampleapp1-N**: Your individual app servers. Common states are `UP`, `DOWN` and `DRAIN`.
33+
- **BACKEND**: The combined pool of all app servers. `UP` means at least one server is healthy.
34+
35+
If a server shows `DOWN` unexpectedly, it likely needs attention. `DRAIN` and `MAINTENANCE` are usually intentional states used during maintenance.
36+
37+
## Managing backends
38+
39+
When troubleshooting or performing maintenance on an app server, you can use the `drain` subcommand to gracefully remove it from rotation:
40+
41+
```console
42+
app@abcdef-examplelb-magweb-tbbm ~ $ hypernode-haproxyctl drain exampleapp1
43+
```
44+
45+
The `drain` command allows existing connections to finish while preventing new traffic from being sent to the server. This is ideal for performing maintenance without disrupting active users.
46+
47+
Once maintenance is complete, you can use the `enable` subcommand to bring the server back into rotation:
48+
49+
```console
50+
app@abcdef-examplelb-magweb-tbbm ~ $ hypernode-haproxyctl enable exampleapp1
51+
```

0 commit comments

Comments
 (0)