Home / Apache Cassandra Developer Associate (DataStax) / Mock exam
Apache Cassandra Developer Associate (DataStax) Exam-style mock test

Apache Cassandra Developer Associate Practice Exams|Practice test

Full explanations Exam format Pass line 70%
33 USD One-time · lifetime access
Enroll →

Sample questions

Example1 · Cassandra Architecture & Data Distribution
A B2B SaaS company running a multi-tenant billing platform is evaluating Cassandra and asks why it has no single point of failure. Which statement best describes how Cassandra's cluster architecture achieves this?
・A dedicated coordinator server holds the master copy of all data and streams every write to the follower nodes that serve read traffic.
Incorrect. Cassandra has no master copy or follower tier; this describes a primary-replica design that Cassandra deliberately avoids to remove single points of failure.
✓Every node in the cluster is functionally identical and can accept any read or write request, with no master node coordinating the others.
Correct. Cassandra uses a masterless, peer-to-peer ring where all nodes are identical; any node can service any request, so losing a node does not disable the cluster.
・A primary node is elected by quorum vote at startup and remains the write leader until it fails and another election promotes a replacement.
Incorrect. Cassandra does not elect a write leader through quorum voting; there is no leader whose failure would require a promotion election.
・Reads are served by replica nodes while all writes must first be routed through a single config node that validates and distributes them.
Incorrect. There is no single config node that all writes must pass through; routing every write through one node would reintroduce a single point of failure.
Explanation
Cassandra's defining architectural trait is a masterless peer-to-peer ring in which every node is equal and can coordinate any request, eliminating the single point of failure inherent in primary-replica systems.
Example2 · Data Modeling for Cassandra
A B2B SaaS billing platform needs to show each tenant a list of invoices for one of their customers, always sorted by invoice date. The lead engineer is defining the first Cassandra table for this screen. Which modeling approach best fits Cassandra's methodology for this requirement?
・Normalize invoices into a single global table keyed only by invoice_id and run a secondary-index lookup on customer_id at request time
Incorrect. Global normalization with a secondary index forces a scatter-gather across nodes and does not deliver efficient per-customer reads in Cassandra.
✓Start from the known read query and build a table partitioned by (tenant_id, customer_id) with invoice_date as a clustering column
Correct. Cassandra modeling is query-first: partitioning by the tenant and customer the screen filters on, with invoice_date as a clustering column, gives a single-partition, pre-sorted read.
・Store every invoice as a row in one table and let the application sort the full result set in memory after it loads
Incorrect. Loading all invoices and sorting in the application ignores partitioning and will not scale as tenant data grows.
・Create a table keyed on invoice_date alone so that all tenants and customers share the same time-ordered partitions
Incorrect. Keying on invoice_date alone mixes all tenants into shared partitions and cannot isolate one customer's invoices efficiently.
Explanation
Cassandra data modeling begins with the application's read queries; the partition key should match the filter and the clustering key should match the required sort order.
Example3 · CQL: Tables, Queries & Collections
A B2B SaaS billing team needs a Cassandra table to fetch all invoices for a given tenant, ordered by invoice date with the newest first. Which PRIMARY KEY definition best supports this access pattern efficiently?
・PRIMARY KEY (invoice_id), relying on a secondary index placed on the tenant_id column to group the tenant's invoices together
Incorrect. Partitioning by invoice_id scatters a tenant's invoices across many partitions, and a secondary index on tenant_id cannot deliver ordered, single-partition retrieval.
✓PRIMARY KEY ((tenant_id), invoice_date) combined with WITH CLUSTERING ORDER BY (invoice_date DESC) on the table
Correct. Partitioning by tenant_id keeps each tenant's invoices together, and clustering by invoice_date DESC returns them newest-first from one partition.
・PRIMARY KEY ((tenant_id, invoice_date)) so that both the tenant and the date become part of the composite partition key
Incorrect. Putting invoice_date inside the partition key forces an exact date equality in the WHERE clause and prevents ordered range retrieval across dates.
・PRIMARY KEY ((invoice_date), tenant_id) so invoices are partitioned by date and each partition is clustered by tenant
Incorrect. Partitioning by invoice_date spreads one tenant's invoices across many date partitions, so a single tenant query cannot read them together.
Explanation
Cassandra tables are modeled around the query. The partition key should match the equality filter (tenant_id), and a clustering column with CLUSTERING ORDER BY controls on-disk sort for efficient ordered reads.
Example4 · Partitioning, Clustering & Consistency
At a healthcare services firm, a developer designs a table keyed on patient_id so that all of one patient's vital-sign records land together. What role does the partition key play in where this data physically lives in the Cassandra cluster?
✓The partition key is hashed by the partitioner to produce a token, and that token value determines which nodes in the ring own and store the partition's data.
Correct. The partitioner hashes the partition key into a token, and token ownership in the ring determines which nodes store that partition.
・The partition key is stored on the coordinator node only, which then forwards every read request to a randomly selected replica elsewhere.
Incorrect. The coordinator is just the node handling the request; it does not permanently store the partition key, and replicas are chosen by token ownership, not randomly.
・The partition key is sorted alphabetically across the cluster, and nodes are assigned contiguous alphabetical ranges of patient identifiers for storage.
Incorrect. Cassandra's default partitioner distributes by hashed token, not by alphabetical ordering of key values.
・The partition key is combined with the local timestamp to pick a node, so the same patient's rows may move nodes as records are inserted over time.
Incorrect. Placement is deterministic from the hashed key; it does not depend on insert timestamps, and a patient's rows do not migrate across nodes with new inserts.
Explanation
The partition key is hashed into a token, and token ranges owned by nodes determine data placement, giving deterministic and even distribution.
Example5 · Drivers, Application Development & Best Practices
A healthcare services firm runs its patient-portal application in the us-east datacenter, with a second Cassandra datacenter in us-west kept for disaster recovery. The developer wants the Java driver to send normal read and write traffic only to nodes in us-east and avoid cross-datacenter latency. Which driver configuration best achieves this?
・Set the contact points to include only us-west nodes so the driver automatically prefers the remote datacenter during routine operation hours
Incorrect. Contact points are only used for initial discovery, and pointing them at us-west would steer traffic to the remote datacenter rather than the local one.
・Enable token-aware routing alone, because token awareness by itself restricts all coordinator selection to the application's local datacenter
Incorrect. Token awareness optimizes which replicas within the chosen datacenter act as coordinator but does not by itself confine traffic to the local datacenter.
✓Configure the default load balancing policy with the local datacenter set to us-east so the driver routes queries to local nodes
Correct. Setting the local datacenter to us-east in the load balancing policy makes the driver treat us-east nodes as local and route queries there, keeping remote nodes for failover.
・Disable the load balancing policy entirely and rely on the cluster to redirect every request to the nearest datacenter
Incorrect. The driver always needs a load balancing policy to pick coordinators, and the server does not transparently redirect client requests to a nearer datacenter.
Explanation
Datacenter-aware load balancing with the local datacenter set to us-east keeps routine traffic local while reserving the us-west datacenter for failover.
Example6 · Cassandra Architecture & Data Distribution
A healthcare services firm is onboarding engineers who previously ran a relational database with a primary-replica setup. They ask how Cassandra coordinates writes to the patient-records cluster. Which statement best describes Cassandra's architecture?
✓Every node in the cluster is functionally equal, and any node can accept a client read or write request as the coordinator for that operation
Correct. Cassandra uses a masterless peer-to-peer design where all nodes are equal and any node can act as the coordinator for a given request.
・A single elected master node validates and serializes all writes before forwarding each change to the subordinate replica nodes in the cluster
Incorrect. Cassandra has no master node; writes are not serialized through a single elected primary, which avoids that single point of failure.
・Clients must always connect to the node that physically owns the partition, otherwise the write request is rejected and returned as an error
Incorrect. Clients can connect to any node; the coordinator routes data to the owning replicas, so connecting elsewhere does not reject the write.
・A central configuration server tracks the current master and redirects every client connection to it so writes stay strictly ordered across the ring
Incorrect. There is no central configuration server electing a master; the cluster is decentralized and shares state through gossip.
Explanation
Cassandra's defining trait is its masterless, peer-to-peer ring: every node is equal, and the node a client contacts becomes the coordinator for that request.
Example7 · Cassandra Architecture & Data Distribution
UrbanThread, an online apparel retailer, is reviewing how its Cassandra cluster coordinates writes. A new engineer asks which node is in charge of the whole cluster and receives the correct answer. How does Cassandra's architecture handle cluster coordination?
・A single dedicated master node receives every client request and then forwards each operation to the appropriate replica nodes
Incorrect. Cassandra has no single master; routing all requests through one node would create a bottleneck and single point of failure.
✓Every node is an equal peer, and any node can serve as the coordinator for a client request without a designated leader
Correct. Cassandra uses a masterless peer-to-peer design where all nodes are equal and any node can coordinate a request.
・A primary node manages all writes while several standby replica nodes exclusively handle read-only traffic across the ring
Incorrect. Cassandra does not split roles into a write-primary and read-only standbys; all replicas can serve reads and writes.
・A rotating controller node is elected each hour to accept client writes and distribute them to the remaining cluster members
Incorrect. There is no elected rotating controller; coordination is handled per-request by whichever node the client contacts.
Explanation
Cassandra's defining architectural trait is its masterless, peer-to-peer ring where every node is equivalent and any node can act as coordinator for a given request.
Example8 · Cassandra Architecture & Data Distribution
UrbanThread stores its product catalog in a Cassandra table keyed by product_id. The team wants to understand what actually determines which node owns a given row. Which value is used to decide the row's placement in the cluster?
・The clustering column that orders rows inside each partition on disk and in the returned result set
Incorrect. Clustering columns sort rows within a partition but do not decide which node owns the partition.
✓A hash token computed from the partition key, which maps the row to a position on the ring
Correct. The partitioner hashes the partition key into a token, and that token's ring position determines ownership.
・The alphabetical order of the full primary key compared against ranges assigned to each node
Incorrect. Placement is based on a hash token, not alphabetical ordering of the primary key.
・The size in bytes of the row, which is balanced evenly across all available nodes in the cluster
Incorrect. Row size does not drive placement; the partition key's hash token does.
Explanation
Cassandra applies the partitioner (default Murmur3) to the partition key to produce a token, and that token determines which node on the ring stores the data.
Example9 · Cassandra Architecture & Data Distribution
UrbanThread adds a new node to its four-node Cassandra cluster that uses virtual nodes. An operator expects the whole dataset to be reshuffled. What actually happens to data ownership when the node joins?
・The entire ring is recalculated and every existing node streams all of its data to rebalance ownership across the cluster
Incorrect. Only the affected token ranges move; the ring does not force a full reshuffle of all data.
✓The new node takes over several token ranges, and only the data in those ranges streams to it from current owners
Correct. With vnodes the joining node acquires multiple token ranges and only those ranges' data streams to it.
・The new node remains idle until an operator manually assigns it specific partition keys to begin serving requests
Incorrect. A joining node automatically claims token ranges; no manual per-key assignment is required.
・Each existing node copies half of its partitions to the new node to keep ownership perfectly even across all nodes
Incorrect. Nodes do not blindly copy half their partitions; only data in the reassigned token ranges moves.
Explanation
Consistent hashing with virtual nodes means a joining node picks up many token ranges, and only data belonging to those ranges is streamed, avoiding a full-cluster reshuffle.
Example10 · Cassandra Architecture & Data Distribution
A financial services firm is evaluating Cassandra for its payments ledger and asks why the cluster has no single point of failure for writes. Which statement best describes how Cassandra's architecture handles this?
✓Every node in the cluster is identical and can accept read or write requests, with no master node coordinating the others
Correct. Cassandra is masterless and peer-to-peer; every node is functionally identical and any node can serve as coordinator for a client request, so there is no single point of failure.
・A single elected primary node handles all writes and then asynchronously replicates the committed data to the follower nodes
Incorrect. That describes a leader-follower (primary-replica) model such as traditional RDBMS replication, which Cassandra deliberately avoids.
・Writes are routed to a dedicated coordinator tier of nodes that is kept separate from the nodes that store the data
Incorrect. Any node can act as the coordinator for a request; there is no physically separate coordinator tier distinct from the storage nodes.
・A quorum of manager nodes votes on each write before it is accepted and then forwards it to the storage nodes
Incorrect. Cassandra does not elect manager nodes that vote on each write; consistency is tunable per request, not decided by a management quorum.
Explanation
Cassandra's defining architectural trait is its masterless, peer-to-peer design where all nodes are equal, eliminating the single point of failure inherent in leader-based systems.
Example11 · Cassandra Architecture & Data Distribution
An engineer at a bank wants to understand how Cassandra decides which node stores a given row of transaction data. Which mechanism determines the placement of a row across the cluster?
・A background rebalancing service that periodically redistributes rows evenly across all nodes based on disk usage
Incorrect. Cassandra does not continuously rebalance rows by disk usage; placement is deterministic via token hashing of the partition key.
✓The partitioner hashes the partition key into a token, and that token value maps the row to a node owning the range
Correct. The partitioner (by default Murmur3Partitioner) hashes the partition key to produce a token, and token ranges owned by nodes determine where the row lives.
・The clustering columns are hashed together with the timestamp to assign the row to the least loaded node
Incorrect. Clustering columns order rows within a partition and are not hashed with a timestamp to pick a node; only the partition key feeds the partitioner.
・The coordinator node selects a target node at random and records that choice in a central lookup table
Incorrect. Placement is deterministic from the partition key hash, not random, and there is no central lookup table in Cassandra's masterless design.
Explanation
The partitioner hashes the partition key into a token; token ownership across the ring deterministically maps each row to its replica nodes.
Example12 · Cassandra Architecture & Data Distribution
A manufacturing distributor runs a Cassandra cluster for its parts-ordering platform. During an architecture review, an engineer asks which node in the cluster acts as the central controller that all writes must route through. How should the lead architect characterize Cassandra's node topology?
✓All nodes are equal peers in a ring, and any node can act as the coordinator for a given client request
Correct. Cassandra uses a masterless, peer-to-peer ring where every node is identical and any node can serve as the coordinator for a client request.
・A single primary node owns all writes while replica nodes asynchronously copy the committed data afterward
Incorrect. There is no single primary that owns all writes; Cassandra has no master node and writes can enter through any node.
・One elected master node processes writes and promotes a standby replica only when it fails over
Incorrect. Cassandra does not elect a master or use primary/standby failover; all nodes handle reads and writes.
・A dedicated gateway node validates every request before forwarding it to the storage nodes behind it
Incorrect. There is no dedicated gateway node; the coordinator role is simply the node a client happens to connect to for that request.
Explanation
Cassandra's architecture is masterless and peer-to-peer. Every node is equal, and the node receiving a client request becomes that request's coordinator, eliminating single points of failure and write bottlenecks.
Example13 · Cassandra Architecture & Data Distribution
The distributor stores shipment records in a table with partition key warehouse_id and clustering column ship_date. An engineer wants to know what Cassandra uses to decide which node physically stores a given shipment row. Which value drives that placement decision?
✓The hashed token generated from the partition key value warehouse_id for that row
Correct. The partitioner hashes the partition key (warehouse_id) into a token, and that token maps the row to the node(s) that own its token range.
・The alphabetical ordering of the clustering column ship_date across the whole table
Incorrect. The clustering column orders rows within a partition; it does not decide which node stores the partition.
・The timestamp written into the row at insertion time by the coordinator node
Incorrect. The write timestamp is used for conflict resolution, not for determining node placement.
・The total count of rows already present inside the target warehouse_id partition
Incorrect. Partition size does not affect placement; the token derived from the partition key does.
Explanation
Cassandra applies the partitioner's hash function to the partition key to produce a token. That token determines which node owns the data, independent of clustering order, timestamps, or partition size.
Example14 · Cassandra Architecture & Data Distribution
A telecom operator's engineers are reviewing why their call-detail-record cluster has no single point of failure. One asks how Cassandra organizes its nodes. Which statement best describes Cassandra's node architecture?
✓Every node in the cluster is identical, communicates as a peer, and any node can accept read or write requests from clients
Correct. Cassandra uses a masterless peer-to-peer design where all nodes are equal and any node can serve as the coordinator for a client request.
・A single elected master node routes every request and the follower nodes only hold replicas of the data it assigns
Incorrect. Cassandra has no elected master node; this describes a leader-follower system that Cassandra deliberately avoids to remove single points of failure.
・One primary node handles all writes while dedicated secondary nodes are restricted to serving read traffic only
Incorrect. Writes and reads are not segregated to separate node roles; every node can handle both operations in Cassandra's symmetric ring.
・A coordinator tier of gateway nodes sits above worker nodes and persists all of the cluster's partitioned data
Incorrect. There is no separate gateway tier; the coordinator role is assumed per-request by any ordinary node, not by dedicated hardware.
Explanation
Cassandra's defining architectural trait is a masterless, peer-to-peer ring in which all nodes are functionally identical and any node can coordinate a request.
Example15 · Cassandra Architecture & Data Distribution
In the telecom operator's cluster, a client driver sends a write for a new subscriber record to node N3, which does not own the token range for that partition. What role does N3 take on for this request?
✓It becomes the coordinator, forwarding the write to the replica nodes that own the partition and returning the result
Correct. The node that receives the client request acts as the coordinator, routing the operation to the proper replica nodes and aggregating the response.
・It silently drops the request and instructs the driver to reconnect to one of the correct replica owners first
Incorrect. The node does not drop the request; any node can serve as coordinator regardless of whether it owns the partition's token range.
・It stores the record locally and later triggers a background repair job to move the data to the right owners
Incorrect. The coordinator does not store non-owned data locally and rely on repair; it forwards the write to the actual replica owners.
・It rejects the write because only nodes owning the relevant token range may receive client requests directly
Incorrect. Any node may receive and coordinate a client request; ownership of the token range is not required to accept the operation.
Explanation
The node a client contacts becomes the coordinator for that request, forwarding the operation to the replica owners and returning the result.
▶ Try 10 free questions (graded)
Measure your readiness with a full mock exam
All questions · full explanations · lifetime access
Enroll(33 USD)