0

I have a real estate app and I need to create a database for listing photos. These photos will be actively accessed by users.

The full-size photos are about 50-70KB in size. I will create thumbnails for the first photo of each listing, which will be about 20KB.

Here's my plan:

  1. Store thumbnail photos directly on server (block storage), for faster access
  2. Store all the full sized photos in object storage

Is this a good optimization idea? Am I adding unnecessary complexity? Should I simply store all photos in object storage?

0

The problem with block storage is that you loose all the benefits of integrity constraints - photos will get forgotten when listings are deleted etc...

Block storage is likely to be faster and is easier to diversify if there are speed problems, so your trade-off is speed and scalability vs ease of development and management.

2
  • Thanks for that. To follow up on your response. In terms of serving thumbnail photos (10-20 KB in size). Would it be much faster to serve them from an SSD block storage, as opposed to serving them from an object storage? If the speed difference is minimal, I may as well keep everything in object storage. – Valachio Nov 4 '18 at 3:28
  • the speed difference will probably be minimal, database indices are more heavily optimized than file-system directories, so what performance you lose by storing a file inside another file you get back by locating it more efficiently. – Jasen Nov 8 '18 at 10:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.