mirror of
https://github.com/sadoyan/aralez.git
synced 2026-11-24 21:59:07 +08:00
New cache types, improved main.yaml
This commit is contained in:
+41
-35
@@ -1,35 +1,41 @@
|
||||
# Main configuration file, applied on startup
|
||||
threads: 12 # Number of daemon threads default setting
|
||||
runuser: aralez # Username for running aralez after dropping root privileges, requires program to start as root
|
||||
rungroup: aralez # Group for running aralez after dropping root privileges, requires program to start as root
|
||||
upstream_keepalive_pool_size: 500 # Pool size for upstream keepalive connections
|
||||
pid_file: /tmp/aralez.pid # Path to PID file
|
||||
#error_log: /tmp/aralez_err.log # Path to error log
|
||||
upgrade_sock: /tmp/aralez.sock # Path to socket file
|
||||
cache_enabled: true # Optional. Disabled by default
|
||||
cache_storage: memory # memory | redis://host:port . Optional Defaults to memory works with Redis, Valkey, Dragonfly (requires redis:// prefix)
|
||||
cache_size_mb: 50 # Optional. Set internal cache with size in megabytes of value. Defaults to 50Mb if cache_enabled: true
|
||||
cache_ttl: 60 # Optional. Set Default TTL in seconds for cached items, works if cache control headers are not set via upstream. Defaults to 60 if cache_enabled: true
|
||||
cache_item_max_size: 5 # Optional. Set maximum size for cached items in megabytes. Defaults to 0 , no max size.
|
||||
config_api_enabled: true # Boolean to enable/disable remote config push capability.
|
||||
config_address: 127.0.0.1:3000 # HTTP API address for pushing upstreams.yaml from remote location
|
||||
proxy_address_http: 0.0.0.0:80 # Proxy HTTP bind address
|
||||
proxy_address_tls: 0.0.0.0:443 # Optional, Proxy TLS bind address
|
||||
proxy_configs: /opt/aralez/etc # Mandatory if proxy_address_tls set, should contain a certificate and key files strictly in a format {NAME}.crt, {NAME}.key.
|
||||
proxy_tls_grade: high # Grade of TLS suite for proxy (high, medium, unsafe), matching grades of Qualys SSL Labs
|
||||
upstreams_conf: /opt/aralez/etc/upstreams.yaml # the location of upstreams file
|
||||
file_server_folder: /opt/aralez/public # Optional, local folder to serve
|
||||
file_server_address: 127.0.0.1:3002 # Optional, Local address for file server. Can set as upstream for public access.
|
||||
log_level: info # 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.
|
||||
log_pattern: "{d(%Y-%m-%d %H:%M:%S)} {h({l})} {t} - {m} {n}" # Optional log pattern, defaults to "{d(%Y-%m-%d %H:%M:%S)} {l} - {m}{n}"
|
||||
access_log: error # all, error, (Off by default)
|
||||
hc_method: HEAD # Healthcheck method (HEAD, GET, POST are supported) UPPERCASE
|
||||
hc_interval: 2 #Interval for health checks in seconds
|
||||
tcp_keepalive_idle: 60 # Seconds of inactivity before the kernel starts sending keepalive probes to a downstream client
|
||||
tcp_keepalive_interval: 10 # Seconds between individual keepalive probes if the client does not respond
|
||||
tcp_keepalive_count: 5 # Number of unanswered probes before the kernel declares the connection dead and closes it
|
||||
#cluster_member: master | worker Optional. Enables cluster mode, Sets node type to master or worker. Disabled by default
|
||||
#worker_nodes: http://127.0.0.1:8000, http://127.0.0.1:4000 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 Optional. Enable ACME DNS-01 challenge, sets DNS provider. ONly coudflare, route53, digitalocean at the moment.
|
||||
threads: 12 # Number of daemon worker threads assigned to proxy operations
|
||||
runuser: aralez # Username used to drop root privileges after binding to low ports; requires the process to start as root
|
||||
rungroup: aralez # Group used to drop root privileges after binding to low ports; requires the process to start as root
|
||||
cache: # Optional block. If omitted entirely, caching is disabled.
|
||||
storage: "hybrid" # Storage backend: "memory", "hybrid", or "redis://host:port" (compatible with Redis, Valkey, Dragonfly). Defaults to "memory".
|
||||
mem_size_mb: 64 # Optional. Memory cache tier limit in megabytes. Defaults to 64.
|
||||
file_size_mb: 128 # Optional. Disk cache tier limit in megabytes (hybrid mode). Defaults to 512.
|
||||
file_path: "/tmp/cache" # Optional. Directory path for the disk cache tier. Defaults to "/tmp/aralez_cache".
|
||||
item_max_size: 5 # Optional. Maximum allowed size for a single cached item in megabytes. Defaults to 5.
|
||||
flush_interval: 60 # Optional. Interval in seconds for flushing memory cache states to disk (hybrid mode). Defaults to 60.
|
||||
ttl: 300 # Optional. Default Time-To-Live (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 # File system 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 or disable remote runtime configuration push capabilities
|
||||
config_address: 0.0.0.0:3000 # HTTP API bind address for remotely pushing upstreams.yaml updates
|
||||
proxy_address_http: 0.0.0.0:80 # Primary bind address and port for incoming plain-text HTTP proxy traffic
|
||||
proxy_address_tls: 0.0.0.0:443 # Optional bind address and port for incoming secure TLS proxy traffic
|
||||
proxy_configs: /etc/aralez # Mandatory if proxy_address_tls is set; directory must contain certificate and key files strictly following the naming format {NAME}.crt and {NAME}.key
|
||||
upstreams_conf: /etc/aralez/upstreams.yaml # File system path pointing to the upstream service routing definitions
|
||||
proxy_tls_grade: high # Security grade of the TLS cipher suite (options: high, medium, unsafe), matching Qualys SSL Labs rating tiers
|
||||
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 the static file server (can be routed as an upstream for public access)
|
||||
log_level: info # Global logging verbosity threshold (options: info, warn, error, debug, trace, off)
|
||||
access_log: all # Access logging mode filter (options: all, error; comment out entirely to disable access logs)
|
||||
log_pattern: "{d(%Y-%m-%d %H:%M:%S)} {h({l})} - {t} - {m} {n}" # Optional custom log message pattern format
|
||||
#log_file: /tmp/aralez.log, 20, 5, compress # Optional file logging configuration: file path, max file size in megabytes, number of rotated logs to retain, and compression flag (comma-separated). Defaults to stdout if commented.
|
||||
#log_structured: elasticsearch # Optional structured logging sink target format (e.g., elasticsearch)
|
||||
acme_dns_provider: cloudflare # DNS provider API integration used for automated ACME Let's Encrypt DNS-01 challenges
|
||||
hc_method: HEAD # HTTP health check method verb (options: HEAD, GET, POST; must be uppercase)
|
||||
hc_interval: 5 # Time interval in seconds between periodic upstream health checks
|
||||
#cluster_member: master # Designates this node's operational role within a multi-node cluster configuration (e.g., master)
|
||||
#cluster_member: worker # Designates this node's operational role within a multi-node cluster configuration (e.g., worker)
|
||||
#worker_nodes: http://127.0.0.1:8000, http://127.0.0.1:4000 # Comma-separated list of peer worker node management endpoints for cluster synchronization
|
||||
tcp: # Optional advanced Linux TCP socket parameters. Do not alter unless tuned for specific network environments. Values shown act as operational defaults.
|
||||
tcp_keepalive_idle: 30 # Seconds of socket inactivity before the kernel initiates TCP keepalive probes to a downstream client
|
||||
tcp_keepalive_interval: 10 # Seconds of delay between individual keepalive probes if the client fails to respond
|
||||
tcp_keepalive_count: 5 # Maximum number of unanswered probes before the kernel terminates the dead connection
|
||||
so_reuseport: true # Enables SO_REUSEPORT to allow multiple worker threads to bind the port, evenly distributing connection queues without lock contention
|
||||
tcp_fastopen: 4096 # Enables TCP Fast Open with the specified SYN-backlog queue size (set to 0 if unsupported by the host kernel or container)
|
||||
|
||||
Reference in New Issue
Block a user