# Nextdoor

Nextdoor is the neighborhood hub for trusted connections and the exchange of helpful information, goods, and services. We believe that by bringing neighbors together, we can cultivate a kinder world where everyone has a neighborhood they can rely on. - Medium

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Scaling Nextdoor's Datastores: Part 5

DevFeed: [Scaling Nextdoor's Datastores: Part 5](<https://devfeed.tech/articles/scaling-nextdoor-s-datastores-part-5-20344.md>)

Original publisher: [Read original article](<https://engblog.nextdoor.com/scaling-nextdoors-datastores-part-5-5221da60f374?source=rss----5e54f11cdfdf---4>)

Author: Slava Markeyev

Published: 2025-03-19T15:09:15Z

Content type: article

Language: en

Sources: [Nextdoor](<https://devfeed.tech/sources/nextdoor.md>)

Topics: [cache-invalidation](<https://devfeed.tech/topics/cache-invalidation.md>), [Database](<https://devfeed.tech/topics/database.md>), [rdbms](<https://devfeed.tech/topics/rdbms.md>), [Publish-subscribe pattern](<https://devfeed.tech/topics/pubsub.md>), [Data serialization](<https://devfeed.tech/topics/data-serialization.md>), [read-replica](<https://devfeed.tech/topics/read-replica.md>), [valkey](<https://devfeed.tech/topics/valkey.md>)

Tags: [cache](<https://devfeed.tech/tags/cache.md>), [cache-invalidation](<https://devfeed.tech/tags/cache-invalidation.md>), [caching-strategies](<https://devfeed.tech/tags/caching-strategies.md>), [capture](<https://devfeed.tech/tags/capture.md>), [cdc](<https://devfeed.tech/tags/cdc.md>), [change-data-capture](<https://devfeed.tech/tags/change-data-capture.md>), [column](<https://devfeed.tech/tags/column.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [consumer](<https://devfeed.tech/tags/consumer.md>), [data](<https://devfeed.tech/tags/data.md>), [database](<https://devfeed.tech/tags/database.md>), [database-consistency](<https://devfeed.tech/tags/database-consistency.md>), [database-scalability](<https://devfeed.tech/tags/database-scalability.md>), [databases](<https://devfeed.tech/tags/databases.md>), [datastores](<https://devfeed.tech/tags/datastores.md>), [rdbms](<https://devfeed.tech/tags/rdbms.md>), [scalability](<https://devfeed.tech/tags/scalability.md>), [scaling](<https://devfeed.tech/tags/scaling.md>), [source-of-truth](<https://devfeed.tech/tags/source-of-truth.md>), [stream](<https://devfeed.tech/tags/stream.md>), [usability](<https://devfeed.tech/tags/usability.md>), [version](<https://devfeed.tech/tags/version.md>), [versioning](<https://devfeed.tech/tags/versioning.md>), [write](<https://devfeed.tech/tags/write.md>), [writer](<https://devfeed.tech/tags/writer.md>)

### AI overview

Nextdoor's forward-version cache writes could still leave stale data when a writer missed a cache update, and a cache fill could reinsert an old value after reconciliation. The team used PostgreSQL WAL changes, consumed and republished by pg-bifrost and carried through Kafka, to drive a Go consumer that calls Redis del_if_version to conditionally remove stale keys. Row versions let changes be processed out of order and the work scaled horizontally. To handle cache fills racing with reconciliation, they used two passes: one near real time and another delayed slightly longer than the web request timeout, so it can clean up stale values reinserted after the first pass. The design aims for fast repair while tolerating those races; the authors say missed writes are extremely uncommon. They note that updating the cache directly from the change stream could require keeping ORM and raw-stream serialization methods in sync.

### Source excerpt

In this final installment of the Scaling Nextdoor's Datastores blog series, we detail how the Core-Services team at Nextdoor solved cache consistency challenges as part of a holistic approach to improve our database and cache scalability and usability. In Part 4: Keeping the cache consistent, we highlighted a class of consistency issues arising from racing cache writes and introduced an approach for forward cache versioning as a mechanism to avoid inconsistencies. The cache is able to decide which write to persist and which to reject because it is aware of the version of data it currently has. However, this is only a partial solution because it assumes writers will always succeed in communicating with the cache in a timely manner, if at all. Missed Writes Let's consider the scenario where Writers A and B both performed an update to the same row in the database and have not yet updated the cache. Writer A holds Version 1 and Writer B holds Version 2. What happens if Writer B with Value 2 fails to talk with the cache? Writer B fails to write to the cache. In this case the result is that the cache becomes inconsistent and we can't rely on the writers to provide that consistency. A process must exist outside of this interaction to fix-up the cache when Version 2 is written to the database but fails to be written to the cache. Change Data Stream To solve this problem we tap into a common feature provided by most modern databases, a Change Data Capture (CDC) Stream. A CDC Stream is a mechanism to subscribe to row level changes in a database. The change stream contains a row's previous column values along with the new values. Here's a visual example of the change stream when the last_name field gets updated in the database. For visual clarity the changed values have been underlined in red. Reconciler Since the database is the source of truth and the CDC Stream emits all changes, a consumer of this stream can clean up any consistency issues in the cache. In our system we ca

## Scaling Nextdoor's Datastores: Part 4

DevFeed: [Scaling Nextdoor's Datastores: Part 4](<https://devfeed.tech/articles/scaling-nextdoor-s-datastores-part-4-20343.md>)

Original publisher: [Read original article](<https://engblog.nextdoor.com/scaling-nextdoors-datastores-part-4-c9d3d3edcd34?source=rss----5e54f11cdfdf---4>)

Author: Ronak Shah

Published: 2025-03-19T15:08:57Z

Content type: article

Language: en

Sources: [Nextdoor](<https://devfeed.tech/sources/nextdoor.md>)

Topics: [consistency](<https://devfeed.tech/topics/consistency.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [Cache Coherence](<https://devfeed.tech/topics/cache-coherence.md>), [cache-invalidation](<https://devfeed.tech/topics/cache-invalidation.md>), [database-consistency](<https://devfeed.tech/topics/database-consistency.md>), [Back end](<https://devfeed.tech/topics/backend.md>)

Tags: [application](<https://devfeed.tech/tags/application.md>), [applications](<https://devfeed.tech/tags/applications.md>), [behavior](<https://devfeed.tech/tags/behavior.md>), [blog](<https://devfeed.tech/tags/blog.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [but](<https://devfeed.tech/tags/but.md>), [cache](<https://devfeed.tech/tags/cache.md>), [cache-control](<https://devfeed.tech/tags/cache-control.md>), [cache-invalidation](<https://devfeed.tech/tags/cache-invalidation.md>), [caching](<https://devfeed.tech/tags/caching.md>), [can](<https://devfeed.tech/tags/can.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [core](<https://devfeed.tech/tags/core.md>), [data](<https://devfeed.tech/tags/data.md>), [database](<https://devfeed.tech/tags/database.md>), [database-consistency](<https://devfeed.tech/tags/database-consistency.md>), [datastores](<https://devfeed.tech/tags/datastores.md>), [discuss](<https://devfeed.tech/tags/discuss.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [lua](<https://devfeed.tech/tags/lua.md>), [scaling](<https://devfeed.tech/tags/scaling.md>)

### AI overview

Nextdoor's approach prevents racing database writes from leaving a look-aside cache with stale data by assigning each row a database-generated, unique, monotonic version. A Postgres trigger initializes db_version to 1 on insert and increments it on update; the application retrieves the new version in a select within the update transaction. The cache stores the version in its metadata header, and Redis Lua functions atomically compare versions when setting or deleting entries. In the example, writer B's version 13 is accepted, while writer A's later cache write with version 12 is rejected as OLD. The excerpt focuses on racing writes; it says missed writes and other consistency cases are covered in Part 5. It cautions that row and version updates must be atomic and that timestamps may not be unique or monotonic.

### Source excerpt

In this part of the Scaling Nextdoor's Datastores blog series, we will see how the Core-Services team at Nextdoor keeps its cache consistent with database updates and avoids stale writes to the cache. In this post, we'll focus specifically on inconsistencies caused by racing writes and our solution. We'll discuss other causes and our full solution for consistent caching in the next installment of our blog: Part 5: A time-bounded eventually-consistent cache. Inconsistent Cache Caches can become inconsistent with the database for several reasons, such as: Racing Writes / Concurrent Updates: Multiple writes occurring simultaneously can result in a stale cache. Missed Writes / Failing to Update the Cache: Failure to update or set cache correctly after a database write. Delayed Cache Updates or Deletes: Slow propagation of updates or invalidation can leave the cache out of sync. Application-Level Bugs: Bugs in application side caching logic. Maintaining cache consistency with the database is crucial for data accuracy, especially in distributed systems with concurrent web requests. Consistent caching ensures reliable read-after-write behavior, improving performance and user experience. Without it, applications may face unpredictable behavior and user frustration. A well-designed caching system boosts performance, ensures consistency, and delivers up-to-date data even under high concurrency. Racing Writes Let's look at the scenario where two writers, A and B, update the same user in the database but write to the cache in a different order, causing the cache to become inconsistent with the database. Author's Note: In examples moving forward we'll use "User_1" to mean id=1 in the "users" table.Look-Aside Cache with two writers. Sequence of operations: Writer A updates the name of user_1 to Foo in the database. Writer B updates the name of the same user_1 to Bar in the database. Writer B updates the cache for user_1 with name = Bar. Writer A updates the cache for user_1 with

## Scaling Nextdoor's Datastores: Part 3

DevFeed: [Scaling Nextdoor's Datastores: Part 3](<https://devfeed.tech/articles/scaling-nextdoor-s-datastores-part-3-20342.md>)

Original publisher: [Read original article](<https://engblog.nextdoor.com/scaling-nextdoors-datastores-part-3-e9b4dd8a9393?source=rss----5e54f11cdfdf---4>)

Author: Ronak Shah

Published: 2025-03-19T15:08:43Z

Content type: article

Language: en

Sources: [Nextdoor](<https://devfeed.tech/sources/nextdoor.md>)

Topics: [Cache](<https://devfeed.tech/topics/cache.md>), [Database](<https://devfeed.tech/topics/database.md>), [schema-evolution](<https://devfeed.tech/topics/schema-evolution.md>), [Object-relational mapping](<https://devfeed.tech/topics/orm.md>), [Django](<https://devfeed.tech/topics/django.md>), [Python](<https://devfeed.tech/topics/python.md>), [Redis](<https://devfeed.tech/topics/redis.md>), [valkey](<https://devfeed.tech/topics/valkey.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [cache](<https://devfeed.tech/tags/cache.md>), [cache-invalidation](<https://devfeed.tech/tags/cache-invalidation.md>), [caching](<https://devfeed.tech/tags/caching.md>), [compatibility](<https://devfeed.tech/tags/compatibility.md>), [database](<https://devfeed.tech/tags/database.md>), [django](<https://devfeed.tech/tags/django.md>), [lua](<https://devfeed.tech/tags/lua.md>), [python](<https://devfeed.tech/tags/python.md>), [redis](<https://devfeed.tech/tags/redis.md>), [schema](<https://devfeed.tech/tags/schema.md>), [serialization-format](<https://devfeed.tech/tags/serialization-format.md>), [thundering-herd](<https://devfeed.tech/tags/thundering-herd.md>), [valkey](<https://devfeed.tech/tags/valkey.md>)

### AI overview

Part 3 of Nextdoor's datastore-scaling series explains how applications serialize database objects for Redis or Valkey look-aside caches. It describes compatibility problems caused by runtime, package, and schema changes, including cache misses and thundering-herd effects during migrations.

### Source excerpt

In this part of the Scaling Nextdoor's Datastores blog series, we'll explore how the Core-Services team at Nextdoor serializes database data for caching while ensuring forward and backward compatibility between the cache and application code. In part 1 of this series we discussed how ORMs, object-relational mapping frameworks, help abstract away database specific schemas and queries from application code. Developers simply utilize objects in their application's language to access database data. Here's a simple example of using Python's Django ORM to define a model: from django.db import models class Users(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) The associated SQL create table would look like: CREATE TABLE users ( "id" bigint NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, "first_name" varchar(30) NOT NULL, "last_name" varchar(30) NOT NULL ); Developers would then access database data like this: user_id = 123 user = User.objects.get(id=user_id) print(user.first_name)Object Byte Serialization for Caching An issue arises when adding a look-aside cache such as Redis/Valkey to an application: How do you store what you got from the database in the cache? A common solution to caching complex objects, such as those from ORMs, is object byte serialization. This process converts language objects into bytes before storing them in the cache. When reading from the cache the process is done in reverse where the byte data is turned into language objects. For instance in Python this is often done with the pickle package. The interaction between the application, database, and the cache looks like this: Look-Aside Cacheimport pickle # Try getting from cache ('None' if not in cache) user_bytes = cache.get("user_123") if user_bytes is not None: # Read bytes using pickle user = pickle.loads(user_bytes) else: # Fetch from database user = User.objects.get(id=123) # Convert to bytes user_bytes = pickle.dumps(user) # Sto

## Scaling Nextdoor's Datastores: Part 1

DevFeed: [Scaling Nextdoor's Datastores: Part 1](<https://devfeed.tech/articles/scaling-nextdoor-s-datastores-part-1-20340.md>)

Original publisher: [Read original article](<https://engblog.nextdoor.com/scaling-nextdoors-datastores-part-1-234d0cf67665?source=rss----5e54f11cdfdf---4>)

Author: Slava Markeyev

Published: 2025-03-19T15:08:13Z

Content type: article

Language: en

Sources: [Nextdoor](<https://devfeed.tech/sources/nextdoor.md>)

Topics: [Scalability](<https://devfeed.tech/topics/scalability.md>), [Database](<https://devfeed.tech/topics/database.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [Django](<https://devfeed.tech/topics/django.md>), [Python](<https://devfeed.tech/topics/python.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [NoSQL](<https://devfeed.tech/topics/nosql.md>)

Tags: [backend](<https://devfeed.tech/tags/backend.md>), [caching](<https://devfeed.tech/tags/caching.md>), [database-consistency](<https://devfeed.tech/tags/database-consistency.md>), [database-scalability](<https://devfeed.tech/tags/database-scalability.md>), [databases](<https://devfeed.tech/tags/databases.md>), [development](<https://devfeed.tech/tags/development.md>), [django](<https://devfeed.tech/tags/django.md>), [nosql](<https://devfeed.tech/tags/nosql.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [python](<https://devfeed.tech/tags/python.md>), [rdbms](<https://devfeed.tech/tags/rdbms.md>), [scalability](<https://devfeed.tech/tags/scalability.md>)

### AI overview

This introductory post in a Nextdoor blog series examines scalability challenges involving database load and cache consistency. It reviews common industry solutions, their caveats, and the difficulty of moving from entrenched relational data models to NoSQL or distributed SQL datastores.

### Source excerpt

At Nextdoor, the Core-Services team is responsible for the primary set of databases and caches that power the Nextdoor platform. This blog series explores our 2024 initiatives to enhance the scalability of this critical infrastructure. When we sat down at the whiteboard we sought to address two related problems: How can we reduce load on our primary database(s) and better utilize database read replicas? How can we improve our cache consistency? In this post we'll provide a primer on the common industry-wide solutions we've previously employed along with discussing their caveats and pitfalls. In subsequent posts we'll dive into the technical details of the components of our solution and how they fit together. Table of Contents Background primer (this post) Decreasing database load with dynamic routing Appropriately serializing data for caching Keeping the cache consistent A time-bounded, eventually-consistent cache Background Nextdoor's backend, built using the Python-based Django web framework, powers the core product experience for neighbors, government agencies, and local businesses. The power of Django and similar frameworks (Rails, Spring, etc) is that they allow development teams to focus on implementing business logic rather than getting caught up in the details like learning and writing SQL. The Object Relational Mapping, ORMs, included in these frameworks provide a lever that allows developers to define data models and relationships between them in the application's language without ever needing to worry about SQL. As some readers are all too aware, relational data modeling comes at a cost. Without careful data modeling, performant access to relational data largely depends on that data residing on monolithic databases. NoSQL or distributed SQL datastores are often advertised as solutions to the scalability challenges of relational databases like PostgreSQL. However, many companies face significant obstacles in transitioning to these modern datastores. Their

## Let AI Entertain You: Increasing User Engagement with Generative AI and Rejection Sampling

DevFeed: [Let AI Entertain You: Increasing User Engagement with Generative AI and Rejection Sampling](<https://devfeed.tech/articles/let-ai-entertain-you-increasing-user-engagement-with-generative-ai-and-rejection-sampling-20339.md>)

Original publisher: [Read original article](<https://engblog.nextdoor.com/let-ai-entertain-you-increasing-user-engagement-with-generative-ai-and-rejection-sampling-50a402264f56?source=rss----5e54f11cdfdf---4>)

Author: Jaewon Yang

Published: 2023-10-16T17:03:52Z

Content type: article

Language: en

Sources: [Nextdoor](<https://devfeed.tech/sources/nextdoor.md>)

Topics: [Generative AI](<https://devfeed.tech/topics/generative-ai.md>), [Reinforcement learning](<https://devfeed.tech/topics/reinforcement-learning.md>), [generative-ai-tools](<https://devfeed.tech/topics/generative-ai-tools.md>), [recommendation systems](<https://devfeed.tech/topics/recommendation-systems.md>)

Tags: [a-b-testing](<https://devfeed.tech/tags/a-b-testing.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-models](<https://devfeed.tech/tags/ai-models.md>), [chatgpt](<https://devfeed.tech/tags/chatgpt.md>), [clicks](<https://devfeed.tech/tags/clicks.md>), [content](<https://devfeed.tech/tags/content.md>), [email](<https://devfeed.tech/tags/email.md>), [engagement](<https://devfeed.tech/tags/engagement.md>), [feedback](<https://devfeed.tech/tags/feedback.md>), [framework](<https://devfeed.tech/tags/framework.md>), [generative-ai](<https://devfeed.tech/tags/generative-ai.md>), [model-training](<https://devfeed.tech/tags/model-training.md>), [notifications](<https://devfeed.tech/tags/notifications.md>), [reinforcement-learning](<https://devfeed.tech/tags/reinforcement-learning.md>), [sampling](<https://devfeed.tech/tags/sampling.md>), [user](<https://devfeed.tech/tags/user.md>)

### AI overview

Nextdoor reports that generic ChatGPT API subject lines underperformed user-written subjects in a small A/B test, and prompt improvements alone still failed to beat the control. Its system prompts OpenAI API to extract interesting words directly from a post to limit rewrites and hallucinations, then uses a reward model fine-tuned on click experiment data to accept the generated subject only when it is predicted to outperform the user-written one. The model chooses one subject per post without personalization; the article says extracting improved Sessions by 3% relative to generating from scratch, while the reward model was key to the final improvement. It reports about 65% reward-model accuracy, plus final-model lifts of 0.4% in Weekly Active Users and 1% in ad revenue. Caching reduced processing cost to 1/600 of the uncached approach; daily monitoring triggers retraining after accuracy drops by 10% or more, and failed API retries fall back to the user subject. The authors identify personalization and more accurate reward signals as future work.

### Source excerpt

Generative AI (Gen AI) has demonstrated proficiency in content generation but does not consistently guarantee user engagement, mainly for two reasons. First, Gen AI generates content without considering user engagement feedback. While the content may be informative and well-written, it does not always translate to increased user engagement such as clicks. Second, Gen AI-produced content often remains generic and may not always provide the specific information that users seek. Nextdoor is the neighborhood network where neighbors, businesses, and public agencies connect with each other. Nextdoor is building innovative solutions to enhance the user engagement with AI-Generated Content (AIGC). This post outlines our approach to improving user engagement through user feedback, specifically focusing on Notification email subject lines. Our solutions employ Rejection sampling [1], a technique used in reinforcement learning, to boost the engagement metrics. We believe our work presents a general framework to drive user engagement with AIGC, particularly when off-the-shelf Generative AI falls short in producing engaging content. To the best of our knowledge, this marks an early milestone in the industry's successful use of AIGC to enhance user engagement. Introduction At Nextdoor, one of the ways to drive user growth and engagement on platform is through emails. One of the emails we have is called New and Trending notifications, where we send a single post that we think the user might be interested in and want to engage with. As part of sending an email, we need to determine a subject line of the email for the email audiences. Historically, we simply pick the first few words of the post being sent to be the subject line. However, in certain posts, these initial words are often greetings or introductory remarks and may not provide valuable information to the user. In the provided image example below, we observe a simple greeting, "Hello!" Figure 1. New and Trending email wher

## From Pre-trained to Fine-tuned: Nextdoor's Path to Effective Embedding Applications

DevFeed: [From Pre-trained to Fine-tuned: Nextdoor's Path to Effective Embedding Applications](<https://devfeed.tech/articles/from-pre-trained-to-fine-tuned-nextdoor-s-path-to-effective-embedding-applications-20338.md>)

Original publisher: [Read original article](<https://engblog.nextdoor.com/from-pre-trained-to-fine-tuned-nextdoors-path-to-effective-embedding-applications-3a13b56d91aa?source=rss----5e54f11cdfdf---4>)

Author: Karthik Jayasurya

Published: 2023-09-07T11:31:32Z

Content type: article

Language: en

Sources: [Nextdoor](<https://devfeed.tech/sources/nextdoor.md>)

Topics: [Embeddings](<https://devfeed.tech/topics/embeddings.md>), [Fine-tuning](<https://devfeed.tech/topics/fine-tuning.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [Natural language processing](<https://devfeed.tech/topics/nlp.md>), [Transformer](<https://devfeed.tech/topics/transformer.md>), [software-development](<https://devfeed.tech/topics/software-development.md>), [recommendation systems](<https://devfeed.tech/topics/recommendation-systems.md>)

Tags: [deep-learning](<https://devfeed.tech/tags/deep-learning.md>), [development](<https://devfeed.tech/tags/development.md>), [embedding](<https://devfeed.tech/tags/embedding.md>), [embeddings](<https://devfeed.tech/tags/embeddings.md>), [knowledge-graph](<https://devfeed.tech/tags/knowledge-graph.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [ml](<https://devfeed.tech/tags/ml.md>), [models](<https://devfeed.tech/tags/models.md>), [ranking](<https://devfeed.tech/tags/ranking.md>), [real-time](<https://devfeed.tech/tags/real-time.md>), [recommendation-system](<https://devfeed.tech/tags/recommendation-system.md>), [systems](<https://devfeed.tech/tags/systems.md>)

### AI overview

Nextdoor describes its evolution from using pre-trained transformer models as embedding feature extractors to fine-tuning embeddings with unlabelled and labeled data. The article covers how embeddings are developed, featurized, and served at scale for applications including notification scoring and feed ranking.

### Source excerpt

Background The majority of ML models at Nextdoor are typically driven by a large number of features that are primarily either continuous or discrete in nature. The personalized features usually stem from historical aggregations or real-time summarization of interaction features, typically captured through logged tracking events. However, representing content through deep understanding using information behind it (text/image) is crucial for modeling nuanced user signals and better personalizing complex user behavior across many of our products. In the rapidly evolving field of NLP, utilizing transformer models to perform representation learning effectively and efficiently has become increasingly important for user understanding and improving their product experience. Towards that, we have built a lot of entity embedding models spanning entities such as posts, comments, users, search queries & classifieds. We first leveraged deep understanding of content and used that to derive embeddings for meta entities like users based on their past interacted content. These powerful representations are found to be very crucial towards extracting meaningful features for some of the biggest ML ranking systems at Nextdoor such as notifications scoring and feed ranking. By making them readily available and building to scale, we can drive adoption of state-of-the-art reliably and put them in the hands of ML Engineers for rapidly building performant models across the company. This blog primarily focuses on how we iterated on the development of embedding models, how they are featurized and served at large scale into various product applications as well as some of the challenges encountered during this process. We summarize the evolution of work across three sections. In section 1, the focus is to leverage state-of-the-art pre-trained models to rapidly evaluate the value of embeddings models as feature extractors. Section 2 describes how to fine-tune embeddings using unlabelled data for

## Securing Diversity in Cybersecurity

DevFeed: [Securing Diversity in Cybersecurity](<https://devfeed.tech/articles/securing-diversity-in-cybersecurity-20345.md>)

Original publisher: [Read original article](<https://engblog.nextdoor.com/securing-diversity-in-cybersecurity-6aa83dafb850?source=rss----5e54f11cdfdf---4>)

Author: Kristen Beneduce

Published: 2023-05-02T13:01:51Z

Content type: article

Language: en

Sources: [Nextdoor](<https://devfeed.tech/sources/nextdoor.md>)

Topics: [Cybersecurity](<https://devfeed.tech/topics/cybersecurity.md>)

Tags: [culture](<https://devfeed.tech/tags/culture.md>), [diversity](<https://devfeed.tech/tags/diversity.md>), [engienering](<https://devfeed.tech/tags/engienering.md>), [security](<https://devfeed.tech/tags/security.md>)

### AI overview

At a Nextdoor and WiCyS Silicon Valley event alongside RSAC 2023, cybersecurity leaders discussed current threats, including AI, and imposter syndrome. The article frames their discussion around the field's representation gap: women make up 25% of the cybersecurity workforce and 16% of CISOs, while a 2023 WiCyS report identifies lack of respect and limited growth opportunities as challenges. Nextdoor's CEO argued that varied team perspectives can improve problem-solving and innovation; panelist Jameeka Green Aaron urged WiCyS members to see themselves represented and thrive. The excerpt does not detail specific threat-response practices or panelists' individual views.

### Source excerpt

Panelists from Left to Right: Ronit Polak (Moderator), Kathy Wang* , Lea Kissner, Rupa Parameswaran, Olivia Rose, Jameeka Green Aaron *Correction: Kathy Wang is the former, not current CISO of Discord At Nextdoor we build technology that empowers resilient, safe, and kind neighborhoods all over the world. Securing a product that empowers global communities requires diverse and inclusive teams, reflective of the communities we support. Yet hiring and retaining the diverse talent needed to achieve our purpose remains an industry challenge. The gap is particularly evident in the cybersecurity field where 25% of the workforce and 16% of CISOs identify as female. According to the WiCyS State of Inclusion report 2023, women cite lack of respect and limited opportunities for growth in cybersecurity as top challenges accompanying lack of representation. We must keep working on it. That is why Nextdoor welcomed the chance to celebrate diversity, alongside RSAC 2023, in Nextdoor HQ's backyard this week and to partner with our neighborhood Women in Cybersecurity (WiCyS) Silicon Valley chapter. We are committed to building a diverse and inclusive workplace, and we are proud to work with organizations like WiCyS, who share the same values. Nextdoor's CISO TC Niedzialkowski kicked off with a warm welcome. CEO Sarah Friar framed the discussion by sharing how she launched her career by building a network at her first RSA conference as an equity analyst for Security Software at Goldman Sachs. She emphasized that diverse teams bring a variety of perspectives and experiences to the table, which ultimately leads to better problem-solving and innovation. Left to Right: Tanvi Kolte Tiwari (WiCyS Silicon Valley Events Chair) introducing the panel, Attendees soaking into a fantastic intro by Sarah Friar (Nextdoor CEO) , TC Niedzialkowski (Nextdoor CISO) cheering on the panel Moderator Ronit Polak, WiCyS Silicon Valley President, and CISOs Kathy Wang Lea Kissner Rupa Parameswaran Olivia Ros

## Catching Anomalies Early in Mobile App Releases

DevFeed: [Catching Anomalies Early in Mobile App Releases](<https://devfeed.tech/articles/catching-anomalies-early-in-mobile-app-releases-20337.md>)

Original publisher: [Read original article](<https://engblog.nextdoor.com/catching-anomalies-early-in-mobile-app-releases-ac95adf9da81?source=rss----5e54f11cdfdf---4>)

Author: Walt Leung

Published: 2023-01-11T15:27:14Z

Content type: article

Language: en

Sources: [Nextdoor](<https://devfeed.tech/sources/nextdoor.md>)

Topics: [Deployment Strategies](<https://devfeed.tech/topics/deployment-strategies.md>), [mobile devops](<https://devfeed.tech/topics/mobile-devops.md>), [blue green and canary deployments](<https://devfeed.tech/topics/blue-green-and-canary-deployments.md>), [releases](<https://devfeed.tech/topics/releases.md>), [Tool](<https://devfeed.tech/topics/tool.md>), [Android](<https://devfeed.tech/topics/android.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [mobile-app-development](<https://devfeed.tech/topics/mobile-app-development.md>)

Tags: [adoption](<https://devfeed.tech/tags/adoption.md>), [anomaly-detection](<https://devfeed.tech/tags/anomaly-detection.md>), [data-science](<https://devfeed.tech/tags/data-science.md>), [metrics](<https://devfeed.tech/tags/metrics.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [mobile-app](<https://devfeed.tech/tags/mobile-app.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [mobile-apps](<https://devfeed.tech/tags/mobile-apps.md>), [observability](<https://devfeed.tech/tags/observability.md>), [regression](<https://devfeed.tech/tags/regression.md>), [releases](<https://devfeed.tech/tags/releases.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [statistics](<https://devfeed.tech/tags/statistics.md>)

### AI overview

Nextdoor describes detecting a mobile release regression at 1% rollout by comparing adopters' before-and-after app sessions with the same change among non-adopters. Because early adopters are more active than typical users, aggregate metrics can hide a problem at low adoption, and simply normalizing per user does not address cohort differences. The team first checks that the cohorts had similar pre-release trends, then uses difference-in-differences regression to estimate the release effect under the assumption that those trends would otherwise have continued. In the iOS v1.234.5 example, app sessions fell 0.02 among adopters while rising 0.20 among non-adopters, yielding an estimated 0.22 decline. Nextdoor says this flagged the regression on March 5, ten days earlier than week-over-week monitoring, and localized it to under 1% of iOS users. The method depends on comparable pre-trends; the excerpt reports the company's results and approach.

### Source excerpt

How Nextdoor catches mobile app release anomalies at 1% adoption At Nextdoor, our mobile applications on iOS and Android serve content to tens of millions of weekly active users. At this scale, we run a weekly release process for both iOS and Android, shipping hundreds of changes across multiple teams and dozens of mobile engineers. Our team uses several observability processes and rollout strategies to keep these deployments safe and scalable. We most notably use phased rollouts to minimize the impact of a potentially bad release. Phased rollouts allow us to gradually increase the adoption of users for a new app version. For example, we can have a new app version be released to only 1% of users on the 1st day, 2% of users on the 2nd day, and so on. That way, if a new release were accidentally shipped with an uncaught regression, having it at 1% rollout means it affects fewer users, reduces its severity level, and gives us more time to react. However, for many of our critical business metrics where a failure can sometimes be silent, most out-of-the-box observability approaches don't work with phased rollouts. This is largely due to two problems: Observability typically happens at an aggregate level. For example, we look at app sessions or revenue on a daily basis, across all users for a platform. The behavior of early adopters on an app version differs from the median behavior of all users. Most importantly, early adopters are more active, almost by definition, to be in an early rollout of the new app version. At Nextdoor, Daily Users are more likely to adopt releases over Weekly Users, Weekly Users over Monthly Users, and so on. For example, consider an app session regression on a hypothetical iOS version v1.234.5 released March 4. If we had unknowingly introduced a regression where we didn't count an app session 5% of the time, at a 1% rollout, our aggregate impact would be expected to be roughly 0.05 x 0.01 = 0.05% of all iOS app sessions, which is practically im

## Typeahead Search at Nextdoor

DevFeed: [Typeahead Search at Nextdoor](<https://devfeed.tech/articles/typeahead-search-at-nextdoor-20346.md>)

Original publisher: [Read original article](<https://engblog.nextdoor.com/typeahead-search-at-nextdoor-1875e70c67e8?source=rss----5e54f11cdfdf---4>)

Author: Jerry Tian

Published: 2022-07-06T19:49:06Z

Content type: article

Language: en

Sources: [Nextdoor](<https://devfeed.tech/sources/nextdoor.md>)

Topics: [search-engines](<https://devfeed.tech/topics/search-engines.md>), [Latency](<https://devfeed.tech/topics/latency.md>), [Data pipelines](<https://devfeed.tech/topics/data-pipelines.md>), [API Economy](<https://devfeed.tech/topics/api-economy.md>), [Google Search](<https://devfeed.tech/topics/google-search.md>)

Tags: [apis](<https://devfeed.tech/tags/apis.md>), [autocomplete](<https://devfeed.tech/tags/autocomplete.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [geo](<https://devfeed.tech/tags/geo.md>), [geohash](<https://devfeed.tech/tags/geohash.md>), [latency](<https://devfeed.tech/tags/latency.md>), [low-latency](<https://devfeed.tech/tags/low-latency.md>), [proximity](<https://devfeed.tech/tags/proximity.md>), [relevance](<https://devfeed.tech/tags/relevance.md>), [search](<https://devfeed.tech/tags/search.md>), [system-design-project](<https://devfeed.tech/tags/system-design-project.md>), [typeahead](<https://devfeed.tech/tags/typeahead.md>), [user-experience](<https://devfeed.tech/tags/user-experience.md>)

### AI overview

Nextdoor built a proximity-based autocomplete service for mentions and search across entities such as businesses and users. It uses Uber's H3 geohashing library to group nearby entities, with Redis sorted sets held in memory for low-latency prefix lookups. Separate indexing, search, and ranking APIs support ingestion and queries; a CQRS setup routes writes through primary Redis nodes and serves searches from read-only replicas, with reported replication lag under 10 ms. The service indexes hundreds of millions of entities without affecting serving traffic and reports P95 search latency below 30 ms across hundreds of millions of monthly requests. The described future work for searching friends-of-friends would aggregate connections and use Lua to reduce network round trips.

### Source excerpt

Background In a thriving community, people are connected to their friends and local businesses. Nextdoor is the hyperlocal platform that mirrors these offline relationships. Every day, through active discussions on the platform, new relationships are formed and existing ones strengthened. For example, a Nextdoor user can create a post like "I really like @XYZ cafe. @John is a hard working business owner and we should all support him by buying a cup of delicious latte!" Here, the post is created by at-mentioning (via the @ symbol) nearby businesses and users. From this post, users in the neighborhood can contribute by at-mentioning others to be part of the comment threads. As a result, John's cafe thrives and acts as a neighborhood hub where new friends are made. Every month, millions of these mentions are created in various discussions (including lost dogs!). In addition to posts and comments, a user can type into the search box and see, among other things, nearby users and businesses. All these features are powered by the same autocomplete service -- a set of APIs to ingest data and handle typeahead search of different entity types (businesses, users, keywords etc) on Nextdoor. This post focuses on how we built a proximity-based typeahead service to power typeahead use cases at Nextdoor. Proximity-Based Typeahead Search as a Service Any good search experience can be boiled down to two core components: Relevance: Given a search query, whether the user sees relevant results or not. As a hyperlocal social network, relevancy is heavily weighted by geo proximity. 2. Low latency. Google Search found that a 400 millisecond delay resulted in a -0.59% change in searches/user. What's more, even after the delay was removed, these users still had -0.21% fewer searches, indicating that a slower user experience affects long term behavior. For a good autocomplete experience, as users type, relevant results should show up instantaneously. To meet the product requirements, we set ou