About Paypal

PayPal is one of the world’s leading digital payments platforms, operating in more than 200 countries and regions. The company supports hundreds of millions of active consumer and merchant accounts and processes hundreds of billions of dollars in annual payment volume. In 2017 alone, PayPal processed $451 billion in total payment volume. PayPal connects buyers and sellers globally across e-commerce, mobile, peer-to-peer, and marketplace transactions.

Challenge

Fraud prevention is foundational to PayPal’s business. Real-time decisions must be accurate, fast, and economically scalable across global payment volume. As transaction growth accelerated, the company needed a data platform that could sustain massive scale while maintaining predictable performance and cost control.

Real-time risk at global scale

Risk evaluation occurs at multiple checkpoints, including login, account updates, wallet changes, purchases, transfers, and withdrawals. Each interaction may trigger multiple machine learning models running in sequence or in parallel. Approximately 75% of these decision calls must complete in under 50 ms to protect user experience.

Volatile and adversarial fraud patterns

PayPal faces continuous fraud attempts, including account takeover, identity fraud, coordinated fraud rings, and high-velocity transaction chains. Models must evaluate historical behavior, sliding windows, decay variables, and entity linkages in real time. Workloads shift rapidly as attack strategies evolve.

Escalating infrastructure cost

PayPal’s previous in-memory database architecture created growing cost pressure as data volumes increased. Scaling purely in RAM was becoming economically inefficient. The company needed to leverage both memory and disk while guaranteeing consistent performance across 100+ petabytes of risk data.

Solution

PayPal built a homegrown, end-to-end risk and predictive AI platform integrating real-time decisioning, near-real-time event processing, and offline analytics. Aerospike serves as the operational data store powering real-time feature access and model execution at extreme scale.

Eight million executions per second

The platform enables more than eight million executions per second across database environments, including both RDBMS and NoSQL systems. It also supports approximately 60 billion queries per day and 25 billion computations per day across the risk infrastructure.

Millisecond feature retrieval

When a customer clicks “Pay,” the system retrieves historical risk features, incorporates near-real-time behavioral signals, evaluates counters and decay variables, executes multiple predictive AI models, and returns a decision within a tight latency window. Aerospike delivers low-latency primary-key access to support this workflow.

Hybrid memory for economic scale

By leveraging Aerospike’s hybrid memory architecture, PayPal utilizes both memory and SSD efficiently. This approach maintains consistent performance while significantly improving infrastructure economics compared to a purely in-memory design.

paypal-architecture
paypal-architecture

Results

PayPal reduced fraud losses to between 17 and 18 cents per $100 of transaction volume.

Massive real-time database scale

  • 8M+ database executions per second

  • ~60 billion queries per day

  • ~25 billion computations per day

  • 100+ petabytes of risk data

This scale supports real-time predictive AI inference across global payment systems.

Sub-50 ms performance consistency

Approximately 75% of real-time risk decisions complete in under 50 ms, enabling seamless customer experiences while running multiple machine learning models per interaction.

Latency remains stable under high-velocity and adversarial workloads.

Infrastructure efficiency at scale

By moving away from a purely in-memory approach and leveraging Aerospike’s hybrid memory architecture, PayPal:

  • Saved $9 million

  • Achieved 3x infrastructure efficiency

This allowed the company to scale predictive AI workloads economically while maintaining consistent performance.

Prior to Aerospike, we were using another in-memory database and running into challenges in terms of the cost of scaling. We needed to seamlessly leverage both the memory and disk in such a way that it can guarantee consistent performance. We moved to Aerospike for its hybrid memory architecture.

Sai Devabhaktuni

Senior Director of Engineering, PayPal