Hello everyone, I’m building an instant messaging app and I’m expecting 200K to 500K concurrent connections and about 100K to 300K messages sent and received, I needed a database that can handle a large number of writes, medium number of reads and a small number of updates and deletes. I did research on what database is best suited for this job and according to the research, wide-column databases are the best (CassandraDB and ScyllaDB) but the majority use CassandraDB however, while cassandra is good at handling an insane number of writes its bad with deletes, which made me consider another database.
During my research, I came across YugabyteDB, I looked into it and I was impressed by what it’s capable of, and some people claim that it is better than cassandra but I’m still skeptical.
Now to make things clear, I’m looking for a database that can handle a large number of writes, medium number of reads and a small number of updates and deletes, there will be indexing for search purposes, also I’m going to install the database on a dedicated server with the following specs:
CPU: Two AMD EPYC 7282 - 16Cores / 32 threads.
Memory: 256 GB REG ECC - can get up to 512 GB if needed.
In that case, I would suggest using PostgreSQL. Using PostgreSQL is usually a better alternative if you don’t need sharding or replication or any of our special features like row-level geo-replication.
If/when your app grows, we can help move to YugabyteDB.
I haven’t explored the way YugaByte scales, currently I’m using cassandra and it scales perfectly, we can just add nodes to scale it and it can tolerate a loss of nodes without any impact on the application. Large companies such as Netflix, Facebook and Apple have thousands of Cassandra nodes. I was going to use MongoDB in the beginning but scaling MongoDB is not a great choice, MongoDB sharding is complicated to use and not known for stability. Cassandra is perfect when it comes to scalability but it doesn’t handle deletes very well, so I’m considering another database just in case, YugaByte is on my radar, am not yet familiar with YugaByte I just needed an opinion of an expert before I start looking into it.
You need to understand that scalability, performance and latency are priorities, I’m looking for a database that can handle millions of messages a day and can still perform perfectly without affecting latency.