Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
708 views
in Technique[技术] by (71.8m points)

database - Why don't you start off with a "single & small" Cassandra server as you usually do it with MySQL?

For any website just starting out, the load initially is minimal & grows with a slow pace initially. People usually start with their MySQL based sites with a single server(***that too a VPS not a dedicated server) running as both app server as well as DB server & usually get too far with this setup & only as they feel the need they separate the DB from the app server giving it a separate VPS server. This is what a start up expects the things to be while planning about resources procurement.

But so far what I have seen, it's something very different with Cassandra. People usually recommend starting out with atleast a 3 node cluster, (on dedicated servers) with lots & lots of RAM. 4GB or 8GB RAM is what they suggest to start with. So is it that Cassandra requires more hardware resources in comparison to MySQL, for a website to deliver similar performance, serve similar load/ traffic & same amount of data. I understand about higher storage requirements of Cassandra due to replication but what about other hardware resources ?

Can't we start off with Cassandra based apps just like MySQL. Starting with 1 or 2 VPS & adding more whenever there's a need ?

Edit:

I don't want to compare apples with oranges. I just want to know how much more dangerous situation I may be in when I start out with a single node VPS based cassandra installation Vs a single node VPS based MySQL installation. Difference between these two situations. Are cassandra servers more prone to be unavailable than MySQL servers ? What is bad if I put tomcat too along with Cassandra as people use LAMP stack on single server.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

TL;DR;
You can even start with a single node, but you loose the highly available factor of c*.

Cassandra is built for systems that handle huge volumes of data, terabytes and in some cases petabytes. Many users typically switch from MySQL (and lots of other RDBMS) to Cassandra once they find that their current DB system can't handle the data load efficiently (querying gets slow, managing storage becomes challenging etc.)


Why 4-8GB gb of ram?

The 4-8 GB of ram is to do with the JVM and the size of ram on efficient garbage collection. The advice is stating not that you should start on 8 GB, but hat you shouldn't have more than 8GB

This doesn't mean to say that you cant use Cassandra to start up a single node on a very basic machine (some people actually have cassandra running on a raspberry pi).


Why do people recommend 3 nodes?

Availability is one of cassandra's main selling points. If you have 2 nodes with RF=2 then you cant perform writes if a single node goes down. If you have 3 nodes you can still perform both reads and writes.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...