File Storage for Web Applications: Filesystem vs DB vs NoSQL engines

前端 未结 4 1320
感动是毒
感动是毒 2020-12-23 20:54

I have a web application that stores a lot of user generated files. Currently these are all stored on the server filesystem, which has several downsides for me.

    <
4条回答
  •  余生分开走
    2020-12-23 21:20

    If the OS or application doesn't need access to the files, then there's no real need to store the files on the file system. If you want to backup the files at the same time you backup the database, then there's less benefit to storing them outside the database. Therefore, it might be a valid solution to store the files in the database.

    An additional downside is that processing files in the db has more overhead than processing files at the file system level. However, as long as the advantages outweigh the downsides, and it seems that it might in your case, you might give it a try.

    My main concern would be managing disk storage. As your database files get large, managing your entire database gets more complicated. You don't want to move out of the frying pan and into the fire.

提交回复
热议问题