Flag Targeting Using Stratification #1459
kentakozuka
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Objective
We aim to create a flag targeting feature that supports accurate and reliable A/B testing by utilizing stratification to group users into homogeneous segments. This feature leverages the following two types of data for flag assignment and evaluation:
User Flag Assignment Information (Evaluation Events)
Data recorded during flag evaluation:
Information on when, for which user, which flag was assigned, and in what variation.
To track flag assignment status and enable analysis based on accurate data.
User Activity (Goal Events)
Data recorded when users perform specific actions:
Information on when, which user performed which activity (e.g., purchases, clicks, page views).
To measure key metrics (e.g., conversions) for A/B testing goals and assess flag effectiveness.
Below is an example of the proposed targeting interface.
![Screenshot 2025-01-17 at 14 59 45](https://private-user-images.githubusercontent.com/16733673/404163827-4c51e47a-4633-46ee-a176-1c737de2013f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NjQxNjAsIm5iZiI6MTczOTY2Mzg2MCwicGF0aCI6Ii8xNjczMzY3My80MDQxNjM4MjctNGM1MWU0N2EtNDYzMy00NmVlLWExNzYtMWM3MzdkZTIwMTNmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDIzNTc0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM3MmNhMWExNzQyYjViZjZjN2JhZmQ4ODM4ZDU3MTkzYmZjZmJjZWQ4MDhkMzgyYTY0MTRmMDJhZjlkNTY3MjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.71-x8cuUvEjY1nN3X4NM1rlG5axK2lt5hxj8BQleYLM)
To implement this system, it is essential to efficiently integrate evaluation data (Evaluation Events) and activity data (Goal Events) while performing stratified flag evaluations. Two approaches are under consideration:
Comparison of Approaches
Approach 1: Server-Side Evaluation
A method where flag evaluations are centrally managed on the server.
Mechanism
Advantages
Enables centralized management of large-scale data (e.g., activity data for 100 million users).
Centralized evaluation logic ensures consistent results.
Allows for flexible evaluation by integrating real-time attributes and activity data.
Handles high traffic with distributed architecture and caching.
Disadvantages
Evaluation speed may be affected by network latency.
Operating and scaling server infrastructure increases costs.
Data transmitted from the client may pose security risks.
Approach 2: Client-Side Evaluation
A method where flag evaluations are conducted using a client SDK.
Mechanism
Advantages
Immediate evaluation without network communication.
Enables flag evaluation even without network connectivity.
Offloads processing from the server.
Disadvantages
Storing large-scale data (e.g., 1.6GB of user information) on the client is impractical.
Keeping activity data and flag definitions up-to-date is difficult.
Data stored on the client is prone to tampering and leaks.
Comparison Table
Current Challenges
Data Volume Constraints
For client-side evaluation SDKs, implementing stratification requires storing massive amounts of user ID and segment data in memory. For example:
User Activity Data Constraints
Activity data, often aggregated via daily batch processing or on the server, cannot be easily provided to clients in real-time.
Current SDK Design
Server-side and client-side evaluation SDKs have distinct roles. For example:
Implementations in Other Products
Beta Was this translation helpful? Give feedback.
All reactions