How Xianyu Doubled Its CTR through a Non-Invasive and Scalable IFTTT System

  • User-generated relationships could be improved to be more information rich and be of greater variety. Currently, the existing system only maintains some user relationships, including favorites and likes, where other information is usually discarded or not recorded.
  • The relationship between users is unidirectional-buyers can easily contact sellers, but the opposite doesn’t occur currently-and often the other users may be offline.

The Concept of IFTTT

IFTTT is a free web-based service that uses a type of concept called “Network Automation Artifact”. Generally speaking, it’s a relationally practical and simple concept. “IFTTT” is a crafty little abbreviation of the phrase “If This Then That”, which just means that if a “this” condition is met, a “that” action is triggered. Conceptually, then, “IFTTT” consists of three parts: a trigger (being “this”), an action (being “that”) and a recipe (being the entire condition-result clause set).

How IFTTT Can Work in Xianyu

IFTTT in the Xianyu app ecosystem can be generated based on the combination of several service scenarios and the IFTTT concept. In the Xianyu ecosystem, the IFTTT standard protocol can be encapsulated, which can make for a non-invasive and scalable service orchestration system.

  • Multidimensional User Relationship Awareness
  • Real-Time and Bidirectional User Interaction

IFTTT and Xianyu: The Technical Solution

  • Channel: The function of the Channel layer in the IFTTT system of is to save and manage user relationship data. The layer defines the metadata structure of user relationships, including the relationship type, the source account, and the target account. The Channel layer is the cornerstone of the IFTTT system at Xianyu. The Trigger and Action layers further abstract the service logic based on user relationship data.
  • Trigger: A Trigger is a custom trigger event on the service, which is closely related to the service. It may be that the person you have followed updates new items, the price of the item you have browsed is reduced, or the winners of a prize draw event you have participated in are announced. When a Trigger is triggered, the IFTTT system computes the user list based on the Trigger type and the configured relationship type, and calls the Action layer for processing.
  • Action: The Action layer processes the user list computed after a Trigger is triggered. You can send Push notifications, entitlements or other custom items to the users in the list. An Action itself is a standardized and pluggable component. In a service, you can use the Action component to perform an AB test on the user list to quickly experiment with different Action policies.

Quick Scenario Access

The quick scenario access module is one of the most important modules of the system. The purpose of designing such a module is make services on Xianyu work seamlessly so everything appears to work in relative real-time for app users. Because in the initial design, the scenario access is used to report the service data and scenarios by adding Aspect-Oriented Programming (AOP) in the service logic. However, this method doesn’t provide the best overall experience as it increases the response times of service operations and it work well for all scenarios.

Compute the User List Module

Next, there is the module for computing lists of users, which adopts the responsibility chain model, because in different Trigger scenarios, the computing and filtering logic of the service to the user list are different. With the responsibility chain model, then, the main process is decoupled from the service filtering logic, and various services are supported to flexibly customize the filtering logic without interfering with each other.

PushAction Module

Next, following this, the Action layer is the most important part of the IFTTT system implemented at Xianyu. It can reach the users directly. The Action logic can directly affect user activity and their overall feelings and experience about the app and ecosystem in general. The Push message is the most common logic in the Action layer, and it is necessary to prevent users from being harassed. The PushAction logic is as follows:

  • Filters sensitive people;
  • Checks the fatigue of the user;
  • Conducts AB tests on the senders;
  • Assembles messages;
  • Synchronizes logs of each Action node to SLS, for easy retrieval and troubleshooting;
  • Collects sending data and clicking data of messages to provide a basis for subsequent service decisions;


“Fatigue” for the IFTTT system at Xianyu is the key concept in preventing users from feeling they are being harassed by the system-or, to put it more bluntly, receiving too many message notifications from the app. At the Xianyu team, they designed fatigue into the three layers discussed above. The first layer is user-level fatigue, which controls the number of messages a user receives in a cycle. The second layer is the service dimension fatigue, which controls the number of messages that a user receives for a service in a cycle. The third layer is the target-level fatigue, which controls the number of messages that a user receives from the same sender in a cycle.

User Relationship Storage

User relationship data is one of the most important aspect of the IFTTT system implemented on Xianyu. It features a large storage capacity, being several terabytes in size. Next, it requires high performance for both storage and query operations, with transaction and queries per second values being well above 10,000 during peak hours for the app. After much research, the Xianyu team found that the Lindorm database developed within Alibaba Group could meet all of these requirements.

So What Are the Benefits of the IFTTT System

Since its launch, the IFTTT system for Xianyu has helped by providing additional support for multiple service scenarios. Moreover, it can help to provide near real- or real-time and bidirectional interactions and connections between buyers and sellers in the Xianyu platform. On average, it can process hundreds of millions pieces of relational data every day. The amount of processed Triggers can get up in the tens of millions, and the amount of processed Actions can get into the hundreds of millions. The Message CTR is more than doubled compared to that of offline Push.


  • SLS:
  • Diamond: a persistent configuration management middleware developed by Alibaba;
  • Blink:
  • MetaQ: a distributed, queue-based, and message-oriented middleware developed by Alibaba;
  • Lindorm: a new generation of distributed NoSQL database developed by Alibaba based on HBase. Similar Alibaba Cloud products: ;
  • Tair: a high-performance, distributed, scalable, and highly reliable Key-Value structured storage system developed by Alibaba

Original Source



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website: