Databases are a key component of every program, whether it is hosted locally or in the cloud.
Due to the rising need for cloud hosting, cloud-based relational databases that provide consistency, reliability, and availability, as well as support online deployments, are increasingly required.
An illustration of a cloud-based database is Google Cloud Spanner.
Let’s examine Google Cloud Spanner in-depth in this article, including all of its capabilities, use cases, price, and other details.
What is Google Cloud Spanner?
A relational DBMS that adopts the NewSQL methodology is Google Cloud Spanner. It ensures ACID (atomicity, consistency, isolation, and durability) compliance and is particularly suited for OLTP (online transaction processing).
It still supports scale-out architecture and is very scalable, much like NoSQL systems. With a scale-out design, it is simple to add more nodes to an existing cluster in order to distribute data storage and computation and achieve scalability.
The advantages of NoSQL and NewSQL are both provided by Google Cloud Spanner.
TrueTime, Google’s globally synchronized clock, is the basis of Google Spanner’s consistency. Google created TrueTime, a widely distributed and highly available global clock that is accessible to all Google cloud services and servers.
TrueTime ensures that a newly created timestamp, let’s say T1, will always be higher than any timestamp T2, as long as T2 was generated before T1 was. As a result, True-time is able to produce timestamps that are monotonically growing, meaning that they will constantly be rising across their entire domain.
Applications can then use this to give each of their transactions distinctive, rising timestamps. Every piece of data published to Google Cloud Spanner receives a timestamp using TrueTime, and this timestamp is reliable worldwide.
This means that each transaction kept in Spanner will have a special timestamp associated with it, which records the precise instant at which Spanner processed the transaction.
With the help of these timestamps, Google Cloud Spanner can offer reliable reads from any point in the world without preventing any writes.
Additionally, Google Cloud Spanner is able to provide strict concurrency control for all of its transactions.
While Google Cloud Spanner may have performed (and/or duplicated) all transactions across many locations, to an external user they all appear to have happened sequentially, one after the other. In other words, Google Cloud Spanner functions as a single machine database for external users.
A global timestamp order is provided by Google Cloud Spanner, which transactions can use for subsequent operations and queries. Users had to decide between sluggish performance+stronger assurances OR great performance+weaker guarantees in prior database systems.
However, Google Cloud Spanner can offer robust assurances, high transaction integrity, and quicker performance. Developers should just care about making sure each of their transactions is valid and their application logic, rather than worrying about any conflicts or races between their many transactions.
Features
- Most apps are simple to create, integrate, and test.
- It can be characterized as a NewSQL database since it supports both NoSQL and SQL, resolving the scalability and performance problems with conventional SQL databases.
- Its precision is quite great since it synchronizes time using atomic clocks and GPS technologies.
- Cross-table transactions are supported.
- Includes sophisticated management and administrative features, including backup, recovery, the ability to create SLA instances, and more.
- For local and multi-regional instances, provides 99.999% availability.
- Horizontally scales smoothly with little hindrance. The benefit of horizontal scalability is that when additional servers are added, the system’s performance significantly improves.
- To build a single data lifecycle, it offers real-time big data querying.
- Based on request volume and data size, it automatically shards data.
- It does not automatically select a secondary index despite the fact that they are supported.
- Transparent replication is offered across many setups and geographies.
- provides sophisticated analytics and data.
- Data from different applications and storage systems are synchronized.
- Physical dependencies between database tables are possible.
- For ongoing data recovery, it offers Point-In-Time-Recovery (PITR). Additionally, you can retrieve data down to the microsecond level.
- Customer-Managed Encryption Keys (CMEK), IAM integration, data-layer encryption, and other enterprise-level security measures are included.
Use cases
1. E-commerce sites worldwide
Ordering products, collecting payments, and updating inventories are all transactional system functions that define e-commerce. Large national or worldwide footprints can be seen on many e-commerce websites.
Making transactional databases globally consistent has several advantages, including ensuring data integrity and minimizing the need for creative software engineering solutions to address data consistency problems.
2. Processing analytics in real-time
Numerous cutting-edge capabilities that facilitate analytical processing are included with Google Cloud Spanner. These improvements include things like better query speed, partitioning indexes, and data loading, among others. This makes this RDBMS an excellent option for a worldwide analytical processing system that is totally cloud-based.
3. Disaster Recovery (DR)
DR is crucial but highly challenging to put into effect, especially if you adhere to the recommended practice of employing far geographic DR locations to safeguard against local calamities. In reality, a lot of IT companies create backups and hope they never need them.
For DR, Spanner provides a practical future route. Replicating the data in a Spanner database to a distant location will restore an application without the need to rebuild it using data from a backup tape.
Create fresh computer resources at a different location and connect them to the backup Spanner database system in case the primary site becomes available. Due to its simplicity, DR is now accessible to a lot more IT departments.
4. Minimizing manual intervention while increasing response time
A typical database’s performance declines when the number of users reaches the predetermined threshold levels. It takes many stages to restore performance, including assessing the performance measurements and scaling the database as necessary.
Because there is a maximum size for a server, horizontal scaling is difficult, whereas vertical scaling is simple. In such circumstances, Google Cloud Spanner can be a practical choice since it manages horizontal scaling with little intervention.
5. Gaming Database
Complex database structures are needed to track player performance and data in online games, especially multiplayer games. Given that it frequently necessitates sharding, many businesses struggle to grow and manage this complexity.
Additionally, because NoSQL databases can adapt to changes in the underlying data model, they are a superior option for gaming. Redundancy is also a crucial component of the game software.
Since it supports all of these characteristics, Google Spanner is a suitable option for a gaming database. We believe that by demonstrating these use-cases, you will be able to see how versatile Google Cloud Spanner is and determine whether it is a good match for your business.
6. Financial Services
The regulatory restrictions and customer expectations in this sector are a perfect storm. Regulatory agencies, banks, and fintech companies must continuously and perfectly communicate.
Additionally, hundreds of millions of transactions must be handled flawlessly by programs like payment gateways and online banking while also going through complex anti-fraud and settlement procedures.
To handle this continuous inflow of data in the past, historical databases had to be meticulously rearchitected, and unstable custom solutions were used. The storm is easily handled by Google Cloud Spanner.
Limitation
Nevertheless, it has certain limitations, including the inability to handle database views, the lack of granular permission or role settings, and the need for a few workarounds in order to fully utilize all of the nodes. While making a choice, keep these restrictions in mind as well.
Pricing
The cost of Spanner is straightforward and foreseeable. You are only paid for the storage that your database’s tables and secondary indexes utilize (not pre-provisioned), backup storage, the amount of network egress, and the compute capacity of your instance (measured in a number of nodes or processing units).
Conclusion
A genuinely astonishing product, Google Spanner is a superb example of Google’s tremendous technological prowess.
If Google keeps releasing such ground-breaking products, it will soon surpass other cloud also-rans and assume a position as a competitor.

Leave a Reply