Images in database vs file system

前端 未结 10 816
甜味超标
甜味超标 2020-11-29 23:23

We have a project coming up where we will be building a whole backend CMS system that will power our entire extranet and intranet with one package. The question I have been

10条回答
  •  Happy的楠姐
    2020-11-29 23:34

    Well, if your top two needs are integrity and replication, then the answer is definitely DB.

    You other points though:

    • Integrity - DB, that's why databases exist vs. flat file systems.

    • Replication - Not sure if you mean image replication, but if so, then obviously DB as you won't be load balancing this, surely.

    • Multiple resolutions can be performed from the DB image, however this adds processing costs. Also, the higher the resolution, the greater the size, the longer the network wait. Multiple resolutions trades space for speed.

    • Speed - Depending on access to the images, it could be negligible. If you are taking images across a file share, you'll have to wait on the network in any case and the network is pretty much always the bottleneck.

    • Overhead - Frankly, it depends on your definition of overhead and how you access the images.

    • Management, DB, hands down. Singular storage = One less worry, and you should always be running backups on the database in any case. File system backups over multiple servers is costly in many ways.

提交回复
热议问题