Skip to main content

Discord automated ScyllaDB operations with its own control plane

· Do Minh Tuan · Developer Corner 💻

Discord automated ScyllaDB operations with its own control plane

Discord has written up how it automated the day-to-day operation of ScyllaDB, the database behind its chat history. The number that gets attention is the billions of messages, and I understand the fascination. But the part that stayed with me is the boring one: routine tasks that used to take the infrastructure team days now finish in minutes, because a system called the Scylla Control Plane handles them.

ScyllaDB is a database that spreads data across many machines, which is what you need when one machine cannot hold the volume or the write rate. Copies of the data are replicated across nodes so a single failure does not take anything offline. That design is what makes the scale possible, and it is also what makes the operations hard. Adding a node, replacing a failed one, running backups and checking health across a large cluster is repetitive work with a lot of ways to get it wrong.

That is the gap a control plane fills. Discord's SCP watches the cluster, runs backups, repairs broken nodes and generally does the upkeep that used to be a ticket. The announcement describes an orchestration framework, and that is the right word: it coordinates the humans and scripts around the database rather than doing the database's job.

Why this is worth reading even at small scale

You will probably never run a ScyllaDB cluster, and that is fine. The pattern still applies. Every system you operate has a set of chores that are easy to do once and painful to do consistently: backups, certificate rotation, disk cleanup, failover checks, dependency upgrades. At small scale, a person remembers them. At medium scale, the person leaves and nobody remembers them. At large scale, you build a control plane. I would start the other way around, with the chores written down, because a control plane built on undocumented chores automates the confusion.

The question I keep coming back to is where the line sits. A control plane that can repair a node is also a control plane that can take a node down at the wrong moment. The more it automates, the more it needs its own safety rails: a dry-run mode, a change log, a way for a human to stop it, and a clear rule about what it will never do without approval. Discord's write-up is about the automation, and I would want to read the follow-up about the guardrails, because that is where these systems earn trust.

My bet is that automation projects fail in a predictable way. The team automates the happy path, the system works for months, and then a rare failure arrives that the automation mishandles because nobody modelled it. The result is worse than manual operations, because the humans have stopped practising. A control plane needs to be tested against the failures it is supposed to handle, as well as the routine it is supposed to remove.

I also think there is an ownership question. Once a system runs the database, someone has to own the system. That is a new service with its own bugs and its own on-call. Small teams sometimes forget this and end up with automation nobody understands, which is its own kind of technical debt. The trade is still worth making, but it should be made with eyes open, and with a name attached to the pager.

What a small team should automate first

The original post's advice is sound: automate before you scale, and start smaller than you think. For a team running a normal relational database, the first automation is unglamorous: tested backups, a health endpoint a load balancer can use, and an alert that fires when replication lags or disk fills. I think those three things prevent most of the incidents that wake people up.

I like the health check example because it is small and pays off immediately. An endpoint that pings the database and returns a failure code when the connection is dead lets the platform restart or reroute traffic without a human. In Node.js that is a short handler around a ping call, and it is the difference between a bad night and a footnote. The exact code matters less than the habit: every service should be able to say whether it is healthy, and something should be listening.

After that, automate the chores you do more than once a month. The time saved is small, and the consistency is the point. A script that rotates credentials the same way every time is better than a runbook that three people interpret differently. Write the runbook anyway, and keep it next to the script.

For a founder in Vietnam running a small team, I think this is one of the highest-value habits you can build. You do not need a platform team. You need a few scripts, a scheduler, and the discipline to make them boring. My bet is that the companies which scale without hiring an ops person for every ten engineers are the ones that automated the repetitive work early, not the ones with the most sophisticated tools.

What I would watch in Discord's case is whether they publish the failure stories, because I suspect every control plane has a moment where it does the wrong thing confidently. The teams worth learning from are the ones willing to describe that moment, because the description is what lets everyone else avoid it. The rest is a press release with architecture diagrams.

Written with AI assistance, reviewed and edited by Do Minh Tuan.