MongoDB supports regular expressions using the $regex operator. However these regular expression queries have a downside, all but one type of regex makes poor use of indexes and results in performance problems. For a production server with large amounts of data, a bad regex query can bring your server to its knees.
In 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.
Redis 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.
We are happy to announce the general availability of our hosted mongodb services in the Digital Ocean Toronto data center. This gives our Canadian customers access to a fully managed MongoDB-as-a-service solution in a Canadian datacenter. The entire feature set of our Digital ocean service is available in the Toronto data center.
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.
MongoDB 3.0 with WiredTiger introduces a new feature called ‘Index prefix compression’ which greatly reduces the memory consumed by the indexes. Less memory used by indexes means more memory for document storage or other indexes which implies better performance.
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 .
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.
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”.