3

We are using cassandra database for store website information, but we are not sure how to save images.

We can store them in cassandra, but we can also allocate a server for storing images.

Cassandra has good performance for big-data storage but if we store images in cassandra we must save them as bytes. For any retreival, first we must read image-bytes from cassandra and store it in a folder and then send it's address to the web page.

Do you have any ideas for this problem?

2 Answers2

9

No.

Just No.

You don't store images in a database.

Images are files.

Do not store files in a database. (Source: My blog post, I wrote in 2012)

Databases are for storing data.

Filesystems are for storing files.

Store files in a filesystem.

Tom O'Connor
  • 27,578
1

Your question was a bit hard to understand, but in the end I think you mean to serve images, and are figuring out if you want to do either

  • save them in cassandra, and on retreival write them to a file, and send the link to the client.
  • save them on a separate server.

The first doesn't make too much sense to me: if you read them from cassandra, you can probably just stream them to the client without saving them first. But even in that case, I'd go for a file-system sollution: if you have no other demands then just to save the files and serve them you should use file-system.

Nanne
  • 632