MongoDB on EC2 server or AWS SimpleDB?

前端 未结 3 1452
無奈伤痛
無奈伤痛 2021-01-29 21:31

What scenario makes more sense - host several EC2 instances with MongoDB installed, or much rather use the Amazon SimpleDB webservice?

When having several EC2 instances

3条回答
  •  春和景丽
    2021-01-29 22:20

    I think you have both a question of time and speed.

    MongoDB / Cassandra are going to be much faster, but you will have to invest $$$ to get them going. This means you'll need to run / setup server instances for all them and figure out how they work.

    On the other hand, you don't have to per a "per transaction" cost directly, you just pay for the hardware which is probably more efficient for larger services.

    In the Cassandra / MongoDB fight here's what you'll find (based on testing I'm personally involved with over the last few days).

    Cassandra:

    • Scaling / Redundancy is very core
    • Configuration can be very intense
    • To do reporting you need map-reduce, for that you need to run a hadoop layer. This was a pain to get configured and a bigger pain to get performant.

    MongoDB:

    • Configuration is relatively easy (even for the new sharding, this week)
    • Redundancy is still "getting there"
    • Map-reduce is built-in and it's easy to get data out.

    Honestly, given the configuration time required for our 10s of GBs of data, we went with MongoDB on our end. I can imagine using SimpleDB for "must get these running" cases. But configuring a node to run MongoDB is so ridiculously simple that it may be worth skipping the "SimpleDB" route.

    In terms of DAO, there are tons of libraries already for Mongo. The Thrift framework for Cassandra is well supported. You can probably write some simple logic to abstract away connections. But it will be harder to abstract away things more complex than simple CRUD.

提交回复
热议问题