**🤼 A Case for YDB and Why I Won't Be Using It Yet
**YDB is a SQL database with auto-sharding and ACID consistency (but without relations), developed by Yandex and released as open source about a year ago
In the comments to my previous post, I discussed why I conceptually like it, but why I'm not ready to use it yet, so I decided to duplicate it in the form of a post
Let's consider a case: we need to build a system with a huge number of inserts + storing historical data for a year, and then denormalizing it to display to users (for example, a telemetry system or a parser from a bunch of sources), while our service doesn't earn very much and may not earn much (in short, cutting costs is important)
What I would do on average: I would deploy several Kafka machines (and since this is often painful, I would try RedPanda), write events there, read them in other processes, and rewrite them to PostgreSQL (conditionally, this is our main business logic database, if we needed something like OLAP, then ClickHouse)
If YDB turns out to be a worthy technology, then we can write events to it and read them from its topics, and denormalized data back to storage (with moderate denormalization, because YDB supports both secondary indexes and JOIN), accordingly, it can become even the main database for business logic
No vendor lock (even if we start with Yandex.Cloud, we can later move to self-hosted and won't lose anything), support for only one system, reduced costs, scalability, and speed
But **I wouldn't use YDB in production yet:
**1. Finding new worthy developers on Node who know PostgreSQL / Kafka is extremely difficult, finding ones who know YDB will be impossible, we'll have to teach them from scratch 2. There will be problems with drivers, which means we'll need to allocate time for contributing 3. We will definitely encounter problems and peculiarities of YDB (because it is largely unique) and due to the lack of mass adoption, we will unlikely be able to find answers on Stack Overflow, which means we'll have to search for someone who can give us hints, dig through the source code ourselves (which means knowing C) and experiment until we succeed
I'll be ready to take it to full production only:
- If we're really pressed for scalability and there's no other way without experimenting
- When job postings start writing "Knowledge of YDB", and that's another year or two, depending on the aggressiveness of Yandex's marketing
- When our project team is ready to contribute to the YDB driver for Node.js
That's about it, so I wish YDB good health and prosperity, I hope that somewhere in 2024 I'll be able to confidently take it with me to production
And good health to you, friends 😍