Poolside tensions can run high during swim meets. Swimmers, parents, and coaches all need an easy tool to help them stay on track, and when thousands of swim meets are happening at the same time around the world, scalability is critical. SwimTopia swim software was created to make running a swim team less work and more fun. For its developers behind the scenes, Heroku helps make deploying and scaling the app more like a lightning-fast freestyle than a slow crawl.
Back in 2010, Mason Hale was the CTO of a technology startup. He was also the parent of competitive swimmers and very much involved with his kids’ swim team. He witnessed first hand the pain of orchestrating a swim meet, where competitors have to be prepped and ready to go, and races have to execute like clockwork. Due to his technical expertise, the coach asked Mason if he’d be willing to help out by running the team’s computer system. He agreed, and was then handed the team’s laptop with swim team software based on an archaic Microsoft Access database installed.
The challenge of managing swim teams—in the heat of the meet
Before each swim meet, Mason’s job was to make sure all the relevant data was entered into the swim team database, such as which kids planned to swim in each of the various events. This included lots of emailing with parents, as well as coordination with coaches who would designate teams for relay races. With 250 kids on the team, things could get chaotic quickly, especially shortly before and during the event. Some kids would get sick, others changed their mind at the last minute, and it was tough for Mason to keep track of it all. If a mistake was made, then swimmers missed their opportunity to participate, resulting in crying kids and angry parents. Clearly, the manual process and antiquated tools were inadequate.
Mason wanted to design a better system to help the team stay organized, and the idea for SwimTopia was born. He started out building a simple PHP website hosted on a virtual private server (VPS) that allowed parents to log in and make some changes themselves. This cut down on the volume of emails to Mason, however the solution was fairly basic and not scalable. Around that time, Mason began expanding his vision for the tool. To realize its full potential, he wanted to build a platform that could support multiple teams—and could be extended to support multiple types of sporting events. To do this, he needed to take SwimTopia to the cloud. So he created a new company, Team Topia, and began searching for a cloud-based solution.
Heroku saves time and offers best practices
At his day job, Mason’s company had been working with a number of cloud services, including AWS, that offered the level of control and scalability that could support his vision for SwimTopia. He considered building on AWS, but didn’t want to deal with the complexities of spinning up and managing servers. Mason experimented with porting his PHP site to the Google Compute Platform, but at that time it required significant customization to migrate his app successfully. He couldn’t use a standard SQL database and there wasn’t broad language support.
Mason had read about Heroku on Hacker News and decided to give it a try. He liked the simplified developer experience and flexibility of the platform. One of the things that appealed most was the lack of vendor lock-in—he could move off of Heroku any time he wanted—which gave him even more flexibility and peace of mind. He also appreciated Heroku’s 12-factor approach, which provides a proven methodology for building cloud native applications. At previous jobs, Mason had struggled with some common challenges, such as deploying multiple systems that need to coordinate with each other. He appreciated how Heroku incorporates these best practices into the platform’s design.
Heroku is founded on best practices for building and running apps in the cloud. The platform guides you, so everything goes smoothly and you save time. Mason Hale, Founder & CEO, Team Topia
Heroku’s managed platform was another bonus for Mason and his new startup, Team Topia. At his previous company, Mason’s team managed much of their own infrastructure, spending valuable time just setting up servers and updating operating systems. Occasionally, Mason himself would get paged in the middle of the night to troubleshoot issues. With Heroku, he doesn’t have to deal with any of that. Heroku takes care of everything at the infrastructure level, which frees the Team Topia team to focus on building the best possible user experience. Nowadays, Mason may receive a rare alert about a database issue, but by the time he investigates, he gets a second alert that the issue has already been resolved. Those types of messages make him happy.
One of the appeals of Heroku is not having to worry about the infrastructure details. Not having to hire someone to do the DevOps part of the job is huge for us. Mason Hale, Founder & CEO, Team Topia
Building out the SwimTopia platform
For its first few years, the SwimTopia platform existed as a website only. Mason grew the business, season-by-season, building up to a current team of seven employees. The team gradually extended the feature set to include online registration, volunteer coordination, website content management and team communications. Mason and team then launched a mobile app, adding another method of engagement for event coordinators, participants, and parents. More recently, the company launched a third product called "Meet Maestro" that focuses on swim meet operations. The new app integrates with timing systems and enables teams to capture competitor times, disqualifications, and other metrics.
Meet Maestro syncs event data with the mobile app, allowing parents to see competition start times and race results in real time. This has been a game changer for parents, who have traditionally had to sift through a dozen or more pages of a “heat sheet” to find their child’s scheduled races, and had to search through pages of results taped to the wall to find their swimmers’ times. SwimTopia’s mobile app replaces all that, allowing parents and swimmers to know exactly when and where they need to be during the meet and to see how the swimmers performed.
In addition to their customer-facing apps, SwimTopia is running backend APIs for the SwimTopia Mobile and Meet Maestro apps, all of which store data in Heroku Postgres. They're running a number of worker dynos, along with Heroku for Redis and Sidekiq, to process background jobs. At previous companies, Mason had developed a preference for PostgreSQL, and Heroku's managed service was a perfect fit for SwimTopia.
Heroku Postgres gives us all the benefits of PostgreSQL without having to spin up and maintain the databases ourselves. Heroku has been doing this a long time—I believe they’re running one of the biggest PostgreSQL fleets on the planet. Mason Hale, Founder & CEO, Team Topia
Summertime brings traffic spikes and scale
Swim meets are a seasonal business. During the summer, SwimTopia’s platform usage increases 10-fold, with most of that traffic concentrated within a span of a few hours on Saturday mornings, when the bulk of swim meets are happening. SwimTopia has to perform seamlessly during those critical moments when anxious swimmers, parents, and coaches need the most support. During meet time, SwimTopia’s support team sets up mission control and keeps a close eye on performance using Heroku’s platform tools and select add-ons. The Heroku platform’s ease of use enables anyone on the team to manage app operations, which means that Mason hasn’t had to hire a dedicated DevOps engineer.
Heroku makes it easy for us to manage app performance. Between the platform’s built-in features and Heroku Add-ons, we have all the DevOps tools we need readily available. Mason Hale, Founder & CEO, Team Topia
Team Topia has made great strides towards their ultimate goal of full automation. They primarily use the Heroku Add-on Rails Autoscale to monitor traffic and manage scale, which also provides additional manual controls when needed. Based on request queue time, the tool monitors capacity and automatically scales dynos up or down.
The team currently scales worker dynos manually, which are used to send out push notifications to the mobile app. During traffic spikes, those background jobs can slow down. Rails Autoscale has recently released a feature that looks at the depth of the queue, how many jobs are pending, and will scale up more workers to accelerate processing. The team is also considering adding more caching layers using MemCachier, as well as using the PgBouncer buildpack to manage database connections.
When issues arise, the Heroku Support team has helped Team Topia get back on track quickly. For example, on one occasion, they experienced a database outage due to memory issues. Mason filed a support ticket and texted his Heroku account rep to get eyes on it quickly. He went into his console, scaled up database performance, and 15 minutes later recovered normal operations. After the incident, Mason worked through a variety of use cases and scenarios with Heroku Support to identify optimal Heroku Postgres memory allocation. Since then, Team Topia has kept Librato provisioned to monitor mission critical database performance metrics.
The Heroku Support Team and my Account Rep have really stepped up when we needed help - they have even given me suggestions that have saved me money. I genuinely feel they are looking out for what is best for my company. Mason Hale, Founder & CEO, Team Topia
Once the season has ended, Team Topia scales their dynos and databases down to serve a lower level of traffic for the remainder of the year. This gives the team some quiet time to work on new features and experiment with new ways to address scaling the platform, so they can better serve more teams and more swimmers the following year.
The wider world of team sports
SwimTopia has been a boon to more than a thousand swim teams around the world, which has prompted other sports organizations to express interest. For example, a snow skiing team is currently using Team Topia’s platform, which is an easy cross-over as ski competitions are time-based, similar to swimming. However, Mason’s greater vision is to evolve his platform on Heroku to serve a much broader landscape of team sports—each with their own seasonal scale.
Inside SwimTopia on Heroku
The SwimTopia platform is built in Ruby on Rails and stores data in Heroku Postgres. The apps use worker dynos along with Heroku for Redis and Sidekiq to process background jobs. SwimTopia used a number of Heroku Add-ons, including Librato for performance metrics, Scout for monitoring app health, Rollbar for error tracking, Rails Autoscale for queue-based autoscaling, and Heroku Scheduler for job scheduling.