Retail — online marketplace

From 20,000 Updates a Day to 4 Million an Hour

Inventory availability was replicating from order management to the storefront through a synchronous, circuit-breakered service that managed roughly 20,000 updates in 24 hours. We re-implemented it as a fully event-driven pipeline with Kafka at the core, reaching 4 million syncs in an hour and near real-time propagation.

Client
Top-3 Indian fashion & lifestyle marketplace
Role
Enterprise architect — order management, integration and event-driven re-architecture
Period
2016-10 – 2019-10

The challenge

Available-to-sell inventory is the number a marketplace cannot get wrong: too high and it accepts orders it cannot fulfil, too low and sellable stock is invisible. The existing design pushed availability from order management into commerce through a synchronous service wrapped in a circuit breaker. It worked, but its ceiling was roughly 20,000 updates in 24 hours — orders of magnitude below what the catalogue and seller base had grown into. Retries and circuit-breaking masked the backlog rather than clearing it, so the storefront could be hours behind reality without any component reporting a failure.

Approach

  • Reframed the problem as architectural rather than tuning: a synchronous call between two systems that must scale independently has a ceiling no amount of tuning removes.
  • Made the event stream the system of record for change, so the storefront consumes availability rather than being pushed it.
  • Decoupled producer from consumer so each could scale, fail and be released on its own schedule.
  • Reproduced behaviour under real cluster concurrency before committing to the design — the failure modes only appear with multiple consumers.
  • Validated against production-scale data volumes rather than a representative sample.

Innovation

  • Treated event-driven design as a decoupling decision first and a performance decision second — the throughput gain followed from removing the coupling, not from optimising the call.
  • Made backlog observable. The previous design's worst property was that it degraded silently; the replacement surfaces lag as a first-class signal.
  • Kept the existing commerce platform in place — the re-architecture sat around it rather than requiring its replacement.

Outcome

  • Throughput moved from roughly 20,000 availability updates in 24 hours to around 4 million in an hour.
  • Propagation became near real-time, so the storefront reflects availability rather than trailing it.
  • Order management and commerce decoupled — each can now be scaled and released independently.
  • Backlog made observable, so degradation is detected rather than inferred from symptoms.

Recommendations

  • A circuit breaker in front of a saturated integration is a symptom, not a solution. If it is tripping routinely, the design has reached its ceiling.
  • Silent degradation is worse than failure. If a backlog cannot be seen, it will be discovered by the business, not by engineering.
  • Decouple first, optimise second. Most of the throughput gain here came from removing a synchronous dependency, not from making calls faster.
  • You rarely need to replace the commerce platform. Re-architecting the integration around it is cheaper, faster and far less risky.

In their words

Wish I could have you for all my projects — we can turn global escalations into reference global customers.

Global executive, platform vendor · 2016-09

Technology

  • SAP Commerce (hybris)
  • SAP Commerce OMS
  • Apache Kafka
  • Spring Boot
  • Hystrix (replaced)
  • Clustered application tier

Want the working artefacts?

The account above is the whole story. If you want the material behind it — data models and partitioning, sizing inputs, load-test design, the decision frameworks as something you can actually apply — we will send the appendix for From 20,000 Updates a Day to 4 Million an Hour to a work address. Client identities stay masked either way.

Facing something similar?

If any of this maps onto a problem you are carrying, we are happy to talk it through — no obligation, and you will get a straight answer about whether it is worth doing.

Start a conversation