• >
  • >
  • >
  • >
  • >
Google > Case Studies > Scaling Character.AI: How AlloyDB for PostgreSQL and Spanner met their growing needs

Scaling Character.AI: How AlloyDB for PostgreSQL and Spanner met their growing needs

Google Logo
Customer Company Size
Mid-size Company
Region
  • America
Country
  • United States
Product
  • AlloyDB for PostgreSQL
  • Google Cloud Spanner
  • Google Cloud TPUs
  • Google Cloud GPUs
  • Google Cloud Datastream
Tech Stack
  • PostgreSQL
  • Golang
  • Django
Implementation Scale
  • Enterprise-wide Deployment
Impact Metrics
  • Productivity Improvements
  • Cost Savings
  • Customer Satisfaction
Technology Category
  • Platform as a Service (PaaS) - Data Management Platforms
  • Analytics & Modeling - Predictive Analytics
  • Infrastructure as a Service (IaaS) - Cloud Databases
Applicable Industries
  • Software
  • Telecommunications
Applicable Functions
  • Product Research & Development
  • Business Operation
Use Cases
  • Edge Computing & Edge Intelligence
  • Predictive Maintenance
  • Remote Asset Management
Services
  • Cloud Planning, Design & Implementation Services
  • System Integration
About The Customer
Character.AI is a company focused on delivering lifelike interactions using artificial intelligence. Their platform allows users to engage in conversations with Characters inspired by historical figures, fictional personas, and more. The service offers dynamic Group Chats where multiple Characters interact with users, creating an interactive dialogue. Character.AI harnesses the power of neural language models to analyze extensive text data and generate intelligent responses. The company is highly technical, from training models on supercomputers to delivering services as a web-based chatbot. Character.AI aims to provide an exceptional user experience by efficiently processing large amounts of data, which is crucial for their time-to-market and ability to build differentiated algorithms.
The Challenge
Character.AI experienced exponential growth in user demand, which put significant stress on their existing database infrastructure. The initial database setup was limited by the maximum scaling capacity of each instance and the number of smaller instances that could be patched together to distribute the workload effectively. The company lacked the resources to transform or refactor the database to a more scalable engine within the given timeframe. They needed a solution that could offer immediate scale and performance benefits without requiring extensive code changes. The challenge was to find a scalable solution that could be deployed quickly to handle the increased demand and ensure the platform's functionality.
The Solution
Character.AI turned to Google Cloud's managed database solutions to address their scaling challenges. They initially used Google Cloud's tensor processor units (TPUs) and graphic processor units (GPUs) for prototyping and building their consumer application. As the demand for their service grew, they adopted AlloyDB for PostgreSQL to handle the increased database load. AlloyDB offered better performance and higher scalability with a fully PostgreSQL compatible interface, allowing Character.AI to scale their operations without extensive code changes. The migration process involved a replication strategy, running two replication sets from the source database to the destination AlloyDB database in change data capture (CDC) mode for 10 days. This approach allowed them to prepare for the cutover smoothly. Additionally, they refactored a part of their Django monolith into a standalone microservice backed by Spanner, improving scalability and performance. Spanner's industry-leading high availability and virtually unlimited scale enabled Character.AI to ingest terabytes of data per day without concern.
Operational Impact
  • Character.AI successfully migrated to AlloyDB, allowing them to segment read traffic into read pools and handle a surge in demand.
  • The migration process was smooth, requiring no changes to the application code due to AlloyDB's full compatibility with PostgreSQL.
  • The company improved the scalability and performance of their product by refactoring a part of their monolith into a microservice backed by Spanner.
  • Character.AI reduced operational costs by moving to a managed database service, future-proofing their chat application to handle spikes in user activity.
  • The adoption of AlloyDB and Spanner provided a robust foundation for continued scaling, ensuring exceptional user experience with outstanding uptime.
Quantitative Benefit
  • 150% increase in queries processed per second.
  • Replication lag consistently under 100 milliseconds.
  • Ability to scale reads to 20 times the previous capacity.

Case Study missing?

Start adding your own!

Register with your work email and create a new case study profile for your business.

Add New Record

Related Case Studies.

Contact us

Let's talk!
* Required
* Required
* Required
* Invalid email address
By submitting this form, you agree that AGP may contact you with insights and marketing messaging.
No thanks, I don't want to receive any marketing emails from AGP.
Submit

Thank you for your message!
We will contact you soon.