Community Blog Going NoSQL with ApsaraDB for MongoDb or Table Store

Going NoSQL with ApsaraDB for MongoDb or Table Store

This is an in-depth comparison guide for Alibaba Cloud's MongoDB and Table Store service to help you choose the most suitable database service as per your project or enterprise needs.

By Afzaal Ahmad Zeeshan, Alibaba Cloud Community Blog author and Alibaba Cloud MVP.

Introduction and Background

Undoubtedly technology is the most rapidly evolving space where comes a thousand different options to meet your varying needs. However, you need to ponder these choices to perfectly suit your overall requirements. Likewise, the database dynamics kept changing even from our grandpa's time, from relational to non-relational, from SQL to NoSQL and then from structured to huge unstructured databases requiring big data environments from us. Also, the top-notch organizations such as Alibaba Cloud, Facebook, Twitter, and Google, etc. deal with huge data streamlines and Big Data processing to quickly provide response to the user queries, for which they wrestle quite a lot. All in all, the database has always been counted as one of the core components for the development of either the small or the large-scale applications.

Understanding NoSQL Purposes

As far as the step-by-step guide related to NoSQL database is concerned, I've already covered that all in my previous article – Setting up a MongoDB server on Alibaba Cloud, which is quite enough to get your feet wet on the conceptual as well as the implementational level. So, in this article we will be talking about Alibaba's NoSQL solutions; first on ApsaraDB for MongoDB and then on Table Store which is a simple way of creating schema-free database on the cloud.

Fundamentally, this is a comparison guide for MongoDB and Table store but not for the sake of stating one better than the other, or recommending one over other, rather the crux is to list the strong insights of both of the solutions provided by Alibaba so you can be capable enough to take an educated decision for choosing the database service as per your project or enterprise need.

Table Store – Overview and Concepts

Seamless reliability, high availability and massive access are few of the promising features of Table Store which is built on Alibaba Cloud's ApsaraDB. Being NoSQL in design, the table model of Table Store is defined simply by a table which consists of rows, primary keys, and attributes. Nonetheless, one of the significant features for any sort of distributed database system is its real-time accessibility, and Table Store is trusted and industry-wide acceptable for this its access concurrency. Also, it provides auto-scaling of distributed databases, so that companies can work on the business plans and goals rather than managing the hardware cost and data management for their products.

Table Store supports data organization in a way that we can break down our entities in the form of instances and tables (where a table is a set of rows and a row consists of the primary key and attributes), which can seamlessly scale up to cater small and large-scale business requirements using data portioning and load balancing techniques. Also, it provides a high-tolerance and reliable recovery mechanism which ensures instant availability of your database system. All this is managed by the ApsaraDb protocol that is provided by the Alibaba Cloud.

Table Store is a turn-key solution for NoSQL database on Alibaba Cloud, even more turn-key than other hosted solutions for MongoDb or relational databases. It is 2-dimensional and does have tables consisting of rows and columns; which can be added or remove, even modified anytime based on your requirements and that from the portal itself. Being NoSQL in nature, it does not require strict schema and relationships between rows and columns. Nonetheless, it provides flexible structure, easy-to-use functions and enables real-time concurrent queries from a massive amount of data. Consequently, we can design our database using multiple data types, such as integer, string, binary, double and bool. The overall benefit of Table Store is that it enables developers to deploy a complete database solution in less than 5 minutes, without having to worry about anything—like scalability, replication, failover or disaster recovery. In MongoDb clusters, although maximum elements are managed by the platform, yet you must plan for all these, scalability and high-availability being the most important factors in this.

Table Store Deployment

The deployment for Table Store is just as easy as a few clicks on the dashboard. For example, you can find the Table Store service inside the portal itself,


One thing to notice here is that you need to understand that these services are filtered out for the regions too. So, if you do not find the service in the list, try changing the region once.

Upon clicking the create resource button you will see the dialog that enables you to insert the values for the new service that you are going to deploy on the cloud platform.


Input these fields and within a few seconds your service will be up and running. You can also access the endpoints where this service has been deployed in the same dashboard for the service,


You can now directly use these endpoints in the SDK for Table Store and manage the tables and perform all sort of data related operations on them. You can get the SDKs for the Table Store for all the most widely used runtimes and frameworks here on Alibaba Cloud's website.

ApsaraDB for MongoDB – Overview and Concepts

Now that we have talked much about table store and how it works, let's explore and understand how MongoDB works in contrast, and where we can find it performing better. ApsaraDB for MongoDB is highly secure and scalable cloud database service which is primarily based on MongoDB protocol with some super-extended features; a document-oriented database service with automatic monitoring, multiple back-ups, one-click deployment, and configuration. So, your focal point would be turned towards business growth and advancement.

Architectural Configurations

Standalone, replica set and Sharded cluster are the core instance types for ApsaraDB for MongoDB. All these types support flexible deployment architecture to meet the diversified requirements of your business.

Standalone Instance

This is the most affordable yet efficient instance for your development, testing, and management if you aim to work on structured and high-level company dataset. With a minimal cost, you can have access to kernel-level modifications and optimizations. Moreover, you can have an advantage of O&M.

Replica Set Instance

Multi-node replica set (three-node, five-node or seven-node) is designed to meet a huge amount of user queries and business requirements; the major goal is not just the quick recovery or switchover from failure situations but making this recovery transparent from the users as well. Based on your needs, you can increase nodes for better performance and flexible load balancing. The multi-node system ensures high throughout and flexible read-write query access for highly demanding user experience.

Sharded Cluster Instance

Fundamentally, based on your extreme business load and high traffic, the optimal choice would be the use of sharded cluster instance, which is a combination of multiple three-node replica sets. The primary components of each sharded instance are mongos (service agent connected with one-node), shard (a sharding server) and the configuration server. ApsaraDB for MongoDB allows you to configure these clusters as per the required settings and capabilities.

Competitive Benefits of ApsaraDB for MongoDB

ApsaraDB for MongoDB provides an easy-to-use operational and maintenance platform which is auto upgradable to higher versions. For the rigorous performance and instant availability, continuous monitoring is required; connection and access notification, alerts for disk and space utilization, etc. regardless of your location of access.

In addition to continuous monitoring, multiple backups for transparent recovery, and quick access, the connective and management services are highly user-friendly, since your application is now highly-available and provides at least a good amount of (let's not mention the overall percentage) availability to the clients or the endpoint devices that you have configured. One-click data backup, recovery and risk and traffic management are supported using properly visualized management tools, and ApsaraDb automatically configures and stores the backups for your database on their own clusters. Moreover, the management of data tables, nodes and clusters become possible using an efficient data management service (DMS). In fact, a more suitable way of defining the schema for the MongoDB is using other tools and services such as ORMs.

Unlike relational database management system, ApsaraDB for MongoDB does not restrict you to change or define a solid table structure; rather it gives you an ease to store structured data, business-level high-level datasets as well, while you do not need to worry about the schema and relational configurations. It supports spatial indexes which are two-dimensional and a lot suitable for location-based applications. Asynchronous data writing and processing, dynamic node scaling and sharding are some of its features which are most demanding for applications which require concurrent data reading and writing. These features are not (yet!) available in the Table Store, one of the reasons in that Table Store is a simple database deployment service by Alibaba Cloud.

So, in a nutshell, if you are considering a database service for your use-case, here are a quick tip:

  1. Do you require the application service to be deployed in a replicated or clustered fashion, closer to the customers?
  2. Do you require to manage the schema programmatically using your SDKs?
  3. Does your business require an industry-standard, enterprise-grade, battle-tested database engine that can cope with any number of transactions?
  4. Do you have a team of engineers who are good with database designs or structures (not just talking about database engineers or administrators)?
  5. Do you have enough budget to cope with extra infrastructure costs?

If you answered yes to most of these questions, then you should consider having ApsaraDB for MongoDB as the maintenance and management is still simple, easy and in-portal for most cases. With this investment, you get the best possible outcome. However, if most of the answers are negative or you are looking forward to trying out a simple application idea, and want a quick NoSQL solution, take my advice, go for Table Store and try it out, it does not cost much, and you will have a quick prototype developed and deployed in no time!

0 0 0
Share on

Alibaba Clouder

2,606 posts | 737 followers

You may also like