Performance problem about the database design in NodeBB

General Discussion
  • #1

    I was a php + mysql programmer.

    In mysql , if a single table is too large, the performance will be reduced.

    I read the source code of the NodeBB recently,

    I found that the objects collection in NodeBB almost store everything.

    ❓ i wonder whether the problem in mysql will happen in mongodb too....

    hope someone can help me~😄

  • #3

    As easy as collection stores like redis might be to use. I think a well done SQL concept will always be faster.

    (and PostgreSQL is one of the slower SQL databases)

    Sure, mongodb/redis will scale much better over a cluster. But one server is in most cases more than enough.

    Not really sure what all the hype about mongodb/redis lately is, if you can use well tested sql databases.

  • Community Rep

    @belstgut said:

    Not really sure what all the hype about mongodb/redis lately is, if you can use well tested sql databases.

    MongoDB is well tested too. But beyond being super stable, it is screaming fast - far faster than any relational database, it has amazing sharding properties, it speaks native JSON, it is getting a massive amount of active development, it is considered the native database for Node.js on which NodeBB is built and it scales like crazy.

    Now the big one.... when using Node... those "well tested sql databases" are not well tested. MongoDB is far more stable and tested than any of them and, in fact, lack of highly reliable drivers is a major issue for relational (what you call SQL) databases.

    So there are very, very good reasons to use NoSQL, especially MongoDB specifically. Speed, stability, battle tested, native, etc. I'm not actually clear on any upside to using a relational database here. Relationships are nice, but would they add any value at all in an online community infrastructure?

    Also, I should note, some online communities that we have dealt with have scaling issues specifically because they eschewed this advice and went with those "well tested" relational databases. Once they grew and got busy they were unable to keep pace and they bogged down and had to throw crazy amounts of money at keeping respectable performance when MongoDB or other similar datastore could have been faster for cheaper.

Suggested Topics

  • about search problem

    General Discussion
    0 Votes
    7 Posts

  • 0 Votes
    3 Posts

  • Is nodebb for us?

    General Discussion
    0 Votes
    4 Posts

  • 0 Votes
    2 Posts

  • 0 Votes
    3 Posts

| | | |