The Complete Production SOP: How to Deploy and Run ScyllaDB High-Throughput CQL Sharded NoSQL in Autonomous AI Agents
Production SOP to install and run ScyllaDB High-Throughput CQL Sharded NoSQL in Codex, Claude Code, Cursor, and Windsurf. Schema design, TWCS, and driver setup.
Technical Overview & Architectural Context
Autonomous coding agents frequently default to generic relational or naive Cassandra modeling patterns when handling high-throughput write workloads. In ScyllaDB's shared-nothing, thread-per-core C++ architecture, common agent errors—such as choosing high-cardinality unbounded partitions, using Size-Tiered Compaction Strategy (STCS) for append-only time-series data, or utilizing generic round-robin Cassandra drivers—result in massive cross-shard latency penalties, write amplification, and severe CPU starvation under multi-million write workloads. The 'scylladb-cql-sharded-nosql' skill establishes rigorous deterministic boundaries for coding agents. It enforces partitioned composite primary keys bounded by discrete time buckets, applies optimal Time Window Compaction Strategy (TWCS) parameters to eliminate SSTable read degradation, mandates shard-aware connection pooling, and binds validation directly to system-level metrics like per-core queue depths and IO scheduler saturation.
Prerequisites & Environment Requirements
Verified Search Intents & Long-Tail Queries Solved
This operational tutorial is engineered to provide deterministic solutions for these developer search queries:
Step-by-Step Execution Playbook
Local Environment Setup & SKILL.md Mounting
Mount the ScyllaDB CQL sharded skill into your agent's local runtime skill tree.
Create the targeted agent skills directory within your workspace or global home directory. Autonomous runtimes parse the YAML frontmatter of SKILL.md on session startup to index triggers like 'design scylladb cql schema' and 'configure twcs compaction scylladb'. Mounting this file allows Cursor, Windsurf, Claude Code, or Codex to load the operational bounds deterministically.
mkdir -p .agents/skills/scylladb-cql-sharded-nosql && curl -fsSL https://askills.dev/api/skills/scylladb-cql-sharded-nosql/raw -o .agents/skills/scylladb-cql-sharded-nosql/SKILL.md---
name: "scylladb-cql-sharded-nosql"
description: "Architect ultra-low latency, multi-million write workloads using C++ based ScyllaDB."
metadata:
author: "ScyllaDB"
version: "1.0.0"
runtime_compatibility:
- "codex"
- "claude-code"
- "cursor"
- "windsurf"
triggers:
- "design scylladb cql schema"
- "configure twcs compaction scylladb"
- "use shard-aware scylla driver"
permissions:
fs_read: true
fs_write: "workspace"
shell_exec: false
net_access: false
---
# ScyllaDB High-Throughput CQL Sharded NoSQL
Enforces deterministic partition budgeting (<100MB per partition), TWCS window alignments, and direct-to-CPU-core shard pooling across Go, Rust, and Node.js.Setting fs_write to 'workspace' and shell_exec to false protects production databases while keeping agent generation strictly within local CQL migrations and driver client modules.
In Claude Code CLI and Codex, ensure the skill path matches the registered config directory; unindexed SKILL.md paths will cause the model to fallback on generic Cassandra guidance.
Dependency Validation & Shard-Aware Driver Configuration
Configure client manifests with official shard-aware drivers rather than legacy Apache Cassandra drivers.
Standard Cassandra drivers route requests through arbitrary cluster coordinators, causing inter-node hop latency. ScyllaDB requires shard-aware drivers (e.g., scylla-driver in Node.js or gocql with Scylla extensions) that maintain active connections directly to the specific CPU core holding the partition hash.
npm install @scylladb/cassandra-driver && touch scylla-client.tsimport { Client, policies } from '@scylladb/cassandra-driver';
export const scyllaClient = new Client({
contactPoints: process.env.SCYLLA_NODES ? process.env.SCYLLA_NODES.split(',') : ['127.0.0.1'],
localDataCenter: process.env.SCYLLA_DC || 'datacenter1',
keyspace: 'telemetry_stream',
policies: {
loadBalancing: new policies.loadBalancing.TokenAwarePolicy(new policies.loadBalancing.DCAwareRoundRobinPolicy())
},
pooling: {
coreConnectionsPerHost: {
[policies.defaultProtocolOptions.defaultPort]: 1 // Scylla shard-aware driver negotiates connection per core
}
}
});Never instantiate client connection pools on every request. Direct the agent to export a shared singleton client to maintain persistent persistent TCP connections per Scylla core.
Do not pass standard Cassandra options that override shard-aware negotiation headers, as this reverts connections to non-sharded coordinator-proxy mode.
Deterministic CQL Schema Generation with TWCS
Instruct the agent to generate partition-bucketed DDL with TimeWindowCompactionStrategy.
Trigger the agent to output the complete CQL table definition using composite partition keys ((device_id, date_bucket), event_timestamp). This guarantees partitions stay under the recommended 100MB threshold and aligns SSTable lifecycles with the configured TWCS window.
CREATE KEYSPACE IF NOT EXISTS telemetry_stream
WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': 3}
AND durable_writes = true;
CREATE TABLE IF NOT EXISTS telemetry_stream.sensor_readings (
device_id uuid,
date_bucket date, -- Format: YYYY-MM-DD to avoid unbounded partition growth
event_timestamp timestamp,
metric_name text,
metric_value double,
PRIMARY KEY ((device_id, date_bucket), event_timestamp, metric_name)
)
WITH CLUSTERING ORDER BY (event_timestamp DESC, metric_name ASC)
AND compaction = {
'class': 'TimeWindowCompactionStrategy',
'compaction_window_size': '1',
'compaction_window_unit': 'DAYS',
'timestamp_resolution': 'MILLISECONDS',
'max_threshold': '32',
'unchecked_tombstone_compaction': 'true'
}
AND default_time_to_live = 2592000; -- 30-day TTL matching SSTable drop boundariesEnsure compaction_window_unit matches the default_time_to_live expiration cycle so entire SSTables can be dropped instantaneously without tombstone read degradation.
Never allow agents to use ALLOW FILTERING or secondary indexes on high-throughput ScyllaDB time-series tables.
Verification, Linting & Output Quality Gate
Run structural schema linters and connection test suites before approving agent execution.
Run validation checks verifying that the schema compiles against CQL syntax specs, partition keys are composite with finite bounds, and mock driver insertions execute with expected single-digit millisecond latency.
node -e "require('./scylla-client.ts')" && npx cql-lint migrations/*.cqlIn Cursor and Windsurf, keep a terminal split open running nodetool status and nodetool cfstats to verify data distribution across all physical nodes immediately after agent tests.
Watch out for unhandled promise rejections if the agent executes scripts before local Docker ScyllaDB containers have completed gossip initialization.
Real-World Scenario: High-Velocity IoT Telemetry Ingestion with Shard-Aware Routing
“Using the scylladb-cql-sharded-nosql skill, design scylladb cql schema for 500,000 IoT sensor writes per second with a 14-day retention. Then, generate a shard-aware Node.js client service that writes telemetry batches efficiently.”
Runtime Troubleshooting & Failure Modes
Root Cause: The agent attempted connecting with a legacy driver version that rejected Scylla native transport shard-extension negotiation parameters.
npm uninstall cassandra-driver && npm install @scylladb/cassandra-driver@latestRoot Cause: The agent constructed a CQL SELECT query querying a clustering column or non-indexed attribute without specifying the full composite partition key ((device_id, date_bucket)).
SELECT metric_name, metric_value FROM telemetry_stream.sensor_readings WHERE device_id = ? AND date_bucket = ? AND event_timestamp >= ?;Frequently Asked Questions (ScyllaDB High-Throughput CQL Sharded NoSQL SOP)
Q:Can I use ScyllaDB High-Throughput CQL Sharded NoSQL across Codex, Claude Code, and Cursor simultaneously?
Yes. The SKILL.md specification is platform-agnostic. Placing it in the configured skill folder allows Cursor, Claude Code CLI, Codex Desktop, and Windsurf to identically parse the frontmatter triggers and schema generation SOPs.
Q:How does this skill prevent partition size degradation in ScyllaDB?
The procedural rules instruct the agent to enforce compound partition keys incorporating date buckets (e.g., YYYY-MM-DD or hourly buckets). This limits single partition sizes strictly to under 100MB, preventing Seastar reactor stalls and OOM errors during cluster rebalancing.
Q:Why is a shard-aware driver necessary over standard Apache Cassandra drivers?
ScyllaDB runs an asynchronous, thread-per-core Seastar engine. Shard-aware drivers open direct connections to each CPU core's listening socket. Standard Cassandra drivers connect to an arbitrary core, forcing that core to proxy CQL packets across CPU buses, introducing lock contention and latency spikes.
Ready to equip your autonomous agent with ScyllaDB High-Throughput CQL Sharded NoSQL?
Copy the complete audited SKILL.md specification or download the 1-click zip bundle directly from our verified registry.