Flo uses a custom binary protocol for client-server communication on port 9000. The protocol supports TLV (Type-Length-Value) encoding for efficiency and zero-copy parsing.
Open a per-shard transaction (returns txn_id + pinned partition hash)
kv_commit_txn
0x111
Commit a transaction atomically (returns commit_index + op_count)
kv_rollback_txn
0x112
Discard a transaction (idempotent)
kv_txn_response
0x119
Reply envelope for ops executed inside a transaction
Response opcodes occupy 0x106–0x10A and 0x116–0x118. CAS is expressed as a TLV option on kv_put, not a separate opcode. Per-shard transactions (see Transactions) are scoped to a single partition and carry the open txn_id via the txn_id TLV option (tag 0x09, u64 LE) on subsequent KV ops.
Flo also accepts Redis RESP protocol on the same port. The Acceptor detects RESP by the leading character (*, $, +, -, :). RESP commands are translated to Flo operations:
RESP Command
Flo Operation
SET key value [EX sec] [NX] [XX]
kv_put
GET key
kv_get
DEL key
kv_delete
EXISTS key
kv_exists
INCR key / INCRBY key n / DECR key
kv_incr
EXPIRE key sec
kv_touch
PERSIST key
kv_persist
JSON.GET key [path]
kv_json_get
JSON.SET key path value
kv_json_set
JSON.DEL key [path]
kv_json_del
SCAN cursor MATCH pattern
kv_scan
LPUSH queue value
queue_enqueue
RPOP queue
queue_dequeue
XADD stream * field value
stream_append
XREAD COUNT n STREAMS stream id
stream_read
This allows Redis clients (redis-cli, ioredis, redis-py, go-redis, RedisInsight, etc.) to connect to Flo without modification for the operations above. See Redis compatibility for the full mapping and known semantic differences.