← Visa Interview Insights

Visa·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
May 2026

Summary

System design round at Visa for a software engineer role, focused entirely on building an A/B testing assignment service from scratch. The question was broad enough to fill two hours and I don't think I got close to covering everything they wanted.

Questions Asked (9)

Q1

Design an online A/B testing assignment service where the API takes a user ID and feature name and returns which variant the user is assigned to.

System DesignA/B Testing & ExperimentationTechnical Trade-offs
Author's notes

This is one of those questions that looks like a single system but is actually like eight systems duct-taped together.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (scale, latency, consistency, experiment lifecycle) and then design a deterministic hashing-based assignment service with a fast lookup layer. Discuss trade-offs between consistency, performance, and flexibility, and how to handle experiment changes and user stickiness.

Pro tip: Emphasize deterministic hashing with a salt per experiment to avoid correlation between experiments, and mention that assignment should be idempotent and stable for the user throughout the experiment.

1. Clarify Requirements

Ask about scale (QPS, number of users, experiments), latency SLA, consistency needs (e.g., same user always gets same variant), and how experiments are configured and updated.

2. High-Level Design

Outline components: API service, experiment configuration store, assignment logic (hashing), and optional caching layer. Explain the request flow from user ID and feature name to variant.

3. Assignment Algorithm

Detail deterministic hashing: combine user ID and experiment salt, hash to a number, map to variant based on traffic allocation. Discuss handling of experiment changes (e.g., new variants) and ensuring stickiness.

4. Data Storage & Consistency

Describe how experiment configs are stored (e.g., database, config service) and cached. Discuss consistency models (eventual vs strong) and how to handle updates without disrupting ongoing assignments.

5. Scalability & Trade-offs

Address scaling (horizontal scaling, caching, sharding), latency optimization, and trade-offs between simplicity, flexibility, and performance. Mention monitoring and logging for debugging.

Key Points to Mention

  • Deterministic hashing (e.g., MurmurHash) with a per-experiment salt to ensure uniform distribution and independence across experiments.
  • Caching experiment configurations and assignment results to reduce latency and load on backend stores.
  • Handling experiment lifecycle: adding/removing variants, ramping up traffic, and ensuring users remain in the same variant once assigned.
  • Consistency guarantees: ensuring the same user gets the same variant for the duration of the experiment, even if the service is distributed.
  • Scalability considerations: horizontal scaling, sharding by user ID or feature, and using a fast in-memory store like Redis for configs.
  • Trade-offs: simplicity vs flexibility (e.g., precomputed assignments vs on-the-fly hashing), and latency vs consistency.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

How would you handle sticky and deterministic assignment so the same user always gets the same variant across sessions?

A/B Testing & ExperimentationSystem Design
Author's notes

Talked about hashing the composite key and using modulo bucketing against a fixed range.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Explain that you would use a deterministic hashing function on a stable user identifier (like user ID) combined with the experiment key to produce a consistent bucket assignment. Emphasize that this ensures the same user always gets the same variant across sessions without needing to store assignments, and discuss how to handle edge cases like new users or changing identifiers.

Pro tip: Mention that you would include a salt or experiment-specific seed to avoid correlation between experiments, and that you would validate the distribution with a chi-squared test to ensure uniformity. Also, consider using a consistent hashing ring to minimize reassignments when the number of variants changes.

1. Identify a stable user identifier

Choose a unique and persistent identifier such as user ID, account number, or a device ID that remains consistent across sessions. Avoid volatile identifiers like session IDs or IP addresses.

2. Define a deterministic hashing function

Use a hash function (e.g., MurmurHash, SHA-256) to map the combination of user ID and experiment key to a numeric value. This ensures the same input always yields the same output.

3. Map hash to variant buckets

Convert the hash value into a bucket (e.g., 0-99) using modulo or range partitioning, then assign variants based on predefined percentages. Ensure the mapping is consistent and reproducible.

4. Handle edge cases and scalability

Address scenarios like new users, identifier changes, or experiment modifications. Consider using consistent hashing to minimize reassignments when variant counts change, and ensure the system scales with user base.

5. Validate and monitor

Run statistical tests (e.g., chi-squared) to verify uniform distribution and monitor for anomalies. Log assignments for debugging and ensure the hashing remains deterministic across service instances.

Key Points to Mention

  • Deterministic hashing (e.g., MurmurHash) with user ID and experiment key
  • Stable user identifier (user ID, not session ID)
  • Salting or seeding per experiment to avoid correlation
  • Consistent hashing to handle variant changes
  • Statistical validation of uniform distribution
  • No need for persistent storage of assignments

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

How would you store experiment configuration, and how does the service know which experiments are active and what their traffic allocations are?

System DesignA/B Testing & ExperimentationTechnical Trade-offs
Author's notes

Went with a config service backed by a key-value store, with local caching in the assignment service to keep latency low.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by describing a centralized configuration store (e.g., a database or config service) that holds experiment definitions, including status, traffic allocation, and targeting rules. Then explain how the service fetches and caches this configuration, and how it evaluates active experiments and assigns users to variants based on allocation. Emphasize the need for consistency, low latency, and dynamic updates.

Pro tip: Highlight the importance of a versioned configuration with audit trails and a rollout mechanism to avoid breaking changes, and mention how you'd handle cache invalidation and consistency across distributed services.

1. Configuration Storage

Store experiment configs in a centralized, versioned store (e.g., SQL/NoSQL DB, config service like etcd/Consul, or feature flag service). Include fields like experiment ID, status, traffic allocation, targeting rules, and variant definitions.

2. Service Integration

The service loads config at startup and periodically refreshes or subscribes to changes. Use a client library or SDK to abstract fetching and caching, ensuring low latency and resilience.

3. Determining Active Experiments

Filter experiments by status (e.g., running, paused) and evaluate targeting rules against user attributes. Only active experiments that match the user are considered.

4. Traffic Allocation & Assignment

For each active experiment, compute a deterministic hash of user ID (and experiment ID) to assign a bucket. Map the bucket to a variant based on traffic allocation percentages, ensuring consistent assignment.

5. Consistency & Updates

Ensure assignment consistency across sessions and services via deterministic hashing. Handle config updates gracefully, possibly with versioning and gradual rollouts to avoid abrupt changes.

Key Points to Mention

  • Centralized configuration store with versioning and audit logs
  • Caching and refresh mechanisms for low latency and high availability
  • Deterministic hashing for consistent user assignment
  • Targeting rules and experiment status filtering
  • Traffic allocation representation (e.g., percentages, weights)
  • Handling config updates and cache invalidation across distributed services

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

How would you implement eligibility targeting so only certain users qualify for a given experiment?

A/B Testing & ExperimentationSystem Design
Author's notes

Described a rule engine that evaluates user attributes against experiment filters before bucketing.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: what defines eligibility, how many users, and what data is available. Then propose a system that evaluates eligibility rules at assignment time, using a deterministic hashing approach to ensure consistent bucketing. Finally, discuss how to handle rule updates, monitoring, and edge cases like user attribute changes.

Pro tip: Emphasize idempotency and consistency: the same user should always get the same variant as long as they remain eligible, even if eligibility rules change. Use a stable identifier and a versioned ruleset to avoid flapping.

1. Clarify Requirements

Ask about the scale (number of users, experiments), the source of user attributes (e.g., database, real-time), and how often eligibility rules change. This ensures you design a solution that fits the context.

2. Design Eligibility Rules

Define rules as a set of conditions on user attributes (e.g., country, account type, transaction history). Represent them in a flexible, declarative format (e.g., JSON or DSL) that can be updated without code changes.

3. Implement Evaluation and Assignment

At experiment assignment time, fetch user attributes, evaluate rules, and if eligible, assign a variant using deterministic hashing (e.g., hash(user_id + experiment_id) % 100). Ensure the process is idempotent and fast.

4. Handle Rule Updates and Consistency

Version the ruleset and store the version used for each assignment. If rules change, decide whether to re-evaluate existing users (which may cause flapping) or keep them in their original variant. Use a consistent hashing strategy to minimize disruption.

5. Monitor and Validate

Log eligibility decisions and assignments for debugging. Monitor metrics like eligibility rate, assignment distribution, and rule evaluation latency. Set up alerts for anomalies.

Key Points to Mention

  • Deterministic hashing for consistent bucketing (e.g., using user ID and experiment ID)
  • Declarative rule engine to allow non-engineers to update eligibility criteria
  • Caching user attributes and rule evaluations to reduce latency
  • Versioning of eligibility rules to handle changes without breaking existing assignments
  • Idempotency: same user gets same variant if still eligible
  • Monitoring and logging for debugging and ensuring experiment integrity

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

Walk me through how you'd handle experiment overrides, things like QA accounts always seeing a specific variant, or a killswitch to disable a feature entirely.

A/B Testing & ExperimentationSystem Design
Author's notes

Override lookup before bucketing, ordered by priority: killswitch first, then explicit user overrides, then normal assignment.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing overrides as a layered configuration system where experiment assignments are computed first, then overrides are applied in priority order. Walk through the override types (QA, killswitch, user whitelists) and explain how each is implemented, stored, and evaluated at runtime. Emphasize the need for auditability, safety, and minimal latency impact.

Pro tip: Mention that killswitches should be evaluated before any experiment logic to ensure immediate global disablement, and that overrides should be cached with short TTLs to avoid performance hits while still allowing rapid changes.

1. Define override types and priority

Identify the different override scenarios (QA accounts, killswitch, user whitelists, etc.) and establish a clear priority order for evaluation, typically killswitch > user-specific > QA > experiment assignment.

2. Design storage and configuration

Choose a storage mechanism (e.g., feature flag service, database, config files) that supports dynamic updates without redeployment, and define the schema for overrides including scope, target, and expiration.

3. Implement evaluation logic

Build a deterministic evaluation pipeline that checks overrides in priority order before falling back to the experiment assignment, ensuring consistency and low latency.

4. Ensure auditability and safety

Add logging, monitoring, and access controls for override changes, and include safeguards like killswitch propagation checks and rollback capabilities.

5. Test and iterate

Write unit and integration tests for override scenarios, simulate edge cases (e.g., conflicting overrides), and plan for gradual rollout and monitoring in production.

Key Points to Mention

  • Priority order of overrides (killswitch first, then user-specific, then QA)
  • Dynamic configuration without code deployment (e.g., using a feature flag service)
  • Caching strategies to minimize latency while allowing quick updates
  • Audit trails and access control for override changes
  • Handling conflicts and ensuring deterministic behavior
  • Monitoring and alerting for override usage and killswitch activation

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q6

How would you design the exposure logging system, and how do you ensure idempotency so the same exposure isn't counted multiple times?

A/B Testing & ExperimentationProduct Analytics & MetricsSystem Design
Author's notes

Suggested writing to an event stream on every assignment call, then deduplicating downstream in the data pipeline using a composite key of userId, experimentId, and date window.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then propose a high-level architecture for exposure logging that captures events reliably and processes them for deduplication. Emphasize idempotency through unique event IDs, deterministic deduplication keys, and exactly-once processing semantics. Conclude with trade-offs and monitoring.

Pro tip: Mention that idempotency should be enforced at multiple layers (client, ingestion, and processing) to handle retries and failures gracefully, and highlight the importance of a unique exposure ID generated at the source.

1. Clarify Requirements

Ask about scale (events per second), latency requirements, data retention, and downstream consumers (e.g., analytics, A/B testing platform).

2. High-Level Architecture

Propose a pipeline: client SDKs generate exposure events with unique IDs, send to a highly available ingestion service (e.g., Kafka), which writes to a durable store (e.g., data lake) and a real-time processing system (e.g., Flink) for deduplication and aggregation.

3. Idempotency Design

Ensure each exposure event has a globally unique ID (e.g., UUID) and a deterministic deduplication key (e.g., user_id + experiment_id + variant + timestamp bucket). Use idempotent writes (e.g., upserts with unique constraints) and exactly-once processing (e.g., Flink with checkpointing) to avoid double counting.

4. Handling Failures and Retries

Implement retries with exponential backoff and dead-letter queues. Use idempotent consumers that check for existing records before processing. Consider at-least-once delivery with deduplication at the processing layer.

5. Monitoring and Validation

Track metrics like duplicate rate, processing latency, and data completeness. Set up alerts for anomalies and regularly audit for idempotency violations.

Key Points to Mention

  • Unique exposure ID generated at the source (client or server) to identify each event.
  • Deterministic deduplication key based on user, experiment, variant, and time window.
  • Idempotent writes using upserts or unique constraints in the data store.
  • Exactly-once processing semantics with stream processing frameworks (e.g., Flink, Kafka Streams).
  • Handling retries and failures with idempotent consumers and dead-letter queues.
  • Monitoring duplicate rates and data quality to ensure system reliability.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q7

What are the latency and availability requirements for this service, and how would you design fallbacks if the service is degraded?

System DesignTechnical Trade-offs
Author's notes

Said p99 under 10ms for the assignment call, with a fallback to always returning control if the service is unavailable.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the service's business context and expected traffic patterns, then propose specific latency and availability targets (e.g., p99 latency < 100ms, 99.99% uptime) justified by user impact and SLAs. Finally, outline a layered fallback strategy that degrades gracefully while maintaining core functionality and data consistency.

Pro tip: Anchor your answer in Visa's domain: emphasize that payment authorization requires extreme availability (99.999%) and low latency (<100ms) because downtime directly blocks revenue and erodes trust. Mention that fallbacks must never compromise transaction integrity—e.g., queue writes for later reconciliation rather than dropping them.

1. Clarify requirements and context

Ask about the service's role (e.g., payment authorization, fraud detection), expected QPS, and business impact of downtime. This shows you tailor designs to real constraints.

2. Define latency and availability targets

Propose concrete SLOs (e.g., p99 < 100ms, 99.99% availability) and justify them with user expectations, SLAs, and cost trade-offs. Mention that different endpoints may have different targets.

3. Design for high availability

Describe architectural patterns: multi-AZ deployment, active-active replication, load balancing, and automated failover. Emphasize redundancy and eliminating single points of failure.

4. Implement graceful degradation and fallbacks

Outline fallback strategies: circuit breakers, caching, queueing writes, serving stale data, and feature toggles. Prioritize core functionality and data integrity over non-essential features.

5. Monitor, test, and iterate

Explain how you'd monitor latency/availability (e.g., Prometheus, distributed tracing), set alerts, and conduct chaos engineering to validate fallbacks. Mention post-incident reviews to refine SLOs.

Key Points to Mention

  • Service Level Objectives (SLOs) and Service Level Indicators (SLIs) for latency and availability
  • Multi-region active-active deployment with automatic failover
  • Circuit breaker pattern to prevent cascading failures
  • Caching strategies (e.g., read-through cache) to reduce dependency on degraded services
  • Asynchronous queueing for non-critical writes to preserve data and retry later
  • Graceful degradation: disable non-essential features (e.g., recommendations) to keep core payment flow operational

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q8

How would you handle privacy and compliance requirements like GDPR or CCPA in the context of this experimentation system?

A/B Testing & ExperimentationTechnical Trade-offs
Author's notes

Honestly the part I was least prepared for.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging that privacy and compliance are critical in experimentation, especially in fintech. Then, outline a structured approach that covers data minimization, consent management, anonymization, and governance, while balancing experimentation velocity with regulatory requirements.

Pro tip: Emphasize that privacy should be built into the experimentation platform from the start, not bolted on later. Mention that you would collaborate with legal and privacy teams early to define requirements and automate compliance checks.

1. Understand Regulatory Requirements

Identify which regulations apply (GDPR, CCPA, etc.) and their specific requirements for data collection, processing, and user rights. Work with legal to map these to the experimentation system.

2. Design for Data Minimization and Anonymization

Collect only the data necessary for the experiment and anonymize or pseudonymize user data as early as possible. Use techniques like hashing, tokenization, or differential privacy.

3. Implement Consent and User Rights Management

Ensure the system respects user consent preferences and can handle data subject requests (e.g., access, deletion). Integrate with consent management platforms and automate compliance workflows.

4. Enforce Access Controls and Audit Logging

Restrict access to sensitive data based on roles and log all access for auditing. Use encryption at rest and in transit, and regularly review permissions.

5. Monitor and Iterate

Continuously monitor for compliance issues, conduct regular audits, and update processes as regulations evolve. Build automated checks into the CI/CD pipeline for experimentation code.

Key Points to Mention

  • Data minimization: only collect what's needed for the experiment.
  • Anonymization/pseudonymization techniques to protect user identities.
  • Consent management integration and honoring user opt-outs.
  • Data subject rights (access, deletion) and how to automate them.
  • Role-based access control and audit trails for sensitive data.
  • Collaboration with legal/privacy teams and building compliance into the platform.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q9

Describe the full lifecycle of an experiment from creation through analysis, including how you'd support pausing or stopping mid-flight.

A/B Testing & ExperimentationProduct Analytics & Metrics
Author's notes

Went through state transitions: draft, scheduled, running, paused, stopped, analyzed.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Walk through the experiment lifecycle in clear phases—design, setup, execution, analysis—and weave in how pausing/stopping is handled at each stage. Emphasize the engineering controls (feature flags, kill switches, monitoring) that enable safe mid-flight interventions, and tie decisions to statistical and business criteria.

Pro tip: Frame pausing and stopping as two distinct operations: pausing is a temporary, reversible halt (e.g., due to a bug or operational issue) while stopping is a permanent decision based on results or guardrail breaches. Show you understand the difference and the engineering safeguards for each.

1. Experiment Design & Setup

Define hypothesis, success metrics, guardrail metrics, sample size, and randomization unit. Set up feature flags and experiment configuration with clear ownership and versioning.

2. Launch & Execution

Deploy the experiment with gradual rollout if possible, ensuring proper logging and real-time monitoring of key metrics and system health.

3. Mid-Flight Controls: Pausing & Stopping

Implement mechanisms to pause (temporary halt) or stop (permanent termination) the experiment. Define triggers (e.g., guardrail breaches, bugs, external events) and automate alerts.

4. Analysis & Decision

After the experiment concludes (or is stopped), analyze results using appropriate statistical methods, check for novelty effects, and decide whether to ship, iterate, or abandon.

5. Post-Experiment Cleanup & Learning

Clean up flags, document findings, and share learnings. Ensure that pausing/stopping events are logged and reviewed to improve future experiments.

Key Points to Mention

  • Feature flags and kill switches for safe, real-time control
  • Guardrail metrics and automated alerting to trigger pauses/stops
  • Statistical considerations: sequential testing, peeking, and early stopping rules
  • Distinction between pausing (temporary, reversible) and stopping (permanent, decision-based)
  • Logging and audit trails for all mid-flight interventions
  • Cross-functional coordination (product, data science, engineering) for stop decisions

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.