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
  • Design
  • Engineering

Launching New Feature Or Games On Existing Cloud Spanner Database With Load Generator Tool

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

Game developers often reuse their existing database platform to launch their new games or launch new features to their existing games. This requires the database to scale in terms of new schema (tables, index, etc.), data and traffic.

For games built with Cloud Spanner databases, most database operations can be done seamlessly, without affecting production game traffic. Cloud Spanner allows you to make schema updates with no downtime. Customers can also scale their database by adding compute capacity that will automatically balance the data and traffic for the new feature/game launch.


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.

Most features or games expect a steady growth in traffic and Cloud Spanner database will steadily scale to the growing load. However, some games may want to plan for a knife-edge traffic growth pattern, and can use the Cloud Spanner Load Generator tool. This blog details the steps to execute and verify the warmup, including some best practices to follow.

Scaling up before launch

For games or features being launched on new databases or empty tables, customers can directly use the load generator tool to warm up the database or tables and create splits. Customers can subsequently delete all rows before their launch day and the Cloud Spanner database will scale to the expected production traffic. Customers can follow this post to warm up their database and verify the database performance for a flawless launch.

For games or features using an existing database or tables (i.e. database or tables that have existing production data), the load generator tool can also be used, though we recommend to track the synthetic data added and delete it before game launch.

Read More  Google Cloud Now The Most Favored Platform For Research Globally, According To Ipsos

Warmup for various schema entities

Tables and Interleaved Tables

Using `gcsb load` command to seed data into tables will automatically create 5 children rows for each parent row across all interleaved (child) tables. To automatically delete the child table rows created by the load generator, the schema can either set a TTL policy on child tables or set the `ON DELETE CASCADE` clause.

Index

All  Secondary and Interleaved Index will automatically populate synthetic data based on the data generated for the base table. This exercise creates splits to the Index tables as well, and there is no special handling required for warming-up the Index. Index will also drop the data when the rows from the base table are deleted, either manually using PDML or automatically based on TTL policy.

Foreign Keys

This is currently unsupported in the load generator tool.

Track and Delete Synthetic Data

1. Add a nullable commit timestamp column to the relevant tables that will be used for the warmup exercise, using the following DDL. It is not recommended to reuse an existing `allow_commit_timestamp` column. The use of a separate column (that is not used by the game application) will be auto-populated by the load generator tool, and provides a strong correlation to synthetic data. All rows generated by production traffic should have the column value as NULL.

 

ALTER TABLE Singers ADD COLUMN LoadGeneratorDataTimestamp TIMESTAMP OPTIONS (allow_commit_timestamp = true);

 

2. Add a Cloud Spanner TTL policy using the following DDL. Row deletion policies run at a low priority, ideal for incremental clean-up. However, if the warmup had to create large amounts of data to create adequate splits, this will likely lengthen the time it takes to delete the synthetic data in a busy database because Cloud Spanner’s internal work scheduler will prioritize production game traffic.

Read More  Building A Machine Learning Platform With Kubeflow And Ray On Google Kubernetes Engine

 

ALTER TABLE Singers ADD ROW DELETION POLICY (OLDER_THAN(LoadGeneratorDataTimestamp, INTERVAL 1 DAY));

 

3. Execute the load generator tool with the load expected at game launch for at least an hour.

4. Verify the performance of the database by executing `gcsb run`, specifically to ensure the latency and throughput of the database.

5. Based on the configured TTL, the synthetic data will be deleted automatically after X days (in our example in step #2, all synthetic rows will be deleted after 1 day).

6. Optionally, you can drop the column (LoadGeneratorDataTimestamp) to avoid confusion or mis-use in your game application.

Closing Remarks

Cloud Spanner recommends to warm up your database before major launch of your application, and suggests the following steps for warmup:

  • Make sure that the primary keys you generate for your test data loads are in the same key space. This can be configured in the gscb.yaml config within the load generator tool
  • Run a load test no more than two days before your launch. Run the load test for at least one hour at the expected peak load. The load test causes Cloud Spanner to create more splits due to load-based splitting.
  • After the load test is complete, you can delete the rows generated by your load test from your tables, but don’t delete the tables themselves. This keeps the splits available for your launch window.

 

 

By: Sneha Shah (Senior Software Engineer)
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
  • Gaming
  • Google Cloud
  • SQL
You May Also Like
View Post
  • Engineering
  • Technology

Guide: Our top four AI Hypercomputer use cases, reference architectures and tutorials

  • March 9, 2025
View Post
  • Computing
  • Engineering

Why a decades old architecture decision is impeding the power of AI computing

  • February 19, 2025
View Post
  • Engineering
  • Software Engineering

This Month in Julia World

  • January 17, 2025
View Post
  • Engineering
  • Software Engineering

Google Summer of Code 2025 is here!

  • January 17, 2025
View Post
  • Data
  • Engineering

Hiding in Plain Site: Attackers Sneaking Malware into Images on Websites

  • January 16, 2025
View Post
  • Computing
  • Design
  • Engineering
  • Technology

Here’s why it’s important to build long-term cryptographic resilience

  • December 24, 2024
IBM and Ferrari Premium Partner
View Post
  • Data
  • Engineering

IBM Selected as Official Fan Engagement and Data Analytics Partner for Scuderia Ferrari HP

  • November 7, 2024
View Post
  • Engineering

Transforming the Developer Experience for Every Engineering Role

  • July 14, 2024

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

Input your search keywords and press Enter.