How has the recent turmoil within the OpenAI offices changed your plans to use GPT in a business process or product in 2024?
Increased uncertainty means we are more likely to evaluate alternative AI chatbots and LLMs.
No change in plans, though we will keep an eye on the situation.
With Sam Altman back in charge, we are more likely to go all-in with GPT and LLMs.
What recent turmoil?
Frontend Development / Software Development / Tech Life

How to Support a Million Users on Your Website: A Success Story

StoryGraph’s welcome email promised to import data from a user's Goodreads, but the site never handled thousands of imports at a time, and the sudden backlog would take months to process. Here’s how Nadia Odunayon conquered the many challenges of scaling a website for large-scale success.
Dec 18th, 2022 6:00am by
Featued image for: How to Support a Million Users on Your Website: A Success Story

In October, at the “Dream Hollywood” hotel in, Los Angeles, California, developer Nadia Odunayo told the inspiring story of how she’d built her site and garnered over 1 million registered accounts — almost single-handedly — in just 29 months.

As one of two co-founders of The Storygraph — and its only web developer — Odunayo looked back on how their small company had stayed resilient, putting itself into a position to take advantage of good luck when it finally came along.

But speaking at the first-ever “Rails SaaS conference,” Odunayo had discussed more than just technology stacks and scaling effectively. She also presented a case study in the founder’s attitude, and ambition mixed with effective decision-making — of successfully identifying all the bottlenecks, but then also identifying solutions and taking successful action.

And at the end of a long and exhilarating journey, Odunayo shared all the lessons she’d learned along the way.

How It Began

With its graphs and charts, the StoryGraph promises readers “simple tracking and insightful stats,” along with personalized recommendations generated through a machine learning algorithm. But the site’s “team” page also explains that it started life as Odunayo’s personal project.

After graduating from Oxford — and a 16-week code camp at London’s Makers Academy — Odunayo had become both a software engineer and a serial entrepreneur. In 2015 Odunayo co-founded Ignition Works, a software consultancy “helping enterprise clients be successful with Pivotal Cloud Foundry.”

Yet Odunayo soon realized that her real passion was books, and decided to build a web application that could help readers find the perfect book. A public beta led to helpful feedback — and an email from software engineer Rob Frelow (who ultimately become the site’s co-founder and chief AI officer).

Odunayo began her talk by looking back to Jan. 1 of 2020. “After working on my startup, The Storygraph, every day for one year straight, mostly alone — we had recently reached the coveted milestone of… 100 user signups.” Those earliest users were friends and contacts in Instagram’s community of book lovers — but also whoever was attracted by word of mouth.

That’s where the challenges began. By June 11, Odunayo’s site had grown to 1,000 users — but within six days it had spiked up to 5,467, after a wave of positive tweets. “And now we had a problem.”

The site’s “welcome” email promised to import data from a user’s Goodreads account into their StoryGraph account — but it couldn’t be done. (At least, not quickly…) The site had never had to handle thousands of imports at a time, and the sudden backlog would take months to process. “I didn’t sleep that night,” Odunayo remembered. “I couldn’t…”

And then the next day… even more tweets started lauding StoryGraph. “Our user numbers were growing by hundreds to a thousand every hour!” Their job scheduler showed 18,364 imports waiting in the queue. “Not only did nobody have their Goodreads import done, nobody had any of our wonderful personalized book recommendations — which were also generated by a background job.”

“The website was at a standstill — and the tweets kept rolling in. I was overwhelmed. I was stressed. I couldn’t handle this. I didn’t know what to do.”

How It’s Going

Here’s where Odunayo delivered her first lesson. “The things that are in your control — ultimately, how you approach building your company and your product — are the things that will determine how you respond, to the good luck and the bad.” Odunayo says in launching her company, she went for the “boring” answer, “not worrying about any growth or scaling pain points I didn’t have yet.” Odunayo advised the audience to stick to what they know — and also use as little of it as possible. “Lean into the most stable, mature, boring platforms and tools.”

In Odunayo’s case, that was Rails. So when facing the deluge of users, Odunayo was confident she was facing already-solved problems. “I wouldn’t be the first to build a Rails app that supported thousands of users.” They re-architected the site so more imports could happen simultaneously, and to speed up their recommendations. There were unfamiliar growth-scaling issues — like optimizing the database’s input/output operations, and upgrading Heroku’s lightweight Dyno containers — so for two long weeks, the two co-founders hardly slept. But they kept up their optimistic positivity, “And after chipping away at all of the resource bottlenecks… we were back in business.”

“And from that point, we continued to grow by at least hundreds of users each day, all via word of mouth.”

Costs kept rising, which Odunayo attributes to “standard SaaS company subscriptions — think Cloudflare, SendGrid, Mailchimp… But our biggest cost was Heroku.” This leads to her second piece of advice: keep your costs low. “At least once a month, we reviewed the list of tools we were paying for, experimented with the lowest tiers of various Heroku add-ons, and switched to open source alternatives wherever possible… We did as much as we could instead of hiring people, and we put in the time to level up where we needed to.”

One example of this came in May of 2021, when — at 180,000 users — they’d realized they needed a mobile app. “We couldn’t afford an iOS or Android developer, so the job was going to fall to me!” But fortunately, Odunayo could turn to Hotwire and Turbo — along with their accompanying mobile adapters — which “gave us a path toward developing semi-native apps in a reasonable amount of time, with all of the dev being kept in-house.” As the company’s only web developer — and its only app developer — Odunayo coded and coded for six full weeks, “mixing Ruby with Swift and Kotlin.”

But their mobile app ultimately helped fuel their growth even more, and by July 8, 2021, they’d grown to over 250,000 registered users.

Trouble from TikTok

Success brings its only challenges. Suddenly a woman they’d never heard of created a viral TikTok that began, “All the hot girls are switching from Goodreads to StoryGraph, and here’s why.” Suddenly 1,600 people were trying to use their app simultaneously — and it kept crashing under the unexpectedly high loads. “We’d never had this many concurrent users before…”

Time for some debugging — and Odunayo soon traced the problem to some inefficient code (which, it turns out, was entirely superfluous) that was still running every time the home page was loaded. The problem was solved — and in the meantime, that viral video continued on to 1.7 million plays and over 300,000 shares. This brought in 40,000 more users in a single day, temporarily pushing the app to #1 in the Books section of Apple’s charts for its U.S. App Store — above even Amazon’s Kindle and Audible apps. By July 28, 2021, they had 310,000 users… And by Sept. 23, it was up to half a million.

Unfortunately, “As our user base grows, our costs are rising by the thousands…” They’d been using Heroku’s platform-as-a-service offering — but now “the costs were killing us.” It was their biggest expense, leaving the company losing money, and “as our user base continued to grow, our Heroku costs grew in lockstep.” They’d explored all the “standard, easy, you-don’t-need-to-hire-a-devops-person platform.” But they had one more option.

Co-founder Rob had 15 years of operational experience, and they decided to have him take over managing the infrastructure. On Jan. 22, 2022, they migrated from Heroku’s platform-as-a-service offering to the infrastructure management service offered by Cloud 66. “Leaving the safe space of Heroku was scary,” Odunayo admits. “We spent weeks putting together a step-by-step document for the actual migration. The morning of the migration was six hours of nonstop work, babysitting the process until it was all done.”

Yet when they reached the end of the crucial transition — they did it. And they’d cut their server costs by 80%. “Apart from a couple of small hiccups relating to having a working maintenance mode and a database backup command that initially time out — everything went smoothly.” Although there was one nasty surprise. “Turns out the migration had logged every single one of our 760,000 users out of the app.” And of course, there were forgotten passwords or forgotten email addresses associated with the account. But the team eventually got everyone matched up to their original account.

Today The Storygraph has over 1.2 million registered accounts, serving out 36 million pageviews a month, Odunayo tells the audience.

But more importantly, “Our monthly costs are now consistently lower than our monthly recurring revenue!”

Group Created with Sketch.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.