Encryption at rest is a new feature that is available for MongoDB Enterprise when using the WiredTiger Storage Engine. Although you can evaluate MongoDB Enterprise using the evaluation agreement, you would need a MongoDB Enterprise subscription for each server to use it in production.
With a MongoDB Enterprise Advanced subscription, you can enable encryption at rest via Cloud Manager (using Automation). You would need to pass the encryption parameters, as mentioned in Configure Encryption through the The Cloud Manager Advanced Options.
Please note that as the system key is external to the server (i.e. kept separate from the data and the database keys), and therefore still requires external management. Please refer to Key Management for more details on this. If you are interested in MongoDB Enterprise Advanced subscription, please contact a MongoDB Account Executive.
Getting Started with MongoDB Compass
MongoDB’s flexible schema and rich document structure allow developers to quickly build applications with rich data structures. However, this flexibility can also make it difficult to understand the structure of the data in an existing database. Until now, if you wanted to understand the structure of your data, you would have to use the MongoDB shell to issue queries and view data at the command line. There has to be a better way -- enter MongoDB Compass . What is MongoDB Compass? MongoDB 3.2 introduces MongoDB Compass -- a graphical tool that allows you to easily analyse and understand your database schema, as well as allowing you to visually construct queries, all without having to know MongoDB’s query syntax: MongoDB Compass was built to address 3 main goals: Schema discovery Data discovery Visual construction of queries Schema Discovery Compass displays the data types of fields in a collection’s schema. The example below is taken from a mock dataset that I use when test driving Compass. It reports that there are documents in the collection that contain a field last_login with the type date: Compass also displays a percentage breakdown for fields with varying data types across documents. In this example, 81% of documents store phone_no as a string, and the remaining 19% store it as a number: For sparse fields, where some documents omit a value, Compass displays the percentage of missing values as “undefined.” Here, the age field is missing in 40% of the sampled documents. This is exceptionally useful to understand whether your application is storing data the way that you expect it to. Imagine the case where you have a field showing a mix of strings and numbers - perhaps there is an application bug somewhere that has crept in and is storing data with a different type than it should be? Data Discovery Compass is able to show histograms to represent the data frequency and distribution within a collection. For example, here is a data set containing the age of users. We can see the minimum age is 16, the maximum age is 56 and the most popular age is late 30’s (the exact value is shown by hovering over the bar itself). Here’s another example using a field that stores names. Compass will display a random selection of string values for the field: Visual Construction of Queries Do you want an easier way to type out a MongoDB query? Charts in Compass are fully interactive. Clicking on a chart value or bar will automatically build a MongoDB query that matches the selected range in the interface. In the example below, clicking on the “JFK” bar builds a query matching all documents whose departureAirportFsCode field matches “JFK”: Clicking on other field values adds the field and range to the selection, creating a more complex query. Continuing with our example, we can select a particular flightId in addition to departures from JFK Airport. Once you hit the Apply button, Compass will execute the query and bring back the results! It’s as easy as it sounds. You can be building queries with a few clicks of a button in no time at all. One final thing to mention - we didn’t forget about the JSON. Documents can be examined in the document viewing pane. This can be expanded by clicking on the Document Viewer icon on the right-hand side of the page: I know you must be wondering - where can I get this thing?! Well, MongoDB Compass is available in the download center on mongodb.com . It comes included for production use with our subscriptions, both MongoDB Professional and MongoDB Enterprise Advanced. MongoDB Compass can also be used for free in a development environment. This is only version 1.0 of Compass - there is lots of great functionality to come. I’m super excited to be part of the Compass team and I can’t wait for the next set of releases. Give MongoDB Compass a try today. Download MongoDB Compass About the author - Sam Weaver Sam Weaver is the Product Manager for Developer Experience at MongoDB based in New York. Prior to MongoDB, he worked at Red Hat doing technical presales on Linux, Virtualisation, and Middleware. Originally from Cheltenham, England, he received his Bachelors in Computer Science from Cardiff University. Sam has also cycled from London to Paris, competed in several extreme sports tournaments such as ToughMudder, and swam with great white sharks.
Splitit & MongoDB Atlas: Racing to Capture a Global Opportunity
Splitit is a global payment solution that allows businesses to offer installment plans for their customers. Unlike with other buy now, pay later (BNPL) solutions, Splitit shoppers can split their online purchases into monthly installments by using their existing credit, without the need for registration, application, or approval. “We have a very different proposition than others in this space,” says Splitit’s CTO, Ran Landau. “We’re not a financing company. We utilize the customer’s existing credit card arrangement, which allows us to accommodate smaller average deal values and a broader range of installment schedules.” Splitit works with online retailers across all market sectors and diverse price points, and recently raised $71.5 million in investment to fund global expansion. Following its IPO in January 2019, the business had seen strong growth as more consumers moved from brick and mortar to ecommerce. Then COVID-19 hit, and online shopping boomed. Landau recognized that the company needed to quickly scale its infrastructure in order to capture this large opportunity. The Need for Speed Landau joined Splitit in May 2019 and worked to modernize the company’s infrastructure. At the time, the team was using a traditional relational database. “As tech leaders, we need to make the right decision,” he says. “When I came to Splitit, I knew I needed a powerful NoSQL server so that my developers could develop faster and so that we could scale – both things that our relational databases were failing to deliver.” In the interest of getting up and running quickly, Ran’s team thought that they could move faster using a cloud-provider database that mimicked MongoDB functionality. He had used MongoDB before and saw that this solution offered the same drivers he was familiar with and claimed compatibility with MongoDB 3.6. Initially, the new solution seemed fine. But as the team started to migrate more data into the database, however, Landau noticed a few missing features. Scripts for moving documents from one collection to another were failing, and overall performance was deteriorating. The application became slow and unresponsive even though the load on the database was normal. “We were having issues with small things, like renaming collections. I couldn’t search or navigate through documents easily,” recalls Landau. Offline Database: A Breaking Point Then one day, the application was unable to communicate with the database for 20 minutes, and when the database finally came back online, something wasn’t right. Landau contacted support, but the experience was not very helpful. “We were not pleased with the response from the database vendor,” he explains. “They insisted that the issue was on our side. It wasn’t so collaborative.” Fortunately, he had taken a snapshot of the data so Splitit was able to revert back to an earlier point in time. But the incident was troubling. Other teams also had been complaining about how difficult it was to debug problems and connect to the database successfully. Landau knew he needed to find a better solution as soon as possible. MongoDB Atlas: A Reliable, Scalable Solution Landau believed that MongoDB was still the right choice for Splitit, and investigated whether the company offered a cloud solution. He discovered MongoDB Atlas and decided to give it a try. “The migration to MongoDB Atlas was so simple. I exported whatever data I had, then imported it into the new cluster. I changed the connection strings and set up VPC peering in all of my environments,” says Landau. “It was incredibly easy.” Not only was MongoDB Atlas built on actual MongoDB database software, but it was also secure, easy to use, and offered valuable features such as Performance Advisor . “It can tell you which indexes need to be built to increase speed. It’s such a powerful tool — you don’t need to think; it analyzes everything for you,” explains Landau. Another great feature was auto-scaling. “My biggest concern as I scale is that things keep working. I don’t have to stop, evaluate, and maintain the components in my system,” says Landau. “If we go back to doing database operations, we can’t build new features to grow the business.” Auto-archival Made Easy with Online Archive As a business in the financial services industry, Splitit needs to comply with various regulations, including PCI DSS . A key requirement is logging every transaction and storing it for auditing purposes. For Splitit, that adds up to millions of logs per day. Landau knew that storing this data in the operational database was not a cost-effective, long-term solution, so he initially used an AWS Lambda function to move batches of logs older than 30 days from one collection to another periodically. A few months ago, he discovered Online Archive , a new feature released at MongoDB.live in June 2020. With it, Landau was able to define a simple rule for archiving data from a cluster into a more cost-effective storage layer and let Atlas automatically handle the data movement. “The gem of our transition to Atlas was finding Online Archive,” says Landau. “There’s no scripting involved and I don’t have to worry about my aging data. I can store years of logs and know that it’s always available if I need it.” Online Archive gives me the flexibility to store all of my data without incurring high costs, and feel safe that I won't lose it. It's the perfect solution. Ran Landau, CTO, Splitit With federated queries, the team can also easily analyze the data stored in both the cluster and the Online Archive for a variety of use cases. Ready for Hypergrowth and Beyond Looking back, Landau admits that he learned his lesson. In trying to move quickly, he selected a solution that appeared to work like MongoDB, but ultimately paid the price in reliability, features, and scalability. You wouldn't buy a fake shirt. You wouldn't buy fake shoes. Why buy a fake database? MongoDB Atlas is the real thing. Ran Landau, CTO, Splitit Landau is confident that his investment in MongoDB puts in place a core building block for the business’ continued success. With a fully managed solution, his team can focus on building features that differentiate Splitit from competitors to capture more of the market. “We saw our growth triple in March due to COVID-19, but the sector as a whole is expanding,” he says. “Our technology is patent protected. Everything we build moving forward will be on MongoDB. As a company that’s scaling rapidly, the most important thing is not having to worry about my scaling. MongoDB Atlas takes care of everything.”