Skip to content
_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN DE
Let's talk

A/B Testing Backend

11. 08. 2025 1 min read intermediate

Architecture Intermediate

A/B Testing Backend

A/B TestingExperimentsAnalytics 3 min read

Server-side A/B testing. Assignment, tracking, statistical significance.

Architecture

An A/B test = feature flag + tracking + analysis. The user is deterministically assigned to a variant.

function assignVariant(userId, experimentId) {
    const hash = murmurhash(\`\${experimentId}:\${userId}\`);
    const bucket = hash % 100;
    // 50/50 split
    return bucket < 50 ? 'control' : 'treatment';
}

app.get('/api/checkout', (req, res) => {
    const variant = assignVariant(req.userId, 'checkout-v2');
    trackExposure(req.userId, 'checkout-v2', variant);
    if (variant === 'treatment') return renderNewCheckout(req, res);
    return renderOldCheckout(req, res);
});

Tracking and Analysis

  • Track exposure (who saw the variant) and conversion (who converted)
  • Statistical significance — at least 2 weeks, thousands of users
  • Tools: GrowthBook, Optimizely, custom solutions

Summary

A/B testing requires statistical discipline. Deterministic assignment, proper tracking, and sufficient data for decision-making.

Need Help with Implementation?

Our team has experience designing and implementing modern architectures. We’re happy to help.

Free Consultation

Share:

CORE SYSTEMS team

We build core systems and AI agents that keep operations running. 15 years of experience with enterprise IT.