We are building a large inventory of documents with a picture attached to each document. We where thinking of storing the images inline with the document in couchbase base64 encoded so that we can quickly retrieve the image along with the document. The images may run anywhere from a few K to several MB. Total storage will eventually scale to several terrabytes which would all have to be kept in couchbase with this solution.
We are eventually expecting tens of thousands of reads/second across our couchbase infrastructure with the expectation to serve up the document with image in the sub 20ms timeframe.
A few more reasons we’d like to do this is to:
- Simplify our cross data center replication of documents along with the images
- Simplify our infrastructure. Just our web app and coucbhase to deploy.
- Reduce network trips.
So…why is this a really bad idea?