MongoDB Setup Guide for Akana Envision

Provides guidance for setting up a new MongoDB cluster to support the Akana Envision business analytics software.

Includes information about how to determine how much data is needed and how to ensure you have enough processing capability to satisfy your performance requirements.

Valid in Version: 2020.1.1 and later

Table of Contents

Introduction

It's important to have your MongoDB set up and configured in the most efficient way for your analytics. This document provides guidelines about how to set up your MongoDB, including sharding and dataset indexes.

To set up and install a supported version of MongoDB for your Akana Envision installation, refer to the MongoDB online documentation: https://docs.mongodb.com/. Be sure to choose the correct documentation version for the MongoDB version you are installing.

For information about supported MongoDB versions, go to the System Requirements doc, Database versions section.

MongoDB Setup

In order to build a cost-effective database cluster, it's important to estimate the rate and size of your data requirements. Be sure to consider the datasets and dimensions that you plan to track. It's also important to have a MongoDB expansion plan in place, to support additional demand as your usage of the service grows.

Generally, plan to use one MongoDB shard, on commodity hardware, for every 100 requests/per second your service expects on average over the next year. The actual shard requirement varies greatly based on the type of hardware and the number and size of datasets being aggregated.

For recommendations about your deployment topology, review the Akana API Gateway Multi-Regional Deployment guide. This document describes a deployment that offers high availability across multiple AWS regions using MongoDB. It also provides guidance on sharding for regulatory requirements as well as performance and reliability.

Business Dataset Sharding

Every dataset created through the Akana Envision user interface results in a new pair of collections in MongoDB. In order to benefit from a large sharded MongoDB deployment, a database administrator (DBA) must instruct MongoDB how to shard these new collections.

If you followed the Akana API Gateway Multi-Regional Deployment guide you’ll have already sharded the OPERATIONAL_METRIC aggregation collection pair. Using these same commands, you can shard any new business datasets to take advantage of the horizontal scaling capability in MongoDB.

Dataset Indexes

Every new Envision dataset receives a pair of general indexes that are intended to cover the majority of use cases without overloading the database with index management. It is still a good practices to instruct your database administrator to monitor query performance and propose additional indexes based on usage patterns for your business.

You can add profiling to review query plans on the METRIC_ROLLUP_DATA database following the MongoDB online documentation for the Database Profiler: https://docs.mongodb.com/manual/tutorial/manage-the-database-profiler/.