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  IBM, Vodafone, And GSMA Members Outline Critical Pathways To Protect Telcos Against Quantum-Era Cyberthreats

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  SevenRooms Serves Up Personalized Hospitality, Food, And Beverage Services With Google Cloud

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  How Wayfair Says Yes With BigQuery—Without Breaking The Bank

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
Getting things done makes her feel amazing
View Post
  • Computing
  • Data
  • Featured
  • Learning
  • Tech
  • Technology

Nurturing Minds in the Digital Revolution

  • April 25, 2025
View Post
  • People
  • Technology

AI is automating our jobs – but values need to change if we are to be liberated by it

  • April 17, 2025
View Post
  • Software
  • Technology

Canonical Releases Ubuntu 25.04 Plucky Puffin

  • April 17, 2025
View Post
  • Computing
  • Public Cloud
  • Technology

United States Army Enterprise Cloud Management Agency Expands its Oracle Defense Cloud Services

  • April 15, 2025
View Post
  • Technology

Tokyo Electron and IBM Renew Collaboration for Advanced Semiconductor Technology

  • April 2, 2025
View Post
  • Software
  • Technology

IBM Accelerates Momentum in the as a Service Space with Growing Portfolio of Tools Simplifying Infrastructure Management

  • March 27, 2025
View Post
  • Technology

IBM contributes key open-source projects to Linux Foundation to advance AI community participation

  • March 22, 2025
View Post
  • Technology

Co-op mode: New partners driving the future of gaming with AI

  • March 22, 2025

Stay Connected!
LATEST
  • college-of-cardinals-2025 1
    The Definitive Who’s Who of the 2025 Papal Conclave
    • May 7, 2025
  • conclave-poster-black-smoke 2
    The World Is Revalidating Itself
    • May 6, 2025
  • 3
    Conclave: How A New Pope Is Chosen
    • April 25, 2025
  • Getting things done makes her feel amazing 4
    Nurturing Minds in the Digital Revolution
    • April 25, 2025
  • 5
    AI is automating our jobs – but values need to change if we are to be liberated by it
    • April 17, 2025
  • 6
    Canonical Releases Ubuntu 25.04 Plucky Puffin
    • April 17, 2025
  • 7
    United States Army Enterprise Cloud Management Agency Expands its Oracle Defense Cloud Services
    • April 15, 2025
  • 8
    Tokyo Electron and IBM Renew Collaboration for Advanced Semiconductor Technology
    • April 2, 2025
  • 9
    IBM Accelerates Momentum in the as a Service Space with Growing Portfolio of Tools Simplifying Infrastructure Management
    • March 27, 2025
  • 10
    Tariffs, Trump, and Other Things That Start With T – They’re Not The Problem, It’s How We Use Them
    • March 25, 2025
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
    IBM contributes key open-source projects to Linux Foundation to advance AI community participation
    • March 22, 2025
  • 2
    Co-op mode: New partners driving the future of gaming with AI
    • March 22, 2025
  • 3
    Mitsubishi Motors Canada Launches AI-Powered “Intelligent Companion” to Transform the 2025 Outlander Buying Experience
    • March 10, 2025
  • PiPiPi 4
    The Unexpected Pi-Fect Deals This March 14
    • March 13, 2025
  • Nintendo Switch Deals on Amazon 5
    10 Physical Nintendo Switch Game Deals on MAR10 Day!
    • March 9, 2025
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.