← Back to homepage

Getting Started

Install Ferrosa and run a single-node instance in minutes. Everything you need to connect existing CQL drivers and start querying.

Beta: Ferrosa is currently in beta. APIs and configuration may change between releases. Not yet recommended for production workloads without thorough testing.

On this page

Installation

Coming Soon: Ferrosa is under active development. Binary packages are not yet available for download. Check back for release announcements.

Run Ferrosa

Minimal startup

# Start with defaults — CQL on :9042, web console on :9090
./target/release/ferrosa

With graph engine enabled

FERROSA_GRAPH_ENABLED=true ./target/release/ferrosa

Custom ports and auth disabled (development)

FERROSA_CQL_BIND=127.0.0.1:9042 \
FERROSA_WEB_BIND=127.0.0.1:9090 \
FERROSA_AUTH_DISABLED=true \
FERROSA_GRAPH_ENABLED=true \
./target/release/ferrosa
Note: Ferrosa starts in standalone mode by default. Two-node pair mode is available via FERROSA_SEED configuration. Full cluster mode (3+ nodes) uses Raft consensus and a Murmur3 token ring — set FERROSA_CLUSTER_MODE=cluster.

Default ports

ServicePortProtocol
CQL Server9042CQL native protocol v5
Web Console9090HTTP (REST API + static UI + WebSocket)
Graph HTTP7474HTTP/JSON (Cypher queries)
Prometheus Metrics9090/metricsHTTP (text exposition)
Internode (cluster)7000Custom binary protocol

Connect a CQL Driver

Ferrosa speaks CQL protocol v5 — the same wire protocol as Apache Cassandra. Any standard CQL driver works unchanged.

Python

from cassandra.cluster import Cluster

cluster = Cluster(['127.0.0.1'])
session = cluster.connect()

# Create a keyspace
session.execute("""
    CREATE KEYSPACE demo WITH replication = {
        'class': 'SimpleStrategy',
        'replication_factor': 1
    }
""")

# Create a table
session.execute("""
    CREATE TABLE demo.users (
        user_id uuid PRIMARY KEY,
        name text,
        email text
    )
""")

# Insert and query
session.execute("""
    INSERT INTO demo.users (user_id, name, email)
    VALUES (uuid(), 'Alice', 'alice@example.com')
""")

rows = session.execute("SELECT * FROM demo.users")
for row in rows:
    print(row.name, row.email)

Java

// Same DataStax Java driver — just change the contact point
CqlSession session = CqlSession.builder()
    .addContactPoint(new InetSocketAddress("127.0.0.1", 9042))
    .withLocalDatacenter("datacenter1")
    .build();

ResultSet rs = session.execute("SELECT * FROM demo.users");

Go

cluster := gocql.NewCluster("127.0.0.1")
session, _ := cluster.CreateSession()
defer session.Close()

var name, email string
session.Query("SELECT name, email FROM demo.users LIMIT 1").Scan(&name, &email)

cqlsh

# Standard cqlsh connects directly
cqlsh 127.0.0.1 9042

Configuration Reference

Ferrosa is configured via environment variables. All are optional with sensible defaults.

Core

VariableDefaultDescription
FERROSA_CQL_BIND0.0.0.0:9042CQL server bind address
FERROSA_WEB_BIND0.0.0.0:9090Web console bind address
FERROSA_AUTH_DISABLEDfalseDisable SASL authentication
FERROSA_GRAPH_ENABLEDfalseEnable graph engine + HTTP endpoint
RUST_LOGinfoTracing filter (e.g. debug, ferrosa_cql=trace)

Cluster (ferrosa-net / ferrosa-cluster)

VariableDefaultDescription
FERROSA_CLUSTER_NAMEferrosaCluster name (must match across nodes)
FERROSA_CLUSTER_MODEstandaloneCluster mode: standalone, pair, or cluster
FERROSA_SEEDComma-separated seed addresses
FERROSA_INTERNODE_BIND0.0.0.0:7000Internode protocol bind address
FERROSA_INTERNODE_BROADCASTAddress other nodes use to reach this node
FERROSA_INTERNODE_PSKPre-shared key for internode auth (HMAC-SHA256)
FERROSA_DATA_CENTERdc1Data center name
FERROSA_RACKrack1Rack name within the data center
FERROSA_NUM_TOKENS256Number of tokens on the ring
FERROSA_DEFAULT_CLQUORUMDefault consistency level
FERROSA_HEARTBEAT_INTERVAL_MS1000Heartbeat interval between peers
FERROSA_HEARTBEAT_TIMEOUT_MS5000Timeout before marking a peer as down
FERROSA_MAX_INTERNODE_CONNECTIONS64Max concurrent internode connections
FERROSA_AUTO_JOINtrueAutomatically join the ring on startup (dev mode)
FERROSA_HINTED_HANDOFF_MAX_MB1024Max disk space for hinted handoff per peer (MB)

Storage

VariableDefaultDescription
FERROSA_DATA_DIR/var/lib/ferrosaLocal data directory for SSTables and commit log
FERROSA_CACHE_MAX_BYTES10737418240Local LRU cache size (10 GB)
FERROSA_FLUSH_THRESHOLD_BYTES67108864Memtable flush threshold (64 MB)
FERROSA_S3_ENDPOINTS3-compatible endpoint URL
FERROSA_S3_BUCKETS3 bucket for durable storage
FERROSA_S3_REGIONus-east-1AWS region for S3
FERROSA_S3_ACCESS_KEY_IDAccess key (falls back to instance profile)
FERROSA_S3_SECRET_ACCESS_KEYSecret access key
FERROSA_S3_ALLOW_HTTPfalseAllow non-TLS for local dev (MinIO)
FERROSA_S3_PREFIXKey prefix for multi-tenant separation
FERROSA_S3_UPLOAD_QUEUE_DEPTH16Upload backpressure queue depth

Compaction (STCS)

VariableDefaultDescription
FERROSA_COMPACTION_MIN_THRESHOLD4Min SSTables to trigger compaction
FERROSA_COMPACTION_MAX_THRESHOLD32Max SSTables per compaction task
FERROSA_COMPACTION_BUCKET_LOW0.5Lower size ratio for bucket membership
FERROSA_COMPACTION_BUCKET_HIGH1.5Upper size ratio for bucket membership

CLI Tools

ferrosa-ctl

Admin CLI for querying and monitoring a running Ferrosa node.

# Run a CQL query
ferrosa-ctl query "SELECT * FROM demo.users"

# Describe schema
ferrosa-ctl describe

# Show Prometheus metrics
ferrosa-ctl metrics

# Node health status
ferrosa-ctl status

# Active CQL connections
ferrosa-ctl connections --sort client_addr

# Currently running queries (long-running only)
ferrosa-ctl queries --long-running

# Storage engine stats
ferrosa-ctl storage

# Live TUI dashboard (ratatui)
ferrosa-ctl monitor

# Cluster management
ferrosa-ctl add-node 10.0.0.5:7000        # Pre-approve a node for cluster join
ferrosa-ctl decommission 10.0.0.3:7000   # Gracefully remove a node
ferrosa-ctl ring                          # Show token ring distribution
ferrosa-ctl rebalance                     # Trigger token rebalancing

The monitor command launches a terminal dashboard with 5 panels showing connections, active queries, storage stats, and more. Navigate with arrow keys, refresh is automatic. Connect to a specific host with --host 10.0.0.1:9042.

Prometheus metrics: The /metrics endpoint is available on the web console port (default 9090) without authentication. Scrape it directly from Prometheus or any compatible monitoring system.

Architecture Overview

Ferrosa is composed of 12 independent Rust crates that can be used together or embedded individually.

ferrosa-common

Shared types: Token, PartitionKey, DecoratedKey, CellValue, Murmur3 partitioner.

ferrosa-sstable

Read/write BTI SSTables. On-disk trie, Bloom filter, LZ4/Zstd compression.

ferrosa-storage

Memtable, commit log with CDC, STCS compaction, S3 upload manager, local LRU cache.

ferrosa-schema

Schema registry with ArcSwap, RBAC auth, column-level permissions, audit logging.

ferrosa-index

Secondary index framework: B-tree, hash, composite, phonetic, vector (HNSW + IVFFlat). Async builds, staleness tracking.

ferrosa-cql

CQL v5 framing, LL(2) parser, prepared cache, LZ4/Snappy compression, SUBSCRIBE.

ferrosa-udf

WebAssembly UDF executor: WIT contract, Wasmtime sandbox, per-function CPU/memory limits. In development.

ferrosa-graph

Cypher parser, logical/physical planner, expand executor, HTTP/JSON endpoint.

ferrosa-net

Internode protocol: 3 priority lanes, PSK handshake, RPC, heartbeat failure detection.

ferrosa-cluster

Pair mode HA, Raft consensus (openraft + sled), token ring, coordinator with tunable CL.

ferrosa-ctl

CLI admin tool: query, describe, metrics, monitor (ratatui TUI dashboard).

ferrosa (binary)

Composes all crates. CQL on :9042, graph on :7474, web console on :9090 (auth + WebSocket).

Operational Notes

S3 Storage Resilience

When S3 is configured as the durable backend, Ferrosa writes asynchronously to S3 via an upload queue. If S3 becomes temporarily unreachable:

Data loss window: If local disk is lost while S3 is unreachable, data written since the last successful S3 upload may be lost. For production deployments, monitor the S3 upload queue depth and alert on sustained failures.

Multi-Node Cluster (Experimental)

Three-node cluster mode (FERROSA_CLUSTER_MODE=cluster) uses Raft consensus for metadata and tunable consistency for data. Current limitations:

Beta: Multi-node cluster mode is experimental. For production HA, two-node pair mode with automatic failover is the recommended configuration.

For the full architecture spec, see the the project repository.

What's Next

Examples & Tutorials →

Step-by-step walkthroughs for IoT, analytics, e-commerce, and 10 more use cases — with runnable CQL scripts.

CQL Compatibility →

Full reference of supported CQL statements, types, and functions.

Migration Guide →

Move from Apache Cassandra to Ferrosa without rewriting your application.