N-iX team has helped the client develop a cloud-agnostic ML-powered solution that automates the handling of transactions. It can detect whether a transaction is fraudulent or risky, not based on the customer’s credit score, credit history, email, IP address, login attempts, etc.
The solution handles ML models in real-time by granting ongoing access to them. It uses ETL processes to prepare and transform data obtained from the client. Other subcomponents send an API request to the solution, which with the help of ML models checks the transaction for fraud and risks and approves or rejects it.
The solution includes an end-to-end MLOps pipeline with ML model serving, API exposure of ML models, and the feature store database that stores all decisions, calculations, and requests. Each model has its own ETL pipeline for data preparation. We have migrated all data calculations to ETL pipelines to reduce the load on the central client’s database and remove the need for an MS SQL data server. The entire solution consists of the following components:
- A system that orchestrates the underlying decision-making process and exposes API used by external consumers;
- Feature Store, which provides a set of API endpoints to get precalculated ML feature values from Feature Store DB;
- ML execution runtime based on BentoML which serves ML models;
- Feature preparation application, which is used to convert Kafka messages with data update details to real-time feature values;
- Machine learning model versioning and repository (MLFlow)—a centralized repository of ML patterned models, used by data scientists and engineers.
We have implemented the Feature preparation application based on Apache Kafka and Debezium CDC to enable real-time data processing. We have also added Apache Flink open source stream- and batch-processing framework to provide real-time data calculations.
The dataflow has been divided into two categories:
- Batch jobs process ML models that do not require real-time calculations and are collected and calculated during a specific time span;
- Real-time data stream processes ML models that require real-time calculations.
The N-iX team has deployed several ML models for batch and streaming processing via Octopus, where the solution is packaged into the Docker containers. Also, we set up the latency to 250 milliseconds per request with a load of up to 1 million requests per month.
Furthermore, we have applied our DevOps expertise to set up infrastructure and the CI/CD pipeline to deploy the solution. We made it cloud-agnostic by running Docker images on multiple virtual machines in a Kubernetes cluster.
N-iX has also ensured that all sensitive data remained protected by working with and setting up strictly anonymized datasets provided by the client.
Finally, we were able to successfully set up the data flow and adjust all data calculations for real-time ML models. We have enabled the preparation and transformation of large amounts of data received from multiple sources, such as the solution’s database or the client’s database.