Fintech · AI · High Performance

Real-time Pricing & Promotion
Engine at 100K+ Transactions/Day

How we redesigned a sluggish, batch-oriented pricing system into a sub-50ms, AI-augmented event-driven engine - handling over 100,000 transactions daily with 99.9% uptime and AI-driven personalisation across every checkout.

ClientLarge-scale ordering & retail finance platform
IndustryRetail Finance · Ordering Systems
Core stackJava, Kafka, GridGain, AI/ML, Spring Boot
EngagementArchitecture redesign & performance engineering
The challenge

A large-scale ordering system needed a high-performance real-time pricing and promotion engine capable of processing 100K+ transactions daily. The existing architecture had been built for a much lower transaction volume and was showing multiple failure modes under current load.

⚠️ Pricing latency exceeding 50ms. The existing system was performing synchronous database lookups for every pricing rule evaluation - resulting in price and promotion calculation times consistently over 50ms. At 100K+ daily transactions during peak promotional periods, this latency directly impacted cart abandonment rates and checkout conversion.
⚠️ Inefficient cross-service communication. The pricing service was a synchronous dependency for the order service - every price check blocked an API thread. During high concurrency, the order service thread pool would back up waiting for pricing responses, causing cascading latency across unrelated order operations.
⚠️ No AI-driven pricing intelligence. The pricing engine was purely rule-based with no dynamic optimisation. Promotion personalisation, demand-responsive pricing, and customer-segment-specific offers required manual configuration changes - and the business team couldn't iterate fast enough to take advantage of real-time market signals.
⚠️ Limited scalability and reliability. The monolithic pricing service had a single point of failure. During high-traffic promotional events, pricing service degradation had caused order failures - a direct revenue impact. The architecture needed a fundamental redesign to handle 10× burst traffic during sales events.
Performance architecture
Redesigned Pricing Pipeline - After OKRUTI
<50ms
Average pricing latency
100K+
Transactions per day
99.9%
Uptime across peak load
Order Request Kafka Topic AI Pricing Engine GridGain Cache Lookup Promotion Validator Price Published (<50ms)
Latency improvement
Before - synchronous DB lookup per rule >50ms avg
After - GridGain in-memory + Kafka async pipeline <50ms achieved
Peak burst - promotional events (10× normal traffic) Maintained SLA
Our solution

OKRUTI redesigned the entire pricing pipeline from synchronous and database-dependent to event-driven and in-memory - with AI pricing intelligence layered on top. The new architecture is fundamentally different in its approach to data access: instead of reading pricing rules from a database on every request, rules live in GridGain's in-memory distributed grid and are evaluated in microseconds.

Apache Kafka Event-Driven Pipeline: Redesigned the pricing service as an event consumer. Order events are published to a Kafka topic; the pricing engine consumes them, evaluates rules, and publishes the priced order - decoupling the pricing calculation from the order service entirely. The order service no longer blocks on a pricing API call; it reacts to a pricing event.
GridGain In-Memory Computing: All active pricing rules, promotion definitions, customer segment mappings, and product pricing matrices are loaded into GridGain's distributed in-memory grid. Rule evaluation - which previously required database round trips - now runs against in-memory data structures with microsecond access latency, eliminating the core bottleneck.
AI Pricing Intelligence: Integrated ML models for dynamic price optimisation, customer-segment personalisation, and promotion relevance scoring. The AI layer evaluates each transaction's context - customer history, cart composition, real-time demand signals - and adjusts promotion presentation and pricing recommendations accordingly, without any rule configuration change required.
Microservices Decomposition: Split the monolithic pricing service into four independent services - Price Calculator, Promotion Engine, AI Recommendation Layer, and Price Publisher - each horizontally scalable. During promotional events, only the Promotion Engine and AI Recommendation Layer need additional instances; the Price Calculator scales independently.
Elimination of N+1 Query Patterns: Profiled all data access in the original pricing code and identified 12 distinct N+1 query patterns - loops that generated a database query for each iteration. Rewrote all of these using batch-fetch patterns with in-memory lookup tables, eliminating hundreds of unnecessary database round trips per pricing calculation.
Results achieved
<50ms
Average pricing latency - down from over 50ms to well below the real-time threshold
100K+
Daily transaction capacity - handles peak promotional events without performance degradation
99.9%
Platform uptime - sustained across high-traffic promotional events and seasonal peaks
AI
Dynamic personalisation - AI pricing intelligence live on every transaction, driving conversion lift

High-throughput pricing or promotion engine?

Whether you're rebuilding a legacy pricing system or engineering a new real-time engine from scratch, our performance engineering team can design the right architecture for your transaction volumes and latency targets.

Let's talk about your platform.

Whether it's a new Spring Boot build, a legacy modernisation, or something in between - tell us what you're working on and we'll respond within 24 hours.

✉️
📍
Location
Jaipur, India · Global delivery
We reply within 24 hours.
✓ Thanks - we've received your message and will be in touch shortly.