Mastering A/B Testing with Clickhouse

Mar 2023
5 min read
Tamil Selvan

A/B Testing for feature release

Payments ecosystem as a whole involves multiple parties when it comes to making a transaction successful. At Juspay we have the vision of delivering multiple features with smaller and faster release cycles, but in a safer way. Even though applications are tested in a sandbox environment the external factors that touch a transaction flow always remain uncertain, and in most cases can hinder a successful transaction. Juspay being a data and tech driven company relies heavily on analytics to make seamless releases and provide reliable payment services.

A/B testing is an industry wide commonly used testing technique which is used to evaluate the performance of a newer version of an application by diverting a fraction of live traffic on to the newer version to observe its behavior and take a decision of moving forward with the release.

With our wide range of merchants and their constantly changing requirements, we have to stay up-to-date with frequent releases, sometimes even multiple releases per day, whether they are staggered or full-scale. Therefore, we needed a monitoring solution that would allow us to maintain fast-paced release cycles while ensuring that the newest release did not affect the functioning of the payment systems that are currently running.

Juspay selected ClickHouse to power our critical A/B testing and monitoring systems. Clickhouse is a razor-focused analytics first DB that provides highly efficient aggregates on a very large volume of data, higher disk throughput even in HDD and at the same time functions like a traditional RDBMS in certain useful scenarios.

AB System

Clickhouse comes with in-built kafka consumer integration which makes it easy to do data ingestion from existing data pipelines. Clickhouse also is very much frugal when it comes to resource consumption which makes it very inexpensive to maintain.

A/B Clickhouse

Real time Analytics

Real-time analytics is the process of collecting, processing, and analyzing data in real time or near-real time, as it is generated or received. It involves monitoring data streams, detecting patterns or insights, and taking immediate actions based on the analysis.

Big Query by Google’s Cloud Platform has always been our go-to platform to fetch large datasets. But with this, the cost has always been high. Irrespective of the type of the query and size of the data, a lot of money was getting spent on a daily basis. Clickhouse has been the game changer in this regard. With Clickhouse, we have reduced the operating and infrastructure costs by a huge margin without compromising on the quality or performance. In fact we were able to outperform the existing pipelines based on Big query by reducing lag. In terms of real time analytics, we have built highly efficient alerting systems using the fault tolerant features of Clickhouse to ensure availability of the data at all times.

Real-Time Merchant Dashboards using ClickHouse

Millions of transactions get processed on a daily basis through Juspay. It is extremely important for us to provide accurate and real time analytics of the data to our merchants. Transaction level information, conversion rates across the different payment gateways and payment methods, real time analytics of payment method downtimes are some of the key data points that need to be actively monitored to improve the user experience. Clickhouse’s eventual consistency model when it comes to real time row updates by providing table engines like collapsing merge trees has enabled us to show highly accurate “transactional” metrics in an “analytics” DB!

Scripts are written to set up ETL jobs to feed the data into the system. Simple yet sophisticated dashboards are then built with this data to present the real time analytics for various use cases. Our dashboards are easy to use and provide all the insights our merchants would like to track and monitor.

Juspay Dashboard

Innovating through the ever evolving payments landscape, Juspay has built reslient and reliable systems to power payments of every scale. Our scalable systems promise that your payments experience scales in line with the 10X growth of your businesses.