⚙️ Alibaba Cloud Function Compute: Revolutionizing Amap RTA Advertising System Architecture 🚀.

Article hero image

🎯 What is RTA? 🤔

RTA or Real-Time Advertising 📈 is a potent blend of a program interface, data and model capabilities of media, and advertisers to streamline real-time advertising optimization. More than just an interface technology, RTA services leverage Amap’s crowd information for accurate advertisement placement.

🧱 The Original System Architecture & Its Shortcomings

The original system heavily relied on an extensive server network, creating a lengthy dependency chain. Any system expansion required corresponding expansion of dependent services, thereby consuming substantial resources.

🖥️ Technology Selection

1️⃣ Crowd Hit Function

This function serves to determine whether an element is part of a set. Industry often employs Bloom filters to address this challenge. This blend of hash algorithms and bitmaps assures high query efficiency and minimal space requirements. Redis Extended Edition introduces the bf (bloom filter) feature, ensuring data consistency across different languages. Redis’ role eliminates the necessity for an algorithm gateway, reducing the load on the data middle platform.

2️⃣ Data Synchronization

The audience selection platform offers four types of data updates:

  • Online 🌐
  • Real-time ⏱️
  • Offline single-time 🔄
  • Offline periodic 📆

Although real-time requirements are generally low, due to factors like a large population, low proportion of real-time population changes, and the media side’s cache, offline periodic updates could be a practical consideration.

3️⃣ Serverless

Why Serverless?

Serverless technology lets businesses concentrate on their core business logic by separating the interface between applications and platforms. It facilitates the rapid development and deployment of stable, secure, scalable, and elastic distributed applications.

How to Implement Serverless?

Serverless systems are a blend of FaaS (Function as a Service) and BaaS (Backend as a Service). Alibaba Cloud provides the ApsaraDB for Redis Enterprise Edition, satisfying the storage requirements necessary for the engine service to adopt a serverless architecture.

⚡ High Performance Requirements

RTA advertising system necessitates high-performance, high-traffic, and low-latency due to its services for external media. Post serverless architecture adoption, traffic is directed first to the Alibaba Cloud Function Compute system and then to the function instance for processing. Here, the Function Compute must maintain average system time and the P99 value of request processing at very low levels to ensure the request success rate SLA requirements under multi-tenancy and high traffic.

🏗️ Architecture of The Landing Scheme

In the revised architecture, once the middle platform generates a crowd, it uses Redis BF.INSERT to create a bf. Once the engine retrieves the device ID, it uses the BF.EXISTS command to check if the device is within the designated population.

Notable Features:

  1. Elimination of the gateway leading to reduced link length.
  2. Caching to decouple offline and online systems, thus improving performance.
  3. Data compression for reduced memory usage.
  4. Implementation of serverless computing, promoting real-time elasticity, maintenance-free, and quicker application iteration.

📊 High-Availability of the Delivery SLA

Alibaba Cloud Function Compute is designed to deliver tens of thousands of instances for a single function. It utilizes dynamic resource pool supplementation to enable delivery of more instances. FC achieves an instance creation speed of 100 milliseconds.

🎉 Business Effects

The upgraded system architecture has yielded several benefits, such as:

  • Saving of thousands of machine resources.
  • Full implementation of serverless.
  • Shortened call links.
  • Enhanced elasticity, robustness, and maintenance ease.

In a nutshell, this upgrade has led to significant business advancements.