Browse Source

Basic nodestore documentation

David Cramer 11 years ago
parent
commit
52fda26d3c
2 changed files with 46 additions and 0 deletions
  1. 1 0
      docs/index.rst
  2. 45 0
      docs/nodestore/index.rst

+ 1 - 0
docs/index.rst

@@ -23,6 +23,7 @@ Users Guide
    config/index
    config/index
    queue/index
    queue/index
    buffer/index
    buffer/index
+   nodestore/index
    udp_server/index
    udp_server/index
    throttling/index
    throttling/index
    performance/index
    performance/index

+ 45 - 0
docs/nodestore/index.rst

@@ -0,0 +1,45 @@
+Node Storage
+============
+
+Sentry provides an abstraction called 'nodestore' which is to storing key/value blobs.
+
+The default backend simply stores them as gzipped blobs in in the 'nodestore_node' table
+of your default database.
+
+Django Backend
+--------------
+
+The Django backend stores all data in the 'nodestore_node' table, using a the gzipped json blob-as-text pattern.
+
+The backend provides no options, so it should simply be set to an empty dict.
+
+::
+
+    SENTRY_NODESTORE = 'sentry.nodestore.django.DjangoNodeStorage'
+    SENTRY_NODESTORE_OPTIONS = {}
+
+
+Riak Backend
+------------
+
+Riak is the recommended backend for installations which have a large data consumption pattern, and would prefer to
+scale out, rather than scale up a single SQL node.
+
+Some notes on your Riak installation:
+
+- You will want to the ``eleveldb`` backend as blobs are larger, and compression helps greatly.
+- Reads explicitly use ``r=1``.
+- We recommend ``w=2`` for writes, but if the data isn't extremely important, ``w=1`` is fine.
+
+::
+
+    SENTRY_NODESTORE = 'sentry.nodestore.riak.RiakNodeStorage'
+    SENTRY_NODESTORE_OPTIONS = {
+        # specify each of your Riak nodes, or the address of your load balancer
+        'nodes': [{'host':'127.0.0.1','http_port':8098}],
+        # (optional) specify an alternative bucket name
+        # 'bucket': 'nodes',
+        # (optional) change the default resolver
+        # 'resolver': riak.resolver.last_written_resolver
+    }
+