EventJoin us at AWS re:Invent 2024! Learn how to use MongoDB for AI use cases. Learn more >>

Surfline Case Study

Scaling the Waves with Surfline on MongoDB Atlas
Since 1985, Surfline has been connecting people to the ocean. Surfers rely on the company’s forecasts, maps, and 500 worldwide cameras to know where to go and what to expect. Surfline’s expertise is derived from their 30-year data set and proprietary data modeling. To manage and work with that data, they use MongoDB.
With Surfline’s interactive map, users can explore the coastline and discover the best surf spots. To bring it to life, the team uses MongoDB’s geospatial indexes to allow users to quickly query for spots within user-specified bounding boxes. The $near operator, which specifies a point for which a geospatial query will return entries from nearest to farthest, helps users easily find the closest surf spot to their current location. And finally, MongoDB’s native graph capabilities help model relationships between different surf spots.

Surfline started using MongoDB back when they were running in a physical data center. A few years ago, they moved to Amazon Web Services, but continued self-managing their MongoDB deployment. Matt Walker, Senior Engineering Manager at Surfline, recalls how they maintained their servers. “When running MongoDB ourselves, we built a lot of tooling to support backups, to manage users, and to monitor MongoDB clusters.”

For examples, backups were taken with mongodump, managed by a series of Python scripts, and pushed to Amazon S3. Not only was this process error-prone, but it also impacted the performance of their production database.

As the company grew, the engineering team felt the burden and inefficiency of managing their own tooling and Gavin Cooper, Senior Director of Product and Engineering, knew it was time to make a change. “Over time, we also realized that what we had originally provisioned was may more than what we needed. And at that point, we could have either reprovisioned a cluster to again manage ourselves or just migrate our data to MongoDB Atlas and never have to worry about this problem ever again.” After the move, a weight was lifted off the team.

“With Atlas we don't have [to worry about those issues], because we know that it's configured the way it should be and that MongoDB is handling running the database for us.” Cooper notes.

Beyond removing the operational workload, moving to MongoDB Atlas has prepared the team for scaling with the waves, literally. Surfline’s traffic is based on fast-changing weather events, like a hurricane, and as such, the team has a unique way of predicting scaling demands, “We actually use our own surf forecast product to determine when we need to scale out the cluster or scale the cluster back in. And to actually do that inside of MongoDB Atlas is a dream. You just log in, you change the number, and press go. And it does it for you.”

“I think whether you've got 20 engineers or 100 engineers, you don't want to be working on stuff that isn't really differentiated for your business. And managing a database cluster falls into that category. It's critical that it works and it's performing, but we can offload that to the professionals, and that's MongoDB.”

Sign up for the Atlas free tier to get started with MongoDB today.

How Do You Quantify the Value of a Database?

See what benefits our customers have realized with MongoDB.