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  How BBVA Spain Uses Google Maps Platform To Build Transparency Around Spending

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  Unlock More Choice With Updates To Google Cloud’s Infrastructure Capabilities And Pricing

 

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

Just make it scale: An Aurora DSQL story

  • May 29, 2025
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

Stay Connected!
LATEST
  • 1
    The Summer Adventures : Hiking and Nature Walks Essentials
    • June 2, 2025
  • 2
    Just make it scale: An Aurora DSQL story
    • May 29, 2025
  • 3
    Reliance on US tech providers is making IT leaders skittish
    • May 28, 2025
  • Examine the 4 types of edge computing, with examples
    • May 28, 2025
  • AI and private cloud: 2 lessons from Dell Tech World 2025
    • May 28, 2025
  • 6
    TD Synnex named as UK distributor for Cohesity
    • May 28, 2025
  • Weigh these 6 enterprise advantages of storage as a service
    • May 28, 2025
  • 8
    Broadcom’s ‘harsh’ VMware contracts are costing customers up to 1,500% more
    • May 28, 2025
  • 9
    Pulsant targets partner diversity with new IaaS solution
    • May 23, 2025
  • 10
    Growing AI workloads are causing hybrid cloud headaches
    • May 23, 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
  • Understand how Windows Server 2025 PAYG licensing works
    • May 20, 2025
  • By the numbers: How upskilling fills the IT skills gap
    • May 21, 2025
  • 3
    Cloud adoption isn’t all it’s cut out to be as enterprises report growing dissatisfaction
    • May 15, 2025
  • 4
    Hybrid cloud is complicated – Red Hat’s new AI assistant wants to solve that
    • May 20, 2025
  • 5
    Google is getting serious on cloud sovereignty
    • May 22, 2025
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.