Riak is an open source distributed database. Riak cluster deployment is easy with pre-defined clusters and 1-Button Deploy™ technology on Datapipe.
Sample Development Cluster Topology
- Session storage – Riak was originally created to serve as a highly scalable session store. This is an ideal use case for Riak, which is a fundamentally a key value store. Because user/session IDs are usually stored in cookies or otherwise known at lookup time, Riak is able to serve these requests with predictably low latency.
- Complex session storage – The bitcask storage backend supports automatic expiry of keys, which frees application developers from implementing manual session expiry. Riak’s MapReduce system can also be used to perform analysis on large bodies of session data, for example to compute the average number of active users. If sessions must be retrieved using multiple keys (e.g., a UUID or email address), Secondary Indices (2I) provides an easy solution.
- Serve ads quickly to many users and platforms – Riak’s tunable CAP controls can be set to favor fast read performance. By setting the r value to 1, only one of n replicas will need to be returned to complete a read operation, yielding lower read latency than an r value equal to the number of replicas. This capability is ideal for advertising traffic that is primarily serving reads.
- Store large amounts of log data for analysis with MapReduce – A common use case for Riak is storing large amounts of log data for analysis with MapReduce or as the primary storage for log data with a secondary analytics cluster used to perform more advanced analytics tasks. For this use, you can create a bucket called “logs” (or anything else) and use a unique value such as a date for the key. Log files would be the values associated with the unique keys. For storing log data from different systems, you could create a unique bucket for each system and write associated logs to that bucket. In terms of analyzing log data, you could then use Riak’s MapReduce for aggregation tasks such as summing the counts of records for a date or use Riak Search for more robust, text-based queries.