哪个 NoSQL 数据库最适合仅追加审计日志记录用例? [英] Which NoSQL database best for append only audit logging use case?

查看:21
本文介绍了哪个 NoSQL 数据库最适合仅追加审计日志记录用例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的用例是资源的审计日志记录.为了讨论,考虑一个非常简单的模式:资源名称、访问时间戳和访问用户名.有了所有 NoSQL 选项,我想知道哪种解决方案最适合我的用例?

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?

资源名称保存在图形数据库 (Neo4j) 中,虽然我们可以将顶点和边添加到连接到资源顶点的审计顶点,但审计信息可能很大,我担心会污染相对简单的图形.

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.

我目前倾向于使用 MongoDB 或 Couchbase 等文档数据库,其中每个资源都有自己的文档,并且审核日志是该文档中的一个简单数组,可附加到该文档中.我担心 I/O 可能会成为问题,因为审计日志会变得很长,并且必须在应用服务器和数据库之间交换整个文档.我认为最小化这种情况的一种方法是使每个审计条目成为自己的文档,并将其 ID 附加到父资源文档数组.

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.

目前不需要搜索审核日志,但是对于文档数据库,我觉得以后集成 Elastic Search 是一条不错的途径.

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.

似乎 Redis 可能更适合我的用例,但数据持久性似乎不像其他解决方案那样严格.

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.

从概念上讲,我想我正在寻找任何支持附加"API 方法调用且无需交换大量信息的 NoSQL 解决方案.具有讽刺意味的是,这基本上是一条 SQL INSERT 语句,但我担心传统的 RDBMS 无法满足我的规模要求.审计表会很快变大,我宁愿利用最新最好的 NoSQL 方法进行分区/分片.

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!

这些似乎是类似的 SO 问题:

These seem to be similar SO questions:

审计日志的数据库设计

用于审计数据的 NoSQL 或 RDBMS

谢谢,贾里德

推荐答案

Apache Kafka 是面向日志的,高度可扩展,并允许以多种不同方式订阅消息.

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

这篇关于哪个 NoSQL 数据库最适合仅追加审计日志记录用例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆