Our release this week is a tiny bit delayed, for those of you who are tracking it, due to an internal MongoDB engineering conference. There’s lots going on here at HQ, including but not limited to our upcoming release of MongoDB 2.8 .
As for the MMS release this week, we’ve been very busy:
UI & Core
- Additional API functionality (users can now add host aliases)
- Changes to the settings page - users can now leave a group, add a group, and go to each group via their personal groups list
- Additional instructions for command line for the automation agent. If you’ve never used the command line before, we’ve got you covered. There’s also a fancy copy-to-clipboard widget.
- Ability to define CNAMEs for config servers that are provisioned on own hardware (i.e. where the customer is managing DNS themselves).
- For backup customers, you’ll notice that restore jobs now calculates download/transfer time estimate and displays it in the UI
- New backup and monitoring agents that work with RHEL7
- and the newest version of Monitoring Agent will now send dbStats for all databases, even if you have more than 100 of them!
Check out all these updates and more at mms.mongodb.com !
Part 2: Your App is Taking Off, Now What? It’s Time to Scale Out MongoDB.
In our first post on scaling , we discussed fundamentals of designing a performant and scalable application on MongoDB. Once you’re confident that your application is healthy and ready to grow, it’s time to think about scaling. Before jumping into it, make sure you consider the different ways to scale, and beware of the potential pitfalls: 1. Understand Why You’re Scaling, and What Issues Are Down the Road There are a lot of ways in which an application could be experiencing growth – or constraints to growth! Your workload could be predominantly reads or predominantly writes. Maybe your access operations are under control, but your data volume isn’t. As you grow, you could hit bottlenecks caused by bad schema decisions, inefficient indexing, insufficient RAM, disk speed, network latency, poor planning of transactional vs. analytical queries, or any of dozens of other factors. All of these root causes have different potential solutions. Choosing the right strategy requires understanding your dataset, your users, how you expect to grow, and more. 2. Understand the Trade-Offs: Horizontal vs. Vertical Scaling While MongoDB makes it easy to horizontally scale out with built-in automatic sharding, sharding – or adding more shards – isn't always the only answer. In some cases, making improvements to your hardware can remove constraints that you might be encountering. For example, if your dataset grows and your working set no longer fits in RAM, you might invest in more RAM before deciding to scale out to more machines. Similarly, in some instances, it might make sense to add more or faster disks, or upgrade to SSDs. 3. Choose Your Shard Key Wisely MongoDB supports multiple shard key policies to match your needs. Your shard key selection will impact performance of your cluster. It’s critical that you pick the right key based on your application requirements and expected usage patterns. You want to ensure both even distribution of writes and query isolation – i.e., that queries are targeted to a single shard as much as possible, rather than broadcast (scatter/gather) to all shards. By thinking about these issues before choosing a shard key, you can ensure scalable growth and avoid common sharding pitfalls . So how do I make these decisions about scaling? Take advantage of the many resources we provide. You can start by talking with an expert about scaling strategies for free . When you’re ready to take the next step, our Deployment Topology consulting package is a great way to evaluate your scaling options. And you can always check out our documentation and white papers for more tips.
Built With MongoDB: FanPlay
Pritesh Kumar and Bharat Gupta co-founded FanPlay Technologies at the beginning of the pandemic that shook the world in 2020. With their real money gaming (RMG) product, they’ve joyfully brought thousands of people together across India in a safe way, while establishing the country’s leading gaming app. For this segment of #BuiltWithMongoDB, we spoke with Pritesh about their company’s business model, how MongoDB is working to their advantage, and what celebrities are already utilizing their platform. MongoDB: What prompted you to build FanPlay? Pritesh: The emergence of COVID-19 really prompted me into the startup world again. I’ve been a founder in the past, and I knew that at this time a lot of new companies would emerge, so I decided to be part of that. The idea for FanPlay came from observing Cameo . I was really impressed by its strong viral growth and its monetization of influencers. I think these micro influencers on the platform, although they don’t make a lot of money for a single video, can add massive value to any business. And at the same time, we were looking at the RMG industry, which was and still is the fastest-growing space in online gaming. But there is a real problem of very high customer acquisition cost. So, we put one and one together and started building an influencer-led, RMG platform. We get influencers to host real-money trivia games for the fans and followers on our platform. Typically these influencers promote their own shows on their social media platforms. They gather an audience from YouTube, TikTok, and various other channels, and then they come to our platform for the gaming experience. The audience usually pays a small entry fee. From that entry fee, a prize is created, that prize goes to the winner of the game, and from that prize we take a cut. So this is our business model. MongoDB: What was your initial vision for the product, and what does it look like today? Pritesh: The product has changed a lot from what we initially envisioned. We started with a web app initially because we thought that acquiring users on the web would be much easier, but then we launched our free Android app and it did very well. From there we launched our paid-entry model. So the product has gone through three iterations so far. In the beginning we worked a lot with Instagram influencers and realized that we needed to be working with influencers on YouTube, and specifically with people more regionally significant to India, where most of our business is at the moment. We have also expanded to hosting established faces from Instagram and YouTube. MongoDB: Can you tell us about the scale of the platform? Pritesh: Currently we work with about 500 influencers that have a lot of visibility, and we host roughly 20,000 active users daily, from India. Typically we run about 20 games per day, and we’re working to scale that to 100 per day. MongoDB: What does your tech stack consist of? Pritesh: The app is built in React Native, and the back end is Node.js. Then of course for a database we use MongoDB. MongoDB was a very clear choice for us. From a professional standpoint, as an early-stage startup, you don’t know what your product will eventually turn into, right? How will it evolve in the next six months or a year? So it’s difficult to stick to a schema. Therefore, you need a lot of flexibility. Because of our need for flexibility, SQL was out of the question, so we needed to go with NoSQL. Once we decided on NoSQL, MongoDB became the obvious choice because of the community support and documentation. As a founder, I believe in really fast execution and putting your product out there, rather than waiting for a pitch-perfect product. And that demands a lot of flexibility from the business, product, and tech sides, because we need to be able to make immediate changes based on the features that are demanded and that catch the users’ attention. With MongoDB, we are able to try a lot of product variations or tweaks very quickly. MongoDB: As you've scaled, is there a particular MongoDB feature you've benefited the most from? Pritesh: There are a few features of MongoDB Atlas that have benefitted us a lot. One is the performance metrics. It’s really really amazing, actually. You can get a very clear picture of the state of your database in a single snapshot. It helps you buy time to focus on shipping your core product and the technology behind it. It removes your focus on database management and cluster management and just does it for you right out of the box. Also, Atlas handles all of the sharding and scaling. And something that I didn’t foresee but found very useful is its scalability. Startups tend to start at a scale where the free version of any cloud product would be good enough, right? But then you quickly move into a very different kind of need and scale. It just keeps on changing! Atlas gives us that flexibility to scale up really quickly with a very minimal amount of effort. MongoDB: Have you used any of the MongoDB for Startups services? Pritesh: Yes! We had a session with a technical advisor. I found it really helpful for addressing the key features we are launching in the future, and the main challenges we are going to face when building them. I was able to discuss those and was very satisfied. The session was really good for us. MongoDB: Who is the most well-known celebrity to have hosted a game so far on FanPlay? Pritesh: The comedian Kumar Varun ! MongoDB: Who is your favorite TV or game show host? Pritesh: Amitabh Bachchan , who is a household name in India for his acting and for his role as host of Kaun Banega Crorepati (India’s Who Wants To Be A Millionaire). MongoDB: What is your favorite podcast or blog? Pritesh: The InfoQ Podcast . It goes deep into how organizations build challenging tech products. Looking to build something cool? Get started with the MongoDB for Startups program.