Cluster Architecture
On this page
Unique Design
SingleStore is a real-time hybrid transaction/analytics processing (HTAP) database designed with a distributed SQL architecture.
Clusters further enhance this distributed architecture by freeing databases from the confines of a single workload, delivering true separation of compute and storage.
Cluster Architecture
Clusters are built using the native data replication engine.
Combined with SingleStore's query code generation and Universal Storage architecture, this allows clusters to deliver extremely low latency query response, highly concurrent access and fast parallel streaming ingest while removing the need to copy data across workloads.
Implementation
Each cluster is fully isolated with its own compute, settings, and connection endpoints.
Databases can be attached to multiple clusters simultaneously using “smart attach”.
The R/W attachment writes logs/blobs to shared storage and sends logs to the R/O attached clusters asynchronously.
Attachments are created on each database, and it is possible for a cluster to have a combination of R/W and R/O attachments.
Writes made to a database from a cluster with an R/W attachment will appear on clusters with R/O attachments almost instantaneously.
All new writes to a database are typically replicated immediately, allowing clusters with R/O attachments to serve real-time workloads without waiting for data to load or going through complex ETL processes.
When sizing the cluster ensure that the selected size can accommodate the size of the working data set for that cluster's workload.
Use cases for read replicas include:
-
Offloading analytical queries from a transactional workload
-
Providing distributed read access
-
Isolating reporting workloads from production ingest
Read replicas can be promoted to read/write in failover scenarios.
Smart Attach
Smart Attach is the method by which databases can be attached to multiple clusters simultaneously in SingleStore Helios.
It is the underlying mechanism for the READ ONLY option in the ATTACH DATABASE command.
Key points:
-
Each database can have one R/W (read-write) attachment and many R/O (read-only) attachments.
-
This allows data to be shared across workloads, providing scalability and isolation.
-
The R/W attachment writes logs/blobs to shared storage and sends logs to R/O attached clusters asynchronously.
-
R/O attached clusters replay these logs, creating local blobs.
-
It is a zero-copy approach, no full data copy is needed for read-only attachments.
Following is the syntax:
ATTACH DATABASE <database-name> READ ONLY;
Limitations
-
Cross-region read replicas require Database Replication and may have higher replication latency.
-
Promoting a read-only replica to read/write will automatically detach the current writer.
Last modified: