Connect with us

Tech

Why Character.ai chose Spanner and AlloyDB for PostgreSQL

Why Character.ai chose Spanner and AlloyDB for PostgreSQL

 



Improving data performance with Google Cloud and AlloyDB

As an AI company, efficiently processing large amounts of data is paramount to our ability to accelerate time to market and build differentiated algorithms. That's why we were initially drawn to Google Cloud's distinctive tensor processor units (TPUs) and graphics processor units (GPUs) such as the NVIDIA L4 GPU. Then, as we prototyped the service and started building the consumer application, a Google Cloud managed database solution became important to help us scale the application with a skeleton team.

When we discovered AlloyDB for PostgreSQL, we were caught in the middle. Usage of our services was growing rapidly, creating unique stress on various parts of our infrastructure, especially our database. Initially, they were able to solve the increased demand by scaling up to larger machines, but as the weeks went on, they realized that even the largest machines could not reliably meet customer demand, and they were running out of room. I did. Due to time pressure, we needed to find a solution that could be implemented within a few days. For example, a major refactoring to the shard architecture or a proprietary database engine was out of the question. AlloyDB promised improved performance and scalability with full compatibility with PostgreSQL, but will you be able to migrate in the time frame you need?

Achieved 150% growth with AlloyDB scalability

We chose a replication strategy to ease the migration process. We ran two replication sets from the source database to the destination AlloyDB database and operated in change data capture (CDC) mode for 10 days. This allowed us to prepare the environment for cutover. As a precaution, we provisioned a fallback instance on the source database in case we needed to roll back the migration. Because AlloyDB is fully compatible with PostgreSQL, the migration process was smooth and did not require any changes to the application code.

Since migrating to AlloyDB, we can confidently segment our read traffic into read pools to ensure continued growth in user activity. AlloyDB's replication lag is consistently less than 100ms, allowing you to scale reads to 20x your previous capacity. This improvement allows us to more effectively handle spikes in demand and handle a higher volume of queries, significantly increasing queries processed per second by 150%.

As a direct result, we have significantly improved our service and are able to provide a better user experience with better uptime. AlloyDB's full compatibility with PostgreSQL and low-latency read pool gave us a solid foundation to continue scaling. But we didn't stop there.

Extend your infrastructure with AlloyDB and Spanner

We knew that at our current growth rate, we would eventually run into scaling issues with the original monolith architecture. Needless to say, he needed the room to scale to his 1 billion daily active users.

To address this, we identified the fastest growing parts of the Django monolith and refactored them into their own standalone microservices. This allowed us to isolate the growth of this particular part of the system and manage it independently from the rest of the monolith, which we had already migrated to AlloyDB.

Currently, AlloyDB is playing a key role in powering engagement systems. Especially for front-end chats, real-time performance is essential for a responsive user interface, and data requires the highest level of consistency and availability as users interact with the chatbot.

However, its interactivity is mostly temporary, and its profile and reference data are relatively small and limited from a business model perspective (for example, one user profile per user). With this in mind, he refactored his second part of the chat stack into a microservice written in Go and supported with Spanner. With our industry-leading HA story and virtually unlimited scale, we were able to significantly improve the scalability and performance of our refactored chat stack.

Now, Spanner has enhanced its chat history recording system to allow the frontend to send chat requests to the backend, where the chat requests are recorded and sent to the AI ​​magic. Asynchronously captures the response, logs it, and sends it back to the user's front end. This bidirectional system allows both databases to actively collaborate across front-end chats, ensuring the highest level of data consistency and availability, and providing a superior experience for end users. With Spanner, you can now process terabytes of data every day without worrying about site stability.

We are confident that our chat application is future-proofed and able to handle any spike in user activity. We also reduced operational costs by moving to a managed database service. The biggest cost right now is opportunity cost.

As we grow, we continue to evolve our architecture and look for ways to improve scalability, performance, and reliability. By adopting an architecture that leverages the strengths of both AlloyDB and Spanner, we have built a system that meets the needs of our users and can support our growth, which is predicted to grow 10x over the next 12 months. I believe it can be done.

Sources

1/ https://Google.com/

2/ https://cloud.google.com/blog/products/databases/why-characterai-chose-spanner-and-alloydb-for-postgresql

The mention sources can contact us to remove/changing this article

What Are The Main Benefits Of Comparing Car Insurance Quotes Online

LOS ANGELES, CA / ACCESSWIRE / June 24, 2020, / Compare-autoinsurance.Org has launched a new blog post that presents the main benefits of comparing multiple car insurance quotes. For more info and free online quotes, please visit https://compare-autoinsurance.Org/the-advantages-of-comparing-prices-with-car-insurance-quotes-online/ The modern society has numerous technological advantages. One important advantage is the speed at which information is sent and received. With the help of the internet, the shopping habits of many persons have drastically changed. The car insurance industry hasn't remained untouched by these changes. On the internet, drivers can compare insurance prices and find out which sellers have the best offers. View photos The advantages of comparing online car insurance quotes are the following: Online quotes can be obtained from anywhere and at any time. Unlike physical insurance agencies, websites don't have a specific schedule and they are available at any time. Drivers that have busy working schedules, can compare quotes from anywhere and at any time, even at midnight. Multiple choices. Almost all insurance providers, no matter if they are well-known brands or just local insurers, have an online presence. Online quotes will allow policyholders the chance to discover multiple insurance companies and check their prices. Drivers are no longer required to get quotes from just a few known insurance companies. Also, local and regional insurers can provide lower insurance rates for the same services. Accurate insurance estimates. Online quotes can only be accurate if the customers provide accurate and real info about their car models and driving history. Lying about past driving incidents can make the price estimates to be lower, but when dealing with an insurance company lying to them is useless. Usually, insurance companies will do research about a potential customer before granting him coverage. Online quotes can be sorted easily. Although drivers are recommended to not choose a policy just based on its price, drivers can easily sort quotes by insurance price. Using brokerage websites will allow drivers to get quotes from multiple insurers, thus making the comparison faster and easier. For additional info, money-saving tips, and free car insurance quotes, visit https://compare-autoinsurance.Org/ Compare-autoinsurance.Org is an online provider of life, home, health, and auto insurance quotes. This website is unique because it does not simply stick to one kind of insurance provider, but brings the clients the best deals from many different online insurance carriers. In this way, clients have access to offers from multiple carriers all in one place: this website. On this site, customers have access to quotes for insurance plans from various agencies, such as local or nationwide agencies, brand names insurance companies, etc. "Online quotes can easily help drivers obtain better car insurance deals. All they have to do is to complete an online form with accurate and real info, then compare prices", said Russell Rabichev, Marketing Director of Internet Marketing Company. CONTACT: Company Name: Internet Marketing CompanyPerson for contact Name: Gurgu CPhone Number: (818) 359-3898Email: [email protected]: https://compare-autoinsurance.Org/ SOURCE: Compare-autoinsurance.Org View source version on accesswire.Com:https://www.Accesswire.Com/595055/What-Are-The-Main-Benefits-Of-Comparing-Car-Insurance-Quotes-Online View photos

ExBUlletin

to request, modification Contact us at Here or [email protected]