X
Innovation

Spin Class 2.0: When fitness meets the cloud, data and gamification

Here's a look at how Peloton uses the cloud to distribute its spin classes both live and on-demand as well as what it chooses to build in-house.
Written by Larry Dignan, Contributor
peloton-bike-angled-1162.jpg

Peloton is a startup focused delivering virtual spin classes via distributed video and a $1,995 bike that is also an integrated hardware and software system.

The company, which has been opening up showrooms in major cities and shopping outlets, offers unlimited streaming rides live and on-demand as well as an app with content. Peloton's goal is to use gamification to spur competition and engagement among riders.

Peloton's approach could ultimately lead to expansion beyond bikes even though there are no immediate plans. Peloton has a custom database to fuel its leaderboard and relies on Amazon Web Services for its infrastructure.

fengyony.jpg

Peloton CTO Yony Feng

We caught up to talk shop with Peloton co-founder and CTO Yony Feng to talk shop.

What are the technology demands for your live and on-demand streaming of spin classes? "Our whole idea is that we're bringing a distributed spin class to everyone around the world like they feel like they are in the same virtual room," said Feng. "The challenges are timing and synchronization if a live class. We need the stats and videos real-time."

What about on-demand classes? Feng said on-demand classes, which represent 60 percent to 70 percent of streams, have a different challenge that revolves around having the same level of engagement as live classes. Peloton's leaderboard feature needs to have a long-term memory. "IT has to have the metrics of everyone who has taken a ride before and those measures need to be permanent," said Feng. "The replay of the stats are to have the same level of engagement as a live class."

How does the cloud fit into the mix? Feng said all of Peloton's servers run on AWS and power the real-time platform. Peloton maintains a virtual cluster of about 300 machines in production. The key item for Peloton is ensuring that the data is passed between the leaderboard and the participants. "Every second we are processing everyone that has done that class before and live and sorting," said Feng.

As for scale, Peloton typically has thousands of people on the platform simultaneously. The leaderboard has to show people historical and live data as well as filters to sort on folks they want to follow.

Are there compute functions Peloton has to do itself? Feng said AWS hosts the servers, and Peloton cherry picks others. "One conscious decision we made is that we have to have our own database to optimize storage and retrieval for tour leaderboard system," said Feng. "Due to our unique characteristics we have our own cluster database solution." Why? Feng said that if it used an off-the-shelf database it would have to heavily customize it. Peloton utilizes multiple databases such as Postgres and Redis and has looked at AWS options too. "No matter what off-the-shelf database we chose we would need sophisticated and complex application logic as a supplement," explained Feng. "We'd need custom code because we needed the database to do one thing well and have high availability."

What's the downside for that approach? Availability is the biggest risk, said Feng. Peloton has to plan for slave machines and have a hot backup running at all times. Data also needs to be synchronized. "There's a cost associated with that," he said.

bike-console-1162.jpg

What's the peak traffic? Feng said that Saturday and Sundays at 10 a.m. eastern time represents the peak. "The west coast is getting up and the east coast is warmed up," said Feng. "There's a combination of live and on-demand traffic, which mirrors when people want to ride." On weekends, 60 percent of Peloton's streams are on demand with the remainder live. The highest live traffic comes when Peloton invites local riders into its studio in New York.

How about the app strategy? Feng said Peloton's iOS app revolves around delivering content to subscribers. Peloton's app serves as a complement to customers who may be traveling or off its bikes. The long-term plan is to have an Android app. "In the application space, we're still in the testing phase of our user experience," said Feng. "We want to solidify the use case."

studiohannahdesktop2x.jpg

Is there a software-only strategy in the future? Feng said the value in the Peloton experience is the integration of the bike, workout and classes. "All equipment is tailored to the coaching style and ability to control the experience with the hardware and software together," said Feng.

What about wearables? Wearables would have the ability to add additional sensors and data to the Peloton experience, but the integration is tricky. Various standards and wearable devices make it difficult to mesh additional sensors to the Peloton system.

How do gamification and the user interface mesh? Feng added that gamification is what motivates people and brings them back. "When there's a community a customer is addicted to the bike and wants a higher output than someone else," he said. "The layer of competition is gamification." Peloton awards badges and uses gamification to ensure interaction with instructors and the class.

What about the front end UI? Feng said Peloton's displays on the bike are Android-based but heavily customized. Peloton provides its own system updates and has custom trouble shooting processes and applications installed.

Editorial standards