Stack Overflow may be the number one site for answering coding questions, but no matter their technical expertise, all companies eventually acquire technical debt. After thirteen years of exponential growth, the Stack Overflow engineering team adopted a theme for the year 2022: getting rid of tech debt. For David Longworth, Brand Design Director at Stack Overflow, this theme represented a huge opportunity for his team; it meant the opportunity to ditch their monolithic application and migrate to a modern web architecture.
Their decision to migrate off the stackoverflow.com monolith and onto a new domain built with Netlify has had massive implications for the Brand Design team, who have now enabled content creators across the organization to publish and edit web pages without taking up engineering cycles.
By embracing a modern web architecture built with Sanity, Nuxt, and Netlify, David’s team is able to do more with fewer resources. They ship content more frequently, freeing up Stack Overflow’s SRE or DevOps teams to work on the product.
The Challenge: Build Fast, Build Safely
Stack Overflow’s public technical question and answer platform is visited by over 100 million people monthly, and its SaaS product, Stack Overflow for Teams, helps organizations with internal knowledge sharing and collaboration. Both hold private user and customer data that the Stack Overflow team works hard to protect–especially in the face of the many DDoS attacks launched against their platform. Prior to the migration off the monolith, Stack Overflow’s web properties had been built on the same platform as the public platform and Stack Overflow for Teams.
With this monolithic setup, if marketing pages got compromised, they could expose user data. That meant any changes to content on stackoverflow.com marketing properties had to go through the same level of scrutiny as changes to the application itself. With only three people on David’s team and frequent content requests, this setup meant heavy reliance on engineering resources, sometimes taking up engineering cycles to simply update text.
“I don’t have the time to concern myself with hosting, or setting servers up, and more to the point, things like security and DDoS attacks. We have an SRE team, but we should spend their time on the actual product.” David Longworth, Brand Design Director
This led to an incredibly stable, but manual and time-intensive process for marketing site updates. In order to meet their marketing goals, they needed to move faster.
The Solution: Break up with the Monolith
David’s team needed to enable content creators across the organization to self-serve, and create and edit web pages without burdening the SRE and DevOps team. They identified a few ways to solve this problem, including changing the login system for all Stack Overflow web properties so that they could build against the monolith.
However, it would take over a year to get this work on the engineering roadmap, and they needed to move faster. So instead of making additional changes to the application, they decided to, as David puts it, “break up with the monolith.”
A decoupled domain built with Netlify
The Stack Overflow & Stack Overflow for Teams platforms would remain as-is, but Marketing teams could also publish to a separate domain, stackoverflow.co. Stackoverflow.co is a Jamstack site built with Nuxt, Sanity, and Netlify. User data, site integrity and stability would no longer be at risk, as these pages require no login, and Netlify’s enterprise plan offers Stack Overflow the security, speed, and support needed to host enterprise-grade sites.
Since Netlify hooks right into the DNS, there was little configuration required to set up a separate subdomain.
Results: Moving Faster, without DevOps Help
What has the Stack Overflow Brand Design team achieved since using Netlify? In short, they’re able to get more done, with fewer resources.
On the monolith, content teams heavily relied on engineering teams to get pages live. With the new setup, David’s team has enabled content editors to make changes themselves using Sanity CMS.
Another important feature has been Netlify’s Deploy Previews, which allows teams to collaborate more frequently, and faster. No more screenshots of edits and Word documents sent around with copy changes.
“I can be on vacation sipping cocktails somewhere…. I’m not the blocker anymore. [Netlify] is really unlocking huge potential.” David Longworth, Brand Design Director
Netlify Functions Add Dynamic Capabilities to a Static Site
The content on stackoverflow.co is largely static HTML, which makes for speedy load times. But the team also pulls in dynamic data using Netlify Functions for things like Marketo lead-generation forms. They’ve also started using an npm package that the Twilio team built that uses Netlify Functions to password protect Deploy Previews using Okta.
Future Plans for Netlify
Even just a few months into using Netlify, David is getting internal requests from other teams who want a similar setup. “People are coming to me asking how we did that,” he says. Other teams in the organization are asking to spin up their own subdomains, so they can ship faster and free up engineering resources.