Nextdoor Case Study
2015
Nextdoor, a private social network for neighborhoods founded in San Francisco in 2010, allows its members to connect and communicate about the things that matter most in their communities. Content ranges from notices of annual block parties to babysitter recommendations to warnings about suspicious activity.
Very rarely do you get the opportunity to click one button, save money, and immediately improve user performance without any engineering effort at all. That’s what we can do using AWS.”
Matt Wise
Systems Architect, Nextdoor
The Challenge
Nextdoor measures its success not just by how many members it has but also by how often those members communicate with one another. “We pay attention to how many member messages are exchanged every day and how engaged those communities are,” says Prakash Janakiraman, cofounder and chief architect of Nextdoor. For the Nextdoor IT team, supporting those members requires strong system performance. “In addition to simply connecting with their communities, our users sometimes need to message their neighbors in times of crisis,” Janakiraman says. “We need to provide a solid and fast platform to make that possible.”
As a member-focused site, Nextdoor also aims to have its developers spend most of their time enhancing the site’s online communities rather than supporting the underlying technologies. “We want to focus as much of our intellectual horsepower in the company on developing the site for members and improving the member experience,” says Janakiraman. Because it is a growing startup, Nextdoor also needs a reliable platform that gives the company more flexibility to scale to meet customer demands. “As we grow quickly, things like reliability and elasticity are extremely important,” says Janakiraman. “We need to be able to easily spin up new capacity and configure new machines at a moment’s notice.”
Security is another major focus area for the company. “We want to have the fewest possible failure points, and we need isolation between applications as well,” says Matt Wise, Systems Architect at Nextdoor. “That helps us prevent our developers from doing something by accident, such as having our production and staging environments interact with each another.”
Nextdoor also aims to personalize the service it provides, but the company needed to be better at analyzing its usage data in order to do that. “We’re always interested in understanding what our customers like and want,” says Janakiraman. “Part of that is trying to learn more about what they find interesting and important, so we can provide a more personalized experience for them.”
Why Amazon Web Services
Nextdoor has relied on Amazon Web Services (AWS) to support every component of its platform since the company’s inception. “In my previous company, we were early customers of AWS, and we had a very positive experience, both in terms of spinning up new capacity when needed and the ease of configuring machines,” says Janakiraman. “When we originally created Nextdoor, it seemed like a no-brainer to go with AWS. We liked the reliability and flexibility it gave us.”
Currently, Nextdoor uses up to 300 Amazon Elastic Compute Cloud (Amazon EC2) instances to support the website, along with Elastic Load Balancing on the site’s front end to distribute site traffic across the EC2 instances. The company takes advantage of Amazon DynamoDB, a NoSQL database service designed for applications requiring single-digit millisecond latency, and Amazon Route 53, a highly available and reliable cloud Domain Name System (DNS) web service, for high performance. The social network also relies on the Amazon Simple Queue Service (Amazon SQS) to support the site’s background task processing. Using Amazon SQS, Nextdoor processes millions of tasks each day. It also uses Amazon CloudFront as its content delivery service and Amazon CloudWatch for website monitoring and alerts.
For flexibility and elasticity in deploying servers, Nextdoor uses AWS CloudFormation templates. “We use AWS CloudFormation for one-click network creation. It’s a very easy tool,” says Wise. Nextdoor also uses the Puppet automation tool for defining and building servers in AWS, and the RightScale cloud management solution for configuring and monitoring machines in the AWS cloud.
Nextdoor relies on Amazon Virtual Private Cloud (Amazon VPC) for creating secure private networks within its stack. These networks include user-facing services, a development environment, and various corporate IT functions. The company uses VPC peering connections between its multiple VPCs. “We designed our platform to take advantage of multiple AWS Availability Regions, with servers in Virginia, Oregon, and California,” says Wise. “Because we use different AWS accounts in those regions, we knew we were going to need a multi-VPC design in order to have the lowest possible number of failure points. We built a California to Virginia to California network topology, where we have a single management layer that spans all the regions. That layer can dive down into all the VPCs in each region via Amazon VPC peering.”
In addition, Nextdoor employs several AWS services to support its data analytics efforts. The company uses Amazon Simple Storage Service (Amazon S3) buckets to securely store a variety of data, including log files, streamed event data, and user-uploaded artifacts such as photos and documents shared with neighbors. Altogether, the company’s Amazon S3 buckets contain 30 terabytes of data. To analyze this data, Nextdoor uses Amazon Redshift, a petabyte-scale data warehouse, to run a workload of queries. These queries provide detailed analysis of site performance and insights into how customers are using the site.
The Benefits
AWS provides Nextdoor with a high-performance website platform so customers can connect with their neighbors reliably and effortlessly. “We use Amazon CloudWatch to monitor our load balancers to ensure they are serving the right kinds of requests to our users,” says Wise. The company has also improved website performance by transitioning to Amazon EC2 C3 instances. “When we upgraded to Amazon EC2 C3, we were able to drop user-perceived site latency by 50 percent by doing nothing but changing our instance types,” says Wise. “And that actually helped drop our server costs by 20 percent. Very rarely do you get the opportunity to click one button, save money, and immediately improve user performance without any engineering effort at all. That’s what we can do using AWS.”
The company now has the reliable back-end technology it needs. “We have launched 50,000 servers in AWS over the past four years, says Wise. “We can do that because AWS provides a very reliable, robust API, so we can easily scale our site and quickly launch new virtual machines as we continue to grow. Knowing we can request a new machine, and moments later that machine will launch, has enabled us to do things like full software deployments using complete server farms with new machines. For example, if we do a new software release today, we’re able to launch 65 machines. It’s just automatic.”
That flexibility also helps Nextdoor developers move more quickly when they need to create new site features. “We can launch a complete test environment for an engineer in less than two hours,” says Wise. “With the click of a button, that person can have a segregated test environment, knowing that other teams won’t be impacted.”
Additionally, Nextdoor is using AWS to speed up server rollbacks during code releases in cases when the code isn’t working properly. “We direct all user traffic through AWS Elastic Load Balancing, and when we see things aren’t working the way we thought, the old machines are still there, and we can click a button to redirect traffic from the newer machines back to the older ones we know are good,” says Wise. “The operation takes place across seven load balancers and dozens of server instances, but it’s asynchronous, which means it can be completed in less than a minute.”
Nextdoor has added a layer of security with its Amazon VPC deployments. “We run 18 VPCs across three regions. From a management viewpoint, they act as one, but each VPC is isolated from the other VPCs,” says Wise. “Being able to manage machines behind these private networks gives us a high level of security.”
The company is also using its data analytics capabilities to improve the Nextdoor site for customers. “With the data that we get through Amazon Redshift, we can better understand where our members are going on the site and how they’re using the service,” says Wise. “That enables us to better track data growth without our production data stores, so we can forecast user growth milestones and track customer engagement metrics. This is how we find out what is important to our members so we can ultimately improve their experience. At the end of the day, that’s what we’re all about.”
About Nextdoor
Nextdoor, a private social network for neighborhoods founded in San Francisco in 2010, allows its members to connect and communicate about the things that matter most in their communities
AWS Services Used
Amazon EC2
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers.
Amazon SQS
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers.
Elastic Load Balancing
Redshift powers mission critical analytical workloads for Fortune 500 companies, startups, and everything in between.
Learn more »
Amazon CloudFront
Amazon CloudFront is a fast content delivery network (CDN) service that securely delivers data, videos, applications, and APIs to customers globally with low latency, high transfer speeds, all within a developer-friendly environment.
Learn more »
Amazon DynamoDB
Amazon DynamoDB is a key-value and document database that delivers single-digit millisecond performance at any scale.
Learn more »
Amazon CloudWatch
Amazon CloudWatch is a monitoring and observability service built for DevOps engineers, developers, site reliability engineers (SREs), and IT managers.
Learn more »
Amazon Route 53
Amazon Route 53 is a highly available and scalable cloud Domain Name System (DNS) web service.
Learn more »
AWS CloudFormation
AWS CloudFormation provides a common language for you to describe and provision all the infrastructure resources in your cloud environment.
Learn more »
Get Started
Companies of all sizes across all industries are transforming their businesses every day using AWS. Contact our experts and start your own AWS Cloud journey today.