Skip to content

proxy.flexfs

proxy.flexfs is a CDN-like block caching server that sits between mount clients and object storage. Multiple proxy servers form a proxy group. Mount clients distribute blocks across group members using rendezvous hashing and select groups based on RTT-based latency measurements.

SubcommandDescription
deinit credsRemove the credentials file
deinit systemdRemove the systemd service unit
init credsInitialize the credentials file
init systemdCreate and enable a systemd service unit
licensePrint license information
startStart the proxy server
versionPrint the build version
Terminal window
proxy.flexfs start [flags]
FlagTypeDefaultDescription
--credsFilestring~/.flexfs/proxy/credsCredentials file path
FlagTypeDefaultDescriptionVisibility
--bindAddrstring0.0.0.0:443Address and port to bindPublic
--blockPassstringBlock storage password (overrides creds file)Internal
--blockUserstringBlock storage username (overrides creds file)Internal
--bufferSizeuint321048576I/O buffer sizeInternal
--dbFolderstring~/.flexfs/proxy/dataDatabase folder pathPublic
--dbMemCapacitystring10%Database memory cache capacity (e.g. 5%, 64M)Internal
--diskFolderstring/cacheOn-disk block cache folder pathPublic
--diskQuotastring90%On-disk block cache capacity (e.g. 5%, 64M)Public
--maxBopsuint320 (auto)Maximum number of active parallel block operationsInternal
--minDiskAvailstring1GMinimum available space required on the database folder filesystem (e.g. 2%, 512M; 0 disables)Internal
--noSSLboolfalseDisable SSL for the REST APIPublic
--noWritebackboolfalseDisable writeback to persistent storageInternal
--pprofboolfalseEnable pprof profilerInternal
--pprofPortint6064Pprof server portInternal
--sseboolfalseEnable S3 server-side encryption (AES256)Internal
--sslCertstring~/.flexfs/ssl/certSSL certificate file pathPublic
--sslKeystring~/.flexfs/ssl/keySSL private key file pathPublic
--syncboolfalseFsync dirty block writes for full crash durabilityPublic
--verbose, -vboolfalseEnable verbose loggingPublic
--writebackActiveuint320 (auto)Maximum number of active parallel writeback operationsInternal
--writebackDelayuint320Milliseconds each writeback should sleepInternal

When --maxBops is left at 0, the proxy computes a default based on the host’s CPU count. --writebackActive defaults to the computed --maxBops value.

The proxy tracks its cached blocks in a database under --dbFolder, which cannot be written safely on a filesystem that has run out of space. The server therefore guards that filesystem:

  • On startup, it refuses to start if the available space is already below --minDiskAvail.
  • While running, it re-checks every minute and shuts down gracefully as soon as available space drops below --minDiskAvail. Both events are logged, naming the folder and the space available.

The block cache under --diskFolder is bounded separately by --diskQuota, so this guard is about the database folder; when both live on the same filesystem, it covers them together. Watch flexfs_proxy_db_folder_disk_available_bytes to catch this well before it happens; see Alerting. Setting --minDiskAvail to 0 disables both checks.

Terminal window
proxy.flexfs init creds [flags]

Initializes a credentials file for the proxy server with block storage credentials.

FlagTypeDefaultDescription
--blockPassstring""Block storage password
--blockUserstring""Block storage username
--forceboolfalseOverwrite existing creds file
Terminal window
sudo proxy.flexfs init systemd [flags]

Creates and enables a systemd service unit (flexfs-proxy.service) for the proxy server. Requires root.

FlagTypeDefaultDescription
--forceboolfalseOverwrite existing systemd unit file
--nowboolfalseStart the service immediately after enabling
--startFlagsstring""Additional flags to pass to the start command
Terminal window
proxy.flexfs deinit creds [flags]

Removes the credentials file for the proxy server. If the credentials file is referenced by a systemd unit, the command refuses unless --force is passed, in which case it removes the references too.

FlagTypeDefaultDescription
--forceboolfalseRemove creds even if referenced by systemd (removes references too)
Terminal window
sudo proxy.flexfs deinit systemd

Removes the systemd service unit (flexfs-proxy.service) for the proxy server. Requires root.