blog-banner

Postgres Overhaul: Riskified’s Database Scaling Insights at RoachFest24

Last edited on September 9, 2024

0 minute read

    In 2024 Cockroach Labs ramped up our commitment to customers by taking our annual RoachFest event global, providing a platform to diverse enterprises benefiting from scalable, resilient database solutions for sharing and learning.

    A highlight of RoachFest24 in London: the dynamic talk by Riskified’s Harel Safra, Data Platform Engineering Team Lead, and Yoav Shemesh, Senior Data Platform Engineer, on database best practices for eCommerce.

    Fraudulent transactions can be devastating for businesses of any size, putting revenue and profits at risk. But with the sheer volume of data, it can seem impossible to identify fraudulent activity. To empower top brands like Prada, Wayfair, and Canada Goose, Riskified built their all-in-one eCommerce fraud management platform.

    If you missed RoachFest London and Menlo Park, we just announced the agenda for our final stop: RoachFest NYC on September 26. Register on our event page now!

    “Riskified’s Lessons Learned Migrating to CockroachDB for Greater Scale”Copy Icon

    Safra and Shemesh teed off their talk with a nod to the other speakers and customer stories shared during RoachFest. Next, Safra took over to provide background on their Data Platform Engineering team, which manages Riskified’s online database and all things customer-related, such as the data analysis process and customer dashboards.

    Operating out of 185 countries and reviewing over $105 billion in transactions in a given year, Safra shared that Riskified’s existing Postgres system needed an overhaul to accommodate their growing scale. The big bottleneck: the number of transactions per second (TPS) due to the single writer server, which would limit Riskified’s business growth.

    Shemesh shared how the team evaluated various database solutions and what they were looking for:

    • Postgres compatibility to minimize changes to their application

    • Guaranteed security given the personally identifiable information (PII) stored

    • Highly efficient query delivery in a scalable, resilient system

    After narrowing down their options, the Data team ran a head-to-head test using Jmeter metrics by copying production data to CockroachDB, scaling it up, and comparing it to the Postgres performance. Satisfied with the results, the team migrated to CockroachDB in a multi-step process. 

    To support the data transfer, the team used AWS Data Migration Service (DMS) as well as CockroachDB Change Data Capture. Riskified’s original tech stack included Ruby, Prometheus, Grafana, Terraform, and more. Safra and Shemesh shared how they managed certain incompatibility issues, and replaced other parts of their stack – such as switching out Debezium for CockroachDB changefeeds.

    Today, the Data Platform team uses AWS auto scaling groups (ASG) to manage their CockroachDB clusters. Wrapping up, the duo shouted out the CockroachDB docs, explaining that the engineers achieved their goal of scaling the system for future growth – with minimal impact on the application side.

    To hear about the technical details of Riskified’s migration process and how they scale their platform with CockroachDB, watch their full presentation below:

    Ready to engage with other engineers utilizing scalable, resilient database solutions? Do NOT hesitate – register for RoachFest NYC on September 26!

    customer stories
    Postgres migration
    RoachFest