# What's new in CrushBalance 27

CrushBalance 27 is a rewrite of CrushBalance. It ships as one `CrushBalance.jar` that needs only Java 25 or newer: no database, no other library and no GeoIP database file.

## The short version

- **A new product.** Its settings, its admin page and its log are new. Setting names that look like CrushBalance 11 names (`bind_ip`, `bind_port`, `host`, `port`, `weight`, `sticky`, `ping_interval`, `log_file`) mean what this documentation says ([Key reference](Key-Reference.md)).
- **A CrushBalance 11 `prefs.XML` is imported once,** as far as CrushBalance 27 has the settings: listeners, endpoints, IP restrictions, the registration, the admin port. The admin password and keystore passwords are not. [Upgrading from CrushBalance 11](Upgrading.md) lists what carries over.
- **It needs a CrushFTP 11 or newer Enterprise registration.** A CrushFTP 9 or 10 registration is refused, and no listener starts.
- **It needs Java 25 or newer.**
- **It logs to `CrushBalanceServer.log`** and never touches the CrushBalance 11 `CrushBalance.log` files.
- **The admin page is HTTPS on port 8090,** with a one-time setup token on the first start ([First-run setup](First-Run-Setup.md)).
- **Plan an outage for the upgrade.** After the jar swap, check the admin setup, the license and the imported listeners before you rely on it.

## What CrushBalance 27 offers

- **Listener modes** `tcp`, `tls`, `http` and `https`, on single ports or port ranges of up to 10,000 ports (FTP passive ranges).
- **PROXY protocol v1 and v2** toward CrushMFT, so CrushMFT sees the real client address; inbound PROXY from a load balancer in front.
- **TLS 1.3 and 1.2** from keystores (JKS, PKCS12 or JCEKS; several certificates chosen by SNI), or from a generated certificate. Keystore files are read again within 60 seconds when they change.
- **HTTP/1.1** with `CrushAuth` cookie stickiness that routes each request, forwarding headers, pipelining, WebSocket and `100-continue`.
- **Optional re-encryption to CrushMFT** (`backend_tls`), checked against the Java trust store and the host name, or pinned to the SHA-256 fingerprint of a self-signed CrushMFT certificate.
- **Balancing** by least connections, weighted round robin, or a CrushMFT metric read by the `crushftp` health probe.
- **Sticky pins that survive a restart** of the balancer.
- **IP rules** for everything, per listener and per endpoint, read exactly like CrushFTP 11's IP restrictions, with "Test an IP" and "Block this IP".
- **A browser admin page:** dashboard, live map, connections, listeners, security, logs, settings and system pages, in light and dark.
- **`/healthz`** for monitors and an optional Prometheus **`/metrics`** address with a token.
- **One `prefs.XML`** with safe saves, 50 automatic backups, encrypted passwords, and hand edits picked up within about 2 seconds.
- **Safe mode instead of a crash loop.** A damaged `prefs.XML` is never overwritten: CrushBalance keeps running with no listener bound, and the admin page offers the backups to restore.
- **`crushbalance.key`** in the install folder encrypts the passwords stored in `prefs.XML`. Back it up with the folder, and copy it when you move to another machine.

## Not in CrushBalance 27, and what to use instead

| Not in CrushBalance 27 | Use |
|---|---|
| PEM certificate files | a PKCS12 keystore (`openssl pkcs12 -export`); [Operating](Operating.md) has a certbot hook |
| HTTP/2, HTTP/3, client certificates | a `tcp` listener passes them through to CrushMFT unchanged |
| Bans, connection-rate limits and country filters at the balancer | CrushMFT applies its own to the real client address it gets through PROXY; the balancer has an optional per-client connection cap |
| TLS offload for FTP | FTPS stays end to end through `tcp` listeners |
| A separate audit log file | audit lines are in `CrushBalanceServer.log` (category `audit`) and on the [Logs](Logs.md) page |
| Installing the Windows service from the web page | `-i` and `-r` on the [command line](Command-Line.md) |

## CrushBalance 11 features that are gone

- the `threaded` relay mode, `nearby` nearest-server routing, the 302 redirect mode and the hammering auto-ban;
- a server certificate per endpoint: CrushBalance 27 ends client TLS at the listener and can encrypt again to CrushMFT with `backend_tls`;
- the old admin page and its `/loadbalancer` command API: scripts that call it stop working;
- the MaxMind databases and the OpenStreetMap map (the map now uses ipstack, see [GeoIP and the map](GeoIP.md));
- the Install and Remove Service buttons, `elevate.exe` and `CrushFTPService32.exe`;
- Java 8.

## Known limits of CrushBalance 27

- **Put the admin port behind a firewall.** The admin page runs on Java's built-in HTTPS server, which cannot refuse connections that never send anything. Let only management networks reach the admin port ([Hardening](Hardening.md#admin_allowed_ips)).
- **Windows: one service per machine,** updated from its own folder ([Install on Windows](Install-Windows.md)).
- **Memory sizing:** `-Xmx1024M` covers about 100,000 plain, about 40,000 TLS or about 30,000 re-encrypting HTTPS sessions ([Capacity and tuning](Capacity-and-Tuning.md)).
