Abstract: As e-commerce platforms demand more and more AI algorithm models, the unified construction of feature data platforms is a headache for many development teams. Only through unified storage of characteristic data can the original “data island” be changed and the dilemma of repetitive wheel production be solved.

This article is shared from Huawei cloud community “Huawei Cloud enterprise Redis: Help VMALL build advanced feature Platform”, author: GaussDB database.

1. Customer introduction

Huawei mall (VMALL) is a subsidiary of huawei company proprietary and select good official electric business platform, based on the concept of “wisdom life, select a good thing” to provide consumers with the most complete huawei brand products and HongMeng ecological products, covering the office, travel, home life, sports, entertainment, and other requirements, to the whole scene intelligent life to bring more consumers.

Cloud database GaussDB(for Redis) As an enterprise Redis of Huawei Cloud, it is committed to providing customers with KV storage services that are stable, reliable, ultra-high concurrency, and capable of rapid and elastic expansion. GaussDB(for Redis) plays a key role in the construction of VMALL feature engineering platform.

2. Business pain points

VMALL uses a lot of AI and big data technology to support the efficient development of intelligent recommendation, precision marketing, intelligent search, selection and other businesses.

With the rapid development of business, the demand for AI algorithm model is increasing day by day. In the current AI development process, both “model training” and “model deployment” stages have mature platform support, but the “feature data preparation” stage lacks a universal platform, resulting in “inconsistent feature data of online reasoning and offline training”, “independent development of each algorithm model, The three key problems of feature production repeated wheel and feature engineering cost a lot of time (accounting for 60%-70% of algorithm development time) have seriously affected the efficiency of r&d and hindered business development.

To solve this problem, VMALL big data team started to build a unified feature platform.

The core component of the feature platform is the feature storage database. Only through unified feature data storage can the original “data island” dilemma be changed and the three major problems of “inconsistency”, “difficult to share” and “low efficiency” be completely solved.

However, it is precisely because the feature database needs to connect with multiple online/offline scenarios, connect with multiple batch/streaming data sources, and meet the diverse consumption demands of training/reasoning, that the selection of feature database has very high requirements: It is necessary to find a data storage service that can not only provide low-cost mass data storage and facilitate expansion, but also ensure the absolute reliability of data and high availability of services. Both online reasoning with low delay and offline training with high throughput should be satisfied. It can not only provide simple KV interface for downstream easy consumption, but also compatible with mainstream batch/stream processing engine (Spark/Flink, etc.) for upstream fast access.

After in-depth investigation, the VMALL big Data team finally chose GaussDB(forRedis) as the feature database. Let’s take a detailed look at how GaussDB(forRedis) meets the above stringent requirements.

3. Solutions

1. Feature platform uses GaussDB(forRedis)

1) Feature production (extraction, processing and storage)

  • Offline features (static features) :

Periodically schedule Spark jobs to extract data from various data warehouses and data lakes, process the data for feature engineering, and store the data to GaussDB(for Redis).

  • Real-time features (dynamic features) :

Flink consumes Kafka, or streams stored data, continuously updating GaussDB(for Redis).

2) Characteristic consumption

  • Online reasoning:

The model has been deployed to production and started to undertake services that require low-latency, high-concurrency consumption data from GaussDB(for Redis)

To read data.

  • Offline training:

GaussDB(for Redis) stores the latest feature data, and OBS stores the full amount of feature data.

1) For simple models using static features, features can be directly obtained from OBS.

2) For scenarios using real-time features (such as real-time recommendation system), Flink obtains user request records from Kafka in real time, and obtains features from GaussDB(for Redis). Records and features are spliced into training samples and stored in files for offline training.

2. Features platform’s core requirements for GaussDB(forRedis)

Based on the above service scenarios, the core requirements of feature platforms for GaussDB(for Redis) are summarized as follows:

3. Key solutions for GaussDB(for Redis) to meet the requirements of feature platforms

1) Business interface

GaussDB(for Redis) is compatible with Community Redis5.0 interfaces and can connect to Spark or FlinkConnector, meeting service requirements

2) Stability

GaussDB(for Redis) uses a self-developed kernel, which solves problems such as community Redis fork and OOM, and has the stability of enterprise-level applications

3) Reliability

Zero data loss: Commands are dropped one by one in real time, and the bottom three copies are stored redundant, resulting in the risk of no data loss

Strong data consistency: Based on the GaussDB common shared storage component DFV, the database implements strong data consistency for three copies and avoids dirty read risks in multi-point access

4) cost

GaussDB(for Redis) automatically separates hot and cold data and uses a hybrid storage solution of memory and SSD, greatly reducing customer costs. According to the calculation of VMALL’s characteristic volume, there are hundreds of millions of users. The number of characteristics of each user is k-10K. The annual cost of GaussDB(for Redis) is only a little over 30W, and if community Redis is selected, the cost is 20W+

5) performance

GaussDB(for Redis) uses a multi-threaded architecture, and all nodes support writing at the same time. Therefore, GaussDB can meet the requirements of high-throughput write in batch irrigation database. In read aspect, based on hot and cold separation scheme, hot data resident memory provides stable and low latency. Cold data reads involve I/O switching and have a long tail, but meet VMALL service requirements. (Currently, the average read latency of GaussDB(for Redis) instances on VMALL is 0.16ms, P99 0.4ms, and P9999 1.5ms.)

6) Scalability

** Based on the computing and storage separation architecture, ** the underlying data can be accessed by any node. Data copy relocation does not occur during capacity expansion, so the speed is very fast; The capacity expansion for compute nodes is completed in minutes and storage capacity is completed in seconds, and the RTO is less than 10 seconds

In conclusion, compared with community Redis, GaussDB(forRedis) provides more stable user experience, more reliable data storage, lower cost and more convenient expansion capability. It is an enterprise-level Redis service more suitable for large-scale e-commerce big data applications such as VMALL feature platform. Therefore, the VMALL feature platform selects GaussDB(for Redis) as the feature data storage service.

4. Effect after online

VMALL has migrated feature data in one phase, including Spark offline feature production in Feature Production service and Offline Training Flink feature query in Feature consumption service, to GaussDB(for Redis).

Currently, GaussDB(for Redis) runs smoothly and has stable peak time delay, which meets VMALL requirements. The average read delay was 0.2ms (P99< 0.4ms) and the average write delay was 0.6ms (P99<2ms).

VMALL has started the feature data migration of the second phase and plans to complete the access of core businesses including “Flink online feature generation” and “Online reasoning”.

5, summary

This paper introduces the selection and application of feature data storage service of HUAWEI Marketplace (VMALL) during the construction of feature platform. Therefore, Huawei cloud GaussDB(for Redis) service has advantages in cost, reliability, and scalability. It can be used as an ideal solution for feature data storage and provides stable and reliable enterprise-level Redis service capabilities.

Enterprise Redis special hot sale, not limited to old and new users, free for the first month (link) :

Console.huaweicloud.com/nosql/?regi…

Click to follow, the first time to learn about Huawei cloud fresh technology ~