Adin Schmahmann
Adin Schmahmann

Reputation: 273

Cloud Storage Appending and Logging

What cloud service combination would allow for the storage of logs with N parts such that it is cheap and easy to:

  1. Append new entries to the log
  2. Request parts i -> j from the log, or at least parts i -> N
  3. Have requests above be strongly consistent (i.e. reading the log after a user appends entry N + 1 always results in entry N + 1 being available)
  4. Log entries are potentially quite large (10's to 100's of MB) so imagine that for a user that uploads a picture to some service the log entry I'm storing is [log and user data | picture content]. While I can happily store the log and user data separately from the picture content, when I retrieve the log I need to efficiently be able to get both sections.

Some research and thoughts I already have:

Answers suggesting that what I have come up with so far being close to optimal are fine, but I am wondering whether I have missed a strategy regarding these storage providers or another provider that I've entirely missed. Additionally, if I'm stuck using a DB for some data storage anyway it'd be interesting if minor tweaking could allow it to work efficiently across multiple cloud providers for cost and redundancy purposes, although that may just be a pipe dream.

Upvotes: 0

Views: 229

Answers (1)

Serdar Ozler
Serdar Ozler

Reputation: 3802

You can consider storing every log entry as a separate blob in Azure Storage. With this solution;

  1. Creates a new blob
  2. Reads blobs i->j
  3. Entire block blob content becomes readable as soon as it is committed with a single API call (Put Block List)
  4. A single block blob can store up to 50K*4MB, so you can store the entire log entry in one blob.

Moreover, each blob has its own partition in Azure Storage. Blobs can therefore be distributed across many servers in order to scale out access to them.

Upvotes: 1

Related Questions