Why dating app Doubble matched with CockroachDB

Last edited on April 16, 2023

0 minute read

    It’s estimated that there’s over 380 million people across the globe that are active on online dating apps – and that number is only growing. In fact, the market for online dating services is projected to reach 9.2 billion USD by 2025. That’s a lot of swiping!

    The dating industry is built on delivering a great customer experience. Not only do you need your users to like the functionality of your platform, but they also put a lot of trust into your organization to help them find a match.

    Unlike the usual one-to-one matching system, Doubble was created to match pairs of friends. The concept behind the dating app is to make users feel more safe and confident when meeting people for the first time. And, if the match doesn’t work out, the user still can enjoy the outing with a group rather than have an awkward solo exit.

    Social apps like Doubble have the ability to quickly grow in popularity. In fact, Doubble attributes 90% of company growth to organic word of mouth meaning that friends encourage friends to download the app so they have better chances of creating “double” matches.

    When your user base starts to grow, development teams have to think about 1) how will our current platform scale 2) how will we enter new markets 3) how do we continue to foster an engaging customer experience? In this post, we will take a look at how Doubble built an infrastructure that can meet the challenges presented by today’s social media platforms.

    How do you scale?Copy Icon

    For context, we will cover the key tech stack components of Doubble as told by Mattias Siø Fjellvang, CTO and Co-Founder of Doubble.

    They use Flutter (by Google) which is an open-source software development kit used to build multi-platform applications from a single codebase. Flutter is powered by Dart which is a programming language similar to Javascript and specially designed for the needs of user-interface creation.

    The prototype for Doubble was built on MongoDB, a popular NoSQL, document-oriented database. Given the nature of the data that Doubble was collecting and the relational structure, they started to run into performance and scalability issues with MongoDB. This was extremely concerning to them because they were only dealing with a small number of users at the time, and were already worried about scaling and latency.

    Instead, they realized they should be using a relational database (like PostgreSQL) to support their data structure and also a system that could achieve distributed scale for a global user base. They came across CockroachDB which seemed to meet all of their needs and started refactoring their platform.

    They already had Copilot (by Github) implemented into the code so that made the rewriting process substantially easier. If you aren’t familiar, Copilot is an AI developer tool that can automatically help predict what code to write and also make suggestions based on questions that you ask it. Mattias reports that it saved them “thousands of hours” and is an “incredible tool”. The full migration to CockroachDB took a few months, but was “well worth it.”

    With CockroachDB, Doubble’s team can simply add nodes to their cluster to accommodate an increase in workload volume. The data will automatically rebalance among the nodes in the cluster and every node can handle reads and writes (which helps avoid database hotspots).

    In short, a horizontally scalable, relational database was what Doubble needed to accommodate user growth and maintain performance. There were also two other significant challenges CockroachDB would help them tackle: expanding to new markets and maintaining a great customer experience.

    How do you expand to new markets?Copy Icon

    Doubble was initially launched in Denmark in 2021 right after the height of the Coronavius lockdown. People were eager for new experiences and Doubble received positive feedback from early users on the social aspect of the app. They wanted to bring the platform to new cities so why not start with the most difficult market?

    All the other major online dating apps have a presence in the L.A. and they wanted to tackle the challenge head on. However, soon after Doubble realized that with minimal budget (the U.S. market was much more expensive) and a very specific target location (they used TikTok for influencer marketing but it was hard to target people just in L.A.), it was not the right fit at the time. People in L.A. loved the concept, but it was only one city and users ran out of matches fairly quickly.

    Although the L.A. launch did not go as planned, it was a good learning experience for the team. They updated the onboarding flow to guide users to invite their friends to the app to increase organic signups. They adapted to the market they knew well (Denmark residents ages 18-25) and took an “inside-out approach” to move the business forward. They launched Doubble in two nearby countries that Denmark residents frequented: Sweden and Norway.

    Because their infrastructure was built on CockroachDB, they can quickly spin up new regions and they have the ability to pin data to a particular region to 1) improve application performance and 2) meet various data compliance/privacy regulations. Even though they will be running in multiple regions, CockroachDB still functions as a single logical database so you can get a holistic view of your data regardless of where the user is located.

    How do you improve the customer experience?Copy Icon

    There’s two crucial aspects to thriving in the social media app world 1) your app must always be available and performant and 2) you must be able to quickly adapt to changing customer demands.

    Doubble has a “contact support” button embedded in its app so if a user is experiencing issues, they get immediate assistance. With these types of platforms, Mattias remarked that if users can not access their dating profile “they often become stressed, and it’s a huge problem!”

    Because CockroachDB has built-in resilience via 3x replication, it can survive an AZ or node failure without skipping a beat. With a multi-region setup, CockroachDB can survive a regional outage as well. Always on availability is a crucial component of delivering an great customer experience.

    Additionally, Doubble has the challenge of keeping up with the demands of their customer base. For example, Mattias said they needed to flip the language to Dutch to prepare for launching the app in Holland. They were able to make the language update in production with zero issues, and flip back to the original value (language) five minutes later.

    Since CockroachDB is a distributed key value store, you can use a specific syntax and access a consistent view of the database at a certain moment in time. It’s a great way to do quick fixes, and it’s an easy performance hack because if you are looking up static data, CockroachDB can fetch it from any replica in the cluster. Mattias reports that features like this are of “huge value” and “pure joy.”

    What’s next?Copy Icon

    Doubble has proven that they can successfully launch their app in new markets and they will continue to grow their global user base. After the Nordics and another round of fundraising, they plan to tackle L.A. and the U.S. market once again. Mattias noted that “trust is a key issue they are solving” and they see that it can be a bigger problem in the U.S. which is why Doubble is needed now more than ever.

    They also plan to launch premium features which is a standard way for these types of free social media platforms to make money. All the current features will stay the same, but they will introduce new capabilities that people can buy which will help them build a more profitable business.

    Do you relate to Doubble’s story and growing pains? If so, get in touch to see how CockroachDB can help.

    app development