Scalable Database Solutions for Multi Tenant Applications – The Rise of NoSQL


From GoT to the Enterprise

The continual increase in unstructured Big Data from the Internet of Things, the changeable requirements for developing successful mobile NoSQLapps and the trend for user-generated content are paving the way for NoSQL databases to prove their value. Relational databases will still be useful for managing more structured, uniform data sets, but they don’t possess the flexibility, agility, scalability and analytics capabilities of NoSQL database management systems. For example, multi-tenant applications such as popular games like Vainglory and Game of Thrones, require developers to make frequent feature updates and specific changes to individual characters for creating interesting capabilities to keep users interested. Similarly, as an increasing number of businesses undertake more Agile projects or undergo digital transformations, updates need to be made to enterprise apps much more quickly. The fixed schema in relational databases does not lend itself to this rapid process of continuous innovation.


Benefits of NoSQL

SQL vs noSQL Image credit:

The main benefits that NoSQL databases bring to multi tenant applications are:

  • Faster iterations permitted by dynamic schema that accommodate real time and other unstructured data by enabling rapid changes and constant updates, without any adverse effect to the entire database
  • Faster and partially automated application management and maintenance, as areas of the database can be altered in isolation without causing changes elsewhere
  • Horizontal elastic scalability for peak loads, as opposed to the necessity for vertical scalability in SQL databases
  • High availability, reliable performance and better end user experience as NoSQL databases are built to serve predictable, low-latency requests
  • More cost effective than SQL as NoSQL only requires cheap commodity servers for effective operation


Health & Fitness

A good example of the benefits of a NoSQL database in action is Microsoft’s use of their own Azure DocumentDB to produce a scalable, schema-free and queryable distributed data store for – their portal spanning 26 global markets with over half a billion monthly users. They initially rolled it out for the Health & Fitness section, which required scaling and authorization capabilities to support 425 million unique users and 100 million direct authenticated users, creating a requirement for 20 TB of document storage. The write latency had to be under 15ms with 99% of read requests coming in at single digit latencies. The storage needed to be schema free and required rich query and transaction support with Hadoop based analytics, while the diverse set of vertical schemas required suitable data model extensions. MSN decided Azure DocumentDB was best placed to meet all their requirements and their applications were redirected and fully operational on the new database within just two months.

Several multi-tenant scaling solutions are available with Azure DocumentDB; and the type of project and desired outcomes will dictate which ones are right for you.


Sharding & Security

Here are some examples of the horizontal scaling or “sharding” and security capabilities:

  • Create multiple collections or reuse them for cost-effectiveness and choose to partition by collection or by database
  • Store tenants within a single collection for a simpler, more cost effective solution with transactional support across all data and then dynamically add collections as the application grows
  • When you partition across multiple collections in this way, you can also ensure that larger tenants have access to more resources by allocating them their own collection
  • Ensure security at the application level by adding a tenant property inside the document for tenant identification, using filters to retrieve data belonging to a particular sub-set of tenants and utilizing authorization keys to isolate tenant data and restrict access
  • Where you have a large set of users and permissions, you can place tenants across multiple databases to simplify the management process
  • Azure also allows you to partition tenants by database account, enabling isolation so that individuals can take responsibility for managing their own sets of collections and users
  • Various sharding options are available including, Range, Lookup and Hash partitioning for division by, for example, timestamp and geography, date by user / country / hash code for even distribution respectively.
  • Azure enables both read and write fan-out queries whereby the app queries /asks each of the partitions you have created in parallel and consolidates the results.

When considering which type of database to select, a great starting point is to look at your Customer Experience Management strategy and choose your solution based on the development speed, performance levels, security and scalability that best matches your customers’ needs and expectations.

Sogeti Labs


SogetiLabs gathers distinguished technology leaders from around the Sogeti world. It is an initiative explaining not how IT works, but what IT means for business.

Related Posts

Your email address will not be published. Required fields are marked *

  1. Ashish Kashyap July 17, 2015 Reply

    Nice article. The benefits of using a NoSQL database are very well highlighted. I want to add to the list of benefits the fact that the problem of impedance mismatch between the object oriented world and databases is greatly alleviated when Document Oriented NoSQL databases such as MongoDB are leveraged as the backend of an application. In the traditional RDBMS world, frameworks such as Hibernate, and Entity Beans are generally used to bridge the impedance mismatch. On the flip side, a limitation of such databases is the fact that the schema is generally designed based on the application requirements. So, if there are multiple applications accessing the data, and they have different use-case, Document Oriented NoSQL databases may not be the right choice.