A/B testing in Elixir
Agenda
• What is A/B testing?
• What were the requirements?
• How did we solve it?
• What was the outcome?
WeTransfer - A/B testing
What is A/B testing?
What were the
requirements?
WeTransfer - A/B testing
Experiment with
Pricing block
• Copy
• Size
WeTransfer - A/B testing
Add social element
• Social proof
WeTransfer - A/B testing
Create awareness
• Tooltips while uploading
WeTransfer - A/B testing
Help page
• Copy
• CTA
How did we solve
it?
WeTransfer - A/B testing
Tools we used
• Elixir Phoenix
• React
WeTransfer - A/B testing
Structure
•CMS - manage experiments: CRUD, start/stop
operations.
• Assigner - sever which assigns clients to
experiments based on their segments.
CMS
✦ Phoenix API
✦ React app
Assigner
★ Phoenix API
★ Elixir GenServers
WeTransfer - A/B testing
CMS
• Phoenix application (version 1.3 rc2)
• React app (Webpack)
Application User
Experiment
Variants
Rules
Statistics
WeTransfer - A/B testing
Rules
• Parameter: any string, e.g. “language”, “region”
• Type: “string”, “boolean”, “number”, “regex”
• Operator: “==”, “!=”, “>”, “<”, “=>”, “<=”, “~=”
• Value: any string, e.g. “en”, “NL”, etc.
WeTransfer - A/B testing
Rules Example
WeTransfer - A/B testing
Variant
• Name
• Allocation
• Control group
• Description
• Payload
WeTransfer - A/B testing
Variant payload
WeTransfer - A/B testing
Payload example
WeTransfer - A/B testing
Supervision Tree
Structure Init Sup
Assigner
Experiment
Registry
Priority
Registry
EventSubscriber
Experiment
Supervisor
Experiment #1 Experiment #NExperiment #2
WeTransfer - A/B testing
Ready To Be Distributed
All messages to manipulate experiments going
through Phoenix Pub/Sub
WeTransfer - A/B testing
Protocol
• Client makes a call with user data
• Based on it, server looks for a matching
experiment
• Returns a variant to assign
• Client makes an impression call if the experiment
was shown to the user
WeTransfer - A/B testing
Client Request
WeTransfer - A/B testing
Response
What was the
outcome?
WeTransfer - A/B testing
Usage statistics
• In production from March 2017
• Peak load might be about 10.000/min (166/sec)
• Response from the application - maximum about 800 microseconds
• Response from a AWS ALB - maximum about 11 milliseconds
1
WeTransfer - A/B testing
Usage statistics
WeTransfer - A/B testing
Future plans
• Finish all important features
• Create documentation
• Split into two applications (Umbrella)
• Add deployment options (e.g. Docker)
• Open source it!
THANKS!
Dmitry / Manpreet

A/B testing platform on Elixir

  • 1.
  • 2.
    Agenda • What isA/B testing? • What were the requirements? • How did we solve it? • What was the outcome? WeTransfer - A/B testing
  • 3.
    What is A/Btesting?
  • 4.
  • 5.
    WeTransfer - A/Btesting Experiment with Pricing block • Copy • Size
  • 6.
    WeTransfer - A/Btesting Add social element • Social proof
  • 7.
    WeTransfer - A/Btesting Create awareness • Tooltips while uploading
  • 8.
    WeTransfer - A/Btesting Help page • Copy • CTA
  • 9.
    How did wesolve it?
  • 10.
    WeTransfer - A/Btesting Tools we used • Elixir Phoenix • React
  • 11.
    WeTransfer - A/Btesting Structure •CMS - manage experiments: CRUD, start/stop operations. • Assigner - sever which assigns clients to experiments based on their segments. CMS ✦ Phoenix API ✦ React app Assigner ★ Phoenix API ★ Elixir GenServers
  • 12.
    WeTransfer - A/Btesting CMS • Phoenix application (version 1.3 rc2) • React app (Webpack) Application User Experiment Variants Rules Statistics
  • 13.
    WeTransfer - A/Btesting Rules • Parameter: any string, e.g. “language”, “region” • Type: “string”, “boolean”, “number”, “regex” • Operator: “==”, “!=”, “>”, “<”, “=>”, “<=”, “~=” • Value: any string, e.g. “en”, “NL”, etc.
  • 14.
    WeTransfer - A/Btesting Rules Example
  • 15.
    WeTransfer - A/Btesting Variant • Name • Allocation • Control group • Description • Payload
  • 16.
    WeTransfer - A/Btesting Variant payload
  • 17.
    WeTransfer - A/Btesting Payload example
  • 18.
    WeTransfer - A/Btesting Supervision Tree Structure Init Sup Assigner Experiment Registry Priority Registry EventSubscriber Experiment Supervisor Experiment #1 Experiment #NExperiment #2
  • 19.
    WeTransfer - A/Btesting Ready To Be Distributed All messages to manipulate experiments going through Phoenix Pub/Sub
  • 20.
    WeTransfer - A/Btesting Protocol • Client makes a call with user data • Based on it, server looks for a matching experiment • Returns a variant to assign • Client makes an impression call if the experiment was shown to the user
  • 21.
    WeTransfer - A/Btesting Client Request
  • 22.
    WeTransfer - A/Btesting Response
  • 23.
  • 24.
    WeTransfer - A/Btesting Usage statistics • In production from March 2017 • Peak load might be about 10.000/min (166/sec) • Response from the application - maximum about 800 microseconds • Response from a AWS ALB - maximum about 11 milliseconds 1
  • 25.
    WeTransfer - A/Btesting Usage statistics
  • 26.
    WeTransfer - A/Btesting Future plans • Finish all important features • Create documentation • Split into two applications (Umbrella) • Add deployment options (e.g. Docker) • Open source it!
  • 27.