storing uploaded photos and documents - filesystem vs database blob

前端 未结 6 2069
鱼传尺愫
鱼传尺愫 2020-12-06 06:31

My specific situation

Property management web site where users can upload photos and lease documents. For every apartment unit, there might be 4 ph

6条回答
  •  执笔经年
    2020-12-06 06:55

    a DB might be faster than a filesystem on some operations, but loading a well-identified chunk of data 100s of KB is not one of them.

    also, a good frontend webserver (like nginx) is way faster than any webapp layer you'd have to write to read the blob from the DB. in some tests nginx is roughly on par with memcached for raw data serving of medium-sized files (like big HTMLs or medium-sized images).

    go FS. no contest.

提交回复
热议问题