Mongodirector > Blogs

The case for MongoDB hashed indexes

GraphViz Example: hashtable.dotIn addition to scalar indexes (ascending, descending) MongoDB also supports ‘hashed’ indexes.  When you use a hashed index on a field mongodb computes a hash of the field value and stores the hash in the index. Hashed indexes support only equality comparison and do not support range queries. Hashed indexes are typically used in sharding scenarios.

Continue reading

Introduction to Redis Data Structures: Hashes

Redis logoRedis hashes are (intuitively enough!) hashes that map string names to string values. They are essentially named containers of unique fields and their values. They are the perfect way to represent an object as a Redis data structure. As expected, they provide constant time basic operations like get, set, exists etc. A bunch of advanced operations are also provided. The full list of hash commands is here.

Continue reading

Introduction to Redis Data Structures: Sets

Redis®, and the Redis logo are the trademarks of Salvatore Sanfilippo in the U.S. and other countries.

Redis®, and the Redis logo are the trademarks of Salvatore Sanfilippo in the U.S. and other countries.

Redis (REmote DIctionary Server) is an immensely popular in memory key-value store which also provides for optional durability, partitioning, replication and a host of other features.  It is the most popular key-value database currently and is known for it’s simplicity, low memory footprint and having a low learning curve. Redis is also referred to as a data structure server it has support for atomic operations on data structures like hashes, lists, sets, sorted sets, bitmaps and hyperloglogs. In this post we will look at the set data type provided by Redis along with it’s usage and real life use cases.

Continue reading

Enabling data compression in MongoDB 3.0

MongoDB 3.0 with the wired tiger storage engine enables you to transparently compress the data stored in your database. This is a fairly exciting and useful feature that can be used to reduce the disk space usage of your fast growing data. By default wired tiger uses the ‘Snappy’ block compression engine for all the collections. You can turn off compression by default using the following options in the mongodb server config file .

Continue reading

MongoDB SSL with self signed certificates in Node.js

MongoDirector supports SSL configuration for MongoDB. Configuring and setting it up is easy  and our earlier post talks all about it. It also discusses the need and pros and cons of MongoDB with TLS/SSL.

MongoDirector currently uses self signed certificates for SSL when creating nodes for a new cluster. Since Node.js applications over the MongoDB Node.js driver or Mongoose are very popular choices on our platform, in this post we discuss a step by step plan to workaround most common issues faced in using MongoDB SSL with self signed certificates in Node.js. This discussion pertains to the MongoDB Node.js version 2.0 and Mongoose version 4.0.3.

Continue reading

How to benchmark MongoDB with YCSB?

While talking about system performance characteristics, most DBaaS providers limit themselves to providing information about the hardware that their systems are provisioned on. Indeed, it is hard to talk accurately about the actual throughput/latency characteristics of a cloud based deployment given the number of variables in such a system. Virtualized environments, unpredictable workloads, network latencies, different geographies are only some of the considerations.

However it is a good idea to have a fair understanding of the actual performance of your Mongodb deployment: so that you can provision accurately based on your application needs; so that you can actually compare various DBaaS providers to ensure that you are getting the most “bang for the buck”.

Continue reading