Help Center/ Key-Value Storage Service/ Best Practices/ Accelerating Advertising Tracking with KVS
Updated on 2025-04-18 GMT+08:00

Accelerating Advertising Tracking with KVS

Challenges in Advertising Tracking

Advertising tracking helps advertisers measure the effect of their advertising campaigns, estimate the return on their investment, and refine their advertising plans. Achieving these purposes relies on real-time collection of advertising metrics by an advertising tracking platform. Such a platform processes a vast quantity of events such as impressions, clicks, and views in real time. The challenges during this process are as follows:

  • A huge volume of data

    An advertising tracking platform has a huge amount of advertising data flown in, including impressions, clicks, and browsing time. There are billions to tens of billions records stored each day, and these data will also be stored for a long time, typically 90 days.

  • Unpredictable request traffic

    The effects of advertising campaigns can be hard to forecast. An advertising tracking platform may need to handle surges in impressions, clicks, and views resulting from a successful campaign.

  • Real-time processing

    Advertisers rely on the results of advertising tracking to refine their strategies. Real-time data processing is critical to ensure efficient decision-making.

KVS Solution

Figure 1 A KVS solution for advertising tracking

The benefits provided by KVS for advertising tracking are as follows:

  • Ultra-large capacity

    KVS delivers decoupled, scale-out compute and storage. A single cluster and a single table have unlimited scale and capacity, which can meet the needs of event writes at any scale.

  • Robust performance

    The performance of KVS increases linearly with the cluster scale. A single table can deliver hundreds of millions of QPS to handle lots of event writes sparked by advertising campaigns.

  • Stable low latency

    KVS clusters automatically scale to ensure stable P99 latency of less than 10 ms for writes or reads at any scale, enabling efficient decision-making.

  • Cost-effectiveness

    The KVS serverless architecture eliminates the need to pre-provision resources. KVS offers pay-per-use billing, so platforms do not need to pay for idle resources.

Getting Started with KVS

Figure 2 Getting started with KVS
  1. Create a store.

    1. Log in to the KVS console.
    2. In the navigation pane, choose Stores.
    3. In the upper right corner of the page, click Create Store.
    4. Configure store parameters as instructed. For details, see Store details.
    5. Configure table parameters as instructed. For details, see Table details.
    6. In the Secondary Index area, create secondary indexes. KVS allows you to create local and global secondary indexes. For details, see Parameters for creating local and global secondary indexes.
    7. Confirm the configuration and click OK.

  2. Create a table and indexes.

    1. Log in to the KVS console.
    2. In the navigation pane, choose Stores.
    3. In the store list, locate the store where you want to create a table and click Create Table in the Operation column. Alternatively, click the store name to go to the store details page and click Create Table under Table Details.
    4. Configure table parameters as instructed. For details, see Table details.
    5. In the Secondary Index area, create secondary indexes. KVS allows you to create local and global secondary indexes. For details, see Parameters for creating local and global secondary indexes.
    6. Confirm the configuration and click OK.

  3. Add a KV item.

    1. Log in to the KVS console.
    2. In the navigation pane, choose Stores.
    3. Click the name of the store and then the name of the table where you want to add a KV item.
    4. Click the KV Items tab.
    5. Click Add KV Item in the upper left corner.
    6. Specify the shard key and sort key.
    7. (Optional) You can add other fields by clicking Add.
    8. Confirm the configuration and click OK.
    9. Check whether the KV item you added is in the KV list.