New cache types, improved main.yaml

This commit is contained in:
Ara Sadoyan
2026-10-30 14:19:27 +01:00
parent e9143e8f99
commit 6beb5fe234
12 changed files with 770 additions and 137 deletions
+42 -36
View File
@@ -60,42 +60,48 @@ Built on Rust, on top of **Cloudflare’s Pingora engine**, **Aralez** delivers
### `main.yaml`
| Key | Example Value | Description |
|----------------------------------|-------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **threads** | `12` | Number of running daemon threads. Optional, defaults to 1 |
| **runuser** | `aralez` | Optional. Username for running aralez after dropping root privileges (requires launch as root) |
| **rungroup** | `aralez` | Optional. Group for running aralez after dropping root privileges (requires launch as root) |
| **daemon** | `false` | Run in background (boolean) |
| **upstream_keepalive_pool_size** | `500` | Pool size for upstream keepalive connections |
| **pid_file** | `/tmp/aralez.pid` | Path to PID file |
| **upgrade_sock** | `/tmp/aralez.sock` | Path to socket file |
| **config_address** | `0.0.0.0:3000` | HTTP API address for pushing upstreams.yaml from remote location |
| **proxy_tls_grade** | `high, medium, unsafe` | Grade of TLS ciphers. `high` matches Qualys SSL Labs A+ (defaults to `medium`) |
| **proxy_address_http** | `0.0.0.0:6193` | Aralez HTTP bind address |
| **proxy_address_tls** | `0.0.0.0:6194` | Aralez HTTPS bind address (Optional) |
| **proxy_configs** | `/etc/aralez/` | Direcotry containing configuration files, must be writeable by user `aralez` |
| **upstreams_conf** | `/etc/aralez/upstreams.yaml` | Location of the upstreams file |
| **access_log** | `access` | Configure access logging. Values: `access, error` |
| **log_level** | `info` | Log level: `info`, `warn`, `error`, `debug`, `trace`, `off` |
| **log_file** | `/tmp/aralez.log, 20, 5, compress` | Optional, the location of log file, file size in megabytes, number of log files to keep, compress files .valueas are separated by comma. Defaults to None, 100, 5, No |
| **log_pattern** | `{d(%Y-%m-%d %H:%M:%S)} {l} - {m}{n}` | Optional log pattern, defaults to `{d(%Y-%m-%d %H:%M:%S)} {l} - {m}{n}`. See log4rs official [documentation](https://docs.rs/log4rs/latest/log4rs/encode/pattern/struct.PatternEncoderDeserializer.html#configuration) |
| **hc_method** | `HEAD` | Healthcheck method: HEAD, GET, POST (UPPERCASE) |
| **hc_interval** | `2` | Interval for health checks in seconds |
| **file_server_folder** | `/some/local/folder` | Optional. Local folder to serve |
| **file_server_address** | `127.0.0.1:3002` | Optional. Local address for file server |
| **config_api_enabled** | `true` | Enable/disable remote config push capability |
| **cache_size_mb** | `50` | Optional. Enable internal cache with size in megabytes of value. Cache is entirely disabled when this line is commented out. |
| **cache_enabled** | `bool` | Optional. Disabled by default |
| **cache_storage** | `memory, redis://host:port` | Optional Defaults to memory works with Redis, Valkey, Dragonfly (requires redis:// prefix) |
| **cache_item_max_size** | `5` | Optional. Set maximum size for cached items in megabytes. Defaults to 0 , no max size. |
| **cache_ttl** | `60` | Optional. Set internal cache with size in megabytes of value. Defaults to 50Mb if cache_enabled: true |
| **tcp_keepalive_idle** | `60` | Seconds of inactivity before the kernel starts sending keepalive probes to a downstream client. Defaults to 60 |
| **tcp_keepalive_interval** | `10` | Seconds between individual keepalive probes if the client does not respond. Defaults to 10 |
| **tcp_keepalive_count** | `5` | Number of unanswered probes before the kernel declares the connection dead and closes it. Defaults to 5 |
| **cluster_member** | `master, worker` | Optional. Enables cluster mode, Sets node type to master or worker. Disabled by default |
| **worker_nodes** | `http(s)://host:port,http(s)://host:port` | Required is if cluster_member: master. Comma separated list of worker nodes http(s)://host:port |
| **log_structured** | `elasticsearch` | Optional. Enables structured logging and sets backend type. Only elasticsearch et the moment. |
| **acme_dns_provider** | `cloudflare, route53, digitalocean, etc` | Optional. Enable ACME DNS-01 challenge, sets DNS provider. ONly coudflare, route53, digitalocean at the moment. |
| Key | Example Value | Description |
|----------------------------------|---------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
| **threads** | `12` | Number of worker threads assigned to proxy operations. Defaults to `1`. |
| **runuser** | `aralez` | Optional. Username to run as after dropping root privileges (requires launch as root). |
| **rungroup** | `aralez` | Optional. Group to run as after dropping root privileges (requires launch as root). |
| **cache** | Optional Block | If omitted entirely, caching is disabled. |
| **cache.storage** | `hybrid` | Storage backend: `"memory"`, `"hybrid"`, or `"redis://host:port"`. Defaults to `"memory"`. |
| **cache.mem_size_mb** | `64` | Optional. Memory cache tier limit in megabytes. Defaults to `64`. |
| **cache.file_size_mb** | `128` | Optional. Disk cache tier limit in megabytes (hybrid mode). Defaults to `512`. |
| **cache.file_path** | `/tmp/cache` | Optional. Directory path for the disk cache tier. Defaults to `/tmp/aralez_cache`. |
| **cache.item_max_size** | `5` | Optional. Maximum allowed size for a single cached item in megabytes. Defaults to `5`. |
| **cache.flush_interval** | `60` | Optional. Interval in seconds to flush memory cache states to disk (hybrid mode). Defaults to `60`. |
| **cache.ttl** | `300` | Optional. Default TTL in seconds used when upstream Cache-Control headers are absent. Defaults to `300`. |
| **upstream_keepalive_pool_size** | `500` | Maximum number of keepalive connections pooled for upstream targets. |
| **pid_file** | `/tmp/aralez.pid` | File system path where the daemon process ID is written. |
| **error_log** | `/tmp/aralez_err.log` | Optional. File path for directing standard error log output when enabled. |
| **upgrade_sock** | `/tmp/aralez.sock` | Unix domain socket path used for zero-downtime binary upgrades and state handoffs. |
| **config_api_enabled** | `true` | Boolean toggle to enable/disable remote runtime configuration push capability. |
| **config_address** | `0.0.0.0:3000` | HTTP API bind address for pushing runtime config updates. |
| **proxy_address_http** | `0.0.0.0:6193` | Primary bind address and port for incoming plain-text HTTP proxy traffic. |
| **proxy_address_tls** | `0.0.0.0:6194` | Optional bind address and port for incoming secure TLS proxy traffic. |
| **proxy_configs** | `/etc/aralez` | Path to directory containing SSL certs and keys in format `{NAME}.crt` and `{NAME}.key`. |
| **upstreams_conf** | `/etc/aralez/upstreams.yaml` | File system path pointing to upstream service routing definitions. |
| **proxy_tls_grade** | `high` | Security grade of TLS cipher suite (`high`, `medium`, `unsafe`). `high` matches Qualys SSL Labs A+. |
| **file_server_folder** | `/opt/public` | Optional. Local file system directory to serve statically. |
| **file_server_address** | `0.0.0.0:3002` | Optional. Local bind address for static file server. |
| **log_level** | `info` | Global logging verbosity threshold (`info`, `warn`, `error`, `debug`, `trace`, `off`). |
| **access_log** | `all` | Access logging mode (`all`, `error`). Omit/comment out to disable. |
| **log_pattern** | `{d(%Y-%m-%d %H:%M:%S)} {h({l})} - {t} - {m} {n}` | Optional custom log pattern. Defaults to `{d(%Y-%m-%d %H:%M:%S)} {l} - {m}{n}`. |
| **log_file** | `/tmp/aralez.log, 20, 5, compress` | Optional file logging config: path, max size (MB), rotated files to keep, compression. |
| **log_structured** | `elasticsearch` | Optional structured logging sink target (e.g., `elasticsearch`). |
| **acme_dns_provider** | `cloudflare` | DNS provider API integration for automated ACME DNS-01 challenges (`cloudflare`, `route53`, `digitalocean`). |
| **hc_method** | `HEAD` | HTTP health check method verb (`HEAD`, `GET`, `POST` in UPPERCASE). |
| **hc_interval** | `5` | Time interval in seconds between periodic upstream health checks. |
| **cluster_member** | `master` | Optional. Operational role in multi-node cluster mode (`master`, `worker`). |
| **worker_nodes** | `http://127.0.0.1:8000, http://127.0.0.1:4000` | Required if `cluster_member: master`. Comma-separated worker management endpoints. |
| **tcp** | Optional Block | Optional advanced Linux TCP socket parameters. Do not alter unless tuned for specific network environments. Values shown act as operational defaults. |
| **tcp.tcp_keepalive_idle** | `30` | Seconds of socket inactivity before sending TCP keepalive probes. Defaults to `30`. |
| **tcp.tcp_keepalive_interval** | `10` | Seconds between individual keepalive probes if no response. Defaults to `10`. |
| **tcp.tcp_keepalive_count** | `5` | Maximum unanswered probes before declaring connection dead. Defaults to `5`. |
| **tcp.so_reuseport** | `true` | Enables `SO_REUSEPORT` for multi-worker connection distribution without lock contention. Defaults to `true`. |
| **tcp.tcp_fastopen** | `4096` | Enables TCP Fast Open backlog queue size. Set to `0` if unsupported by host kernel/container. Defaults to `4096`. |
---