Design a framework for collecting event counts in A/B testing.

We are running about experiments for A/B testing. Each user is assigned to one of the experiments or is in the control group. The control group is much larger than any experiment group. The mapping from user id to experiment no. is stored in a database, is fixed, and already exists.

Each request which our system receives has:

  • user id
  • event type
  • event meta data, including country

Following quantities were given:

  • Total active users = 100 million
  • There are 100 distinct event types
  • Each user can produce atmost 1 event per second
  • Number of experiments = 100
  • Each user engages with the platform for 2 hours on average
  • Assume a uniform distribution of user

APIs

getRatio(day, event_type, experiment_no, country)
Returns the ratio of count of events for given day, event_type, experiment_no and country to count of events for same day, same event type and country in the control group.

The interviewer wanted to me estimate the number of servers needed for this system as well.

Comments (0)