Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which NoSQL database best for append only audit logging use case?

My use case is audit logging for resources. For discussion consider a very simple schema: a resource name, access time stamp, and accessing user name. With all the NoSQL options out there, I'm wondering which solution is best for my use case?

The resource names are being held in a graph database (Neo4j) and while we could add vertices and edges to an audit vertex connected to the resource vertex, the audit info could be large and I fear pollute a relatively simple graph.

I'm currently leaning towards a document database such as MongoDB or Couchbase in which each resource has it's own document, and the audit log is a simple array within this document that gets appended to. I fear that I/O could become a problem as audit logs get long and the entire document must be exchanged between app server and database. One soultion I see to minimize this is to make each audit entry its own document and append its ID to the parent resource document array.

Search audit logs is not a requirement at this time, but with a document database I feel there is a nice path to integrate Elastic Search at a later time.

It seems Redis may be a bit more optimal to my use case, but the data persistence does not appear as rigorous as other solutions.

Conceptually, I guess I am looking for any NoSQL solutions that support an "append" API method call without needing to exchange much information. Ironically this is basically a SQL INSERT statement, but I fear a traditional RDBMS will not meet my scale requirements. The audit table would get huge fast and I would rather leverage the latest and greatest NoSQL approaches to partitioning / sharding.

Any insights into log append use cases are appreciated!

These seem to be similar SO questions:

Database design for audit logging

NoSQL or RDBMS for audit data

Thanks, Jared

like image 205
user3088272 Avatar asked Dec 10 '13 19:12

user3088272


People also ask

Which enterprise use cases are best addressed by NoSQL?

Here are 10 enterprise use cases best addressed by NoSQL: * Personalization. A personalized experience requires data, and lots of it – demographic, contextual, behavioral and more. The more data available, the more personalized the experience. However, relational databases are overwhelmed by the volume of data required for personalization.

What is the best NoSQL database for logging?

I have done some research on NoSQL databases for logging and found that MongoDB seems to be a good choice. Also, I found log4mongo-net which seems to be a very straightforward option. Would you recommend this kind of approach? Are there any other suggestions? Show activity on this post.

What is the best practices database audit for MongoDB?

Nessus v6 includes a TNS MongoDB 2.x Best Practices Database Audit. This is the first NoSQL database that Nessus can audit. So what are some of the common steps you should take to secure MongoDB?

Should you use NoSQL databases for mobile app development?

Rapidly scaling mobile apps globally to serve tens of millions of users with acceptable performance (think mobile gaming or popular social media apps) often calls for distributed databases, which in turn calls for NoSQL. Flexible NoSQL data models also support rapid app update cycles better than relational data models in many cases.


1 Answers

Apache Kafka is log-oriented, highly scalable and allows for subscribing to messages in multiple different ways.

like image 132
Emil Vikström Avatar answered Oct 25 '22 23:10

Emil Vikström