aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • Data
  • Engineering
  • Technology

Powering Nest’s Camera Cloud With Cloud Spanner

  • aster.cloud
  • March 27, 2022
  • 4 minute read

When we, the Nest team, set out to build the next generation platform to power millions of Nest cameras, it was essential to fulfill our video storage needs at large scale with reliability at the forefront. To accomplish this, we needed to choose the right database. This article goes into details about what our requirements were, why we picked Cloud Spanner, what some of the challenges were during the migration, and some of the operational tasks we undertook after migrating to Spanner.

Database Requirements

Here are some of the factors we considered when choosing the next database for Nest cameras and why we selected Spanner. Specifically, we were looking for the following customer benefits:


Partner with aster.cloud
for your next big idea.
Let us know here.



From our partners:

CITI.IO :: Business. Institutions. Society. Global Political Economy.
CYBERPOGO.COM :: For the Arts, Sciences, and Technology.
DADAHACKS.COM :: Parenting For The Rest Of Us.
ZEDISTA.COM :: Entertainment. Sports. Culture. Escape.
TAKUMAKU.COM :: For The Hearth And Home.
ASTER.CLOUD :: From The Cloud And Beyond.
LIWAIWAI.COM :: Intelligence, Inside and Outside.
GLOBALCLOUDPLATFORMS.COM :: For The World's Computing Needs.
FIREGULAMAN.COM :: For The Fire In The Belly Of The Coder.
ASTERCASTER.COM :: Supra Astra. Beyond The Stars.
BARTDAY.COM :: Prosperity For Everyone.

  1. Minimal downtime – we know that cameras are used for security purposes, so minimizing downtime was key. This requirement meant choosing a database with no maintenance windows and minimal downtime.
  2. Lower total cost of ownership – to create new experiences for our customers and focus on developing better camera software rather than maintaining a database, we required a fully managed service.
  3. Better end user experience – users expect a consistent and predictable experience across their security devices and need to trust that these devices will perform as expected. We wanted to ensure those requests would have consistent round trip time to provide predictability.

Scale

With a growing fleet of Nest cameras, we need to build for today and prepare for tomorrow. Switching storage databases represents thousands of hours of engineering effort, and can increase the risk of downtime for our customers during the change. We needed a system that could grow with our customers. Spanner has unlimited scaling, and resizing is easy with just one click. This database works well for us because we can now scale as we grow without worrying about overgrowing the capacity constraints of our database.

Read More  Twitter Is Now X. Here's What That Means.

Performance

Nest cameras support uploading and watching recorded videos. In order for our customers to get updates, performance and consistency are key consideration factors. During our benchmarks, there was little change to Spanner’s performance as we scaled our workload and instance size.

Relational Database

Originally the Nest camera services were built on another cloud provider’s distributed data store. While performance was typically adequate, it lacked relational integrity, which placed a heavy burden on the application to handle cases where we needed to perform coordinated updates.  This challenge required significant special error handling, and the need to run reconciliation jobs. Since Spanner is a relational database, it handles transactions processing for us in full. This capability allowed the engineering team to focus solely on the higher level application logic.

Reliability

Nest cameras need to have high uptimes, so our underlying services need to be constantly up as well. Maintenance windows, however planned, create significant additional work for the engineering team. For example, running multiple databases via different services or in different regions means that we are constantly relying on a different service to accommodate variations in maintenance downtime. Spanner is one of the only few services with 99.99% uptime for regional and 99.999% uptime for multi-regions with no planned maintenance windows.

Language Support

The Nest engineering team is a distributed team with a distributed set of programming languages. Spanner has client library support in 8 languages in addition to REST and RPC, covering most of the languages used within the team. In the future, should we implement new applications in a different language, we will be able to leverage the client library in that language.

Read More  Google Is A Leader In Gartner Magic Quadrant For Cloud Infrastructure And Platform Services

Migration Considerations

When planning for a migration, we often think about how to migrate the data, what changes to make on the application, which integrations to reconfigure, etc. Here are some additional areas that we considered to  ensure a smooth migration.

SQL Dialect

Subtle SQL dialect differences can sometimes be hard to detect, especially when they are not explicitly defined in the SQL statements. For example, when it comes to sorting, Spanner sorts NULLs and NaNs first whereas PostgreSQL sorts them last. ‘^’ means bitwise XOR in Spanner whereas it means exponentiation in PostgreSQL. We followed the syntax guide to ensure that our queries did exactly what we intended.

To make this even easier, Spanner now offers a preview for PostgreSQL dialect support. Read more here.

Latency Spikes

We also had to consider abnormal latencies during our migration. We defined latency targets and referred to Cloud Monitoring to ensure that our latencies stayed below our threshold. When we suspected there were hotspots, we used the Key Visualizer to identify them and reworked our schema following Spanner’s best practices.

Spanner-only concepts

There are some concepts like Sessions which are unique to Spanner. The client libraries that Spanner provides handle Session management transparently, whereas we will need to implement Session handling ourselves if we choose to use the RPC or REST APIs. We used the Java client library and that made our migration much simpler. We tuned various configurations for the client in our staging environment before settling on a set of parameters that worked for us.

Read More  Paperstack Uses Google Cloud To Empower E-Commerce Sellers

Operationalization

After Spanner was in production, we set up alerting through Cloud Monitoring and regularly monitored our usage metrics (specifically CPU utilization and P99 latencies). We also resized our instance to ensure we are using just the right number of resources.

Choosing a database is an important decision for any large scale application. We’ve paid careful consideration to scalability and reliability challenges in order to ensure that Nest’s customers get a software service that is as reliable as their hardware devices. We have solved many deep technical challenges and implemented many optimizations to bring the fastest and most reliable performance to our customers. We hope this article gives you a glimpse into some of the key decisions we’ve made as part of this journey. To learn more about Nest cameras, take a look at our latest devices. You can also learn more about using Spanner in your organization.

 

 

By: Bill Hathaway (Site Reliability Engineer, Nest) and Jerene Yang (Software Engineering Manager, Cloud Spanner)
Source: Google Cloud Blog


For enquiries, product placements, sponsorships, and collaborations, connect with us at [email protected]. We'd love to hear from you!

Our humans need coffee too! Your support is highly appreciated, thank you!

aster.cloud

Related Topics
  • Cloud Spanner
  • Databases
  • Google Cloud
You May Also Like
View Post
  • Technology

IBM Study: One in Four Malicious Breaches are AI-Enabled, Costing Companies $6 Million on Average

  • July 29, 2026
View Post
  • Technology

3 Questions: Neural transparency and the future of AI design

  • July 17, 2026
View Post
  • Technology

IBM and Red Hat Expand Lightwell with New Offerings to Build the Trust Infrastructure for AI-Era Open Source

  • July 8, 2026
View Post
  • Technology

The AI investment surge hasn’t produced the expected results yet. That could change in 2026

  • June 26, 2026
zedreviews-valerion
View Post
  • Gears
  • Technology

Father’s Day Outdoors – Build Dad the Ultimate Backyard Watch Party

  • June 20, 2026
zedreviews-fathers-day-50830
View Post
  • Gears
  • Technology
  • Tools

Father’s Day Outdoors, Round Two – Gear for the Action, the Tailgate, and Beating the Heat

  • June 20, 2026
zedreviews-fathers-day-2147684744
View Post
  • Gears
  • Technology
  • Tools

The Ultimate Father’s Day Gift Guide – Home Entertainment Upgrades Dad Actually Wants

  • June 20, 2026
zedreviews-fathers-day-21306
View Post
  • Gears
  • Technology

A Father’s Day Gift Guide for Every Dad – Timepieces and Travel Gear

  • June 20, 2026

Stay Connected!
LATEST
  • 1
    IBM Study: One in Four Malicious Breaches are AI-Enabled, Costing Companies $6 Million on Average
    • July 29, 2026
  • 2
    Accelerating the frontiers of scientific discovery: Google’s $40M commitment to the Genesis Mission
    • July 26, 2026
  • 3
    3 Questions: Neural transparency and the future of AI design
    • July 17, 2026
  • 4
    Intel Invests €5 Billion to Expand Manufacturing in Europe
    • July 13, 2026
  • 5
    IBM and Red Hat Expand Lightwell with New Offerings to Build the Trust Infrastructure for AI-Era Open Source
    • July 8, 2026
  • 6
    When I Was Young
    • July 4, 2026
  • 7
    The Fastest AI Fried Chicken In The World
    • June 29, 2026
  • 8
    Zed Approves | How to Stay Cool in Extreme Heat
    • June 29, 2026
  • 9
    The AI investment surge hasn’t produced the expected results yet. That could change in 2026
    • June 26, 2026
  • 10
    Zed Approves | It’s Prime Day 2026! Time to Upgrade Your World Cup Viewing Setup and Beat the Heat
    • June 25, 2026
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • 1
    Zed Approves | The Best Prime Day PC Deals: Top Gaming Rigs, Workstations, and Everyday Laptops
    • June 24, 2026
  • neon-cart 2
    Zed Approves: How to Gear Up for GTA 6 This Amazon Prime Day (2026 Quick Guide)
    • June 22, 2026
  • zedreviews-valerion 3
    Father’s Day Outdoors – Build Dad the Ultimate Backyard Watch Party
    • June 20, 2026
  • zedreviews-fathers-day-50830 4
    Father’s Day Outdoors, Round Two – Gear for the Action, the Tailgate, and Beating the Heat
    • June 20, 2026
  • zedreviews-fathers-day-2147684744 5
    The Ultimate Father’s Day Gift Guide – Home Entertainment Upgrades Dad Actually Wants
    • June 20, 2026
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.