Interview

From APIs to Systems: What It Takes to Build Backends That Serve Millions in Real Time

Abhishek Krishnakumar Shukla on retries, idempotency and making AI agents safe to run against real systems

IndustryTrends

Abhishek Krishnakumar Shukla is a Senior Software Engineer at Yahoo. His career has focused on systems where errors have financial consequences, including core banking APIs at Oracle, distributed graph pipelines at TigerGraph, a backend built from scratch at FTNSS and subscription platforms at Yahoo. In this conversation, he explains what happens when software leaves the design review and meets real traffic, and why AI agents make old reliability problems show up faster.

You’ve moved from core banking to graph databases to subscription platforms. What connects those jobs?

One question, asked at different sizes: how do you move data and state through a system quickly, safely and in a way other teams can rely on?

I started with computer engineering at Dwarkadas J. Sanghvi College of Engineering and later did a master’s in computer science and engineering at Santa Clara University. Somewhere in that stretch, I became more interested in what sits behind an API once traffic grows and failure stops being rare.

At Oracle in India, I worked on core banking APIs. At TigerGraph I worked on distributed graph data. At FTNSS I built a backend from scratch. At Yahoo, I worked on subscription and entitlement systems. The technology changed each time, and so did the scale. The question stayed about the same.

What did core banking teach you about building systems that can’t afford to be wrong?

That a slow answer is a problem and a wrong answer is a much bigger one.

The core banking APIs I worked on at Oracle handled more than 500,000 transactions a day with response times under 50 milliseconds. We got there with Redis and Memcached caching, thread-pool tuning and a lot of work on query paths.

That job also taught me that a system has two paths, and both need design. The request path has to answer right now. The batch path, which for me meant Spark and Hadoop pipelines over high-volume transaction data, has to get everything right later.

The third lesson was about standards. I designed an API management framework for more than 100 REST APIs, and product teams adopted it as their standard. A good internal platform saves every team from solving the same problem a different way.

Graph data and a backend built from nothing are very different projects. What did each one add?

Graph data taught me to think about movement early. At TigerGraph, I built Spark and Hadoop pipelines that loaded large datasets from HDFS into a distributed graph database, and I delivered Spring Boot REST APIs for graph queries over a horizontally partitioned datastore. Graph data doesn’t sit neatly in one place, so partitioning and data movement have to be part of the design from day one.

At FTNSS, there was no existing system to improve. I built the backend from scratch in Java and Spring Boot. We load tested it at more than 10,000 bookings and check-ins a day, with 95th-percentile latency under 200 milliseconds, using Redis caching, request batching and index-aware schema design.

Building from nothing teaches you that early decisions turn into later constraints. Schema, authentication and deployment aren’t finishing touches. They are the system.

What changes when a system goes from a design review to a revenue-critical product?

The happy path stops being the interesting part.

In a design review, you mostly ask whether the flow works. In production, the list of questions gets longer. What happens when one service is slow? When a message is delivered twice? When half a batch fails? How do you roll a change back?

On subscription systems, those questions have a price. A trial start, a renewal and an entitlement change each touch money or access. So I design for at-least-once delivery with idempotent handling, bounded retries, clear reporting of partial failures, and dead-letter queues for messages that can’t be processed. I also like to put risky changes behind feature flags, so a bad one can be switched off in seconds.

A system is defined by how it behaves when things go wrong. Almost anyone can make the happy path work.

Where do the real bottlenecks tend to hide?

Rarely where you first look.

Sometimes it’s the request path. At FTNSS, caching and batching mattered as much as the service code. Sometimes it’s the delivery pipeline. At TigerGraph, re-engineering the Maven CI/CD setup cut deployment time by 40 percent. At FTNSS, automating infrastructure and CI/CD with Docker, Kubernetes, ArgoCD and GitHub Actions cut it by 50 percent and let us release several times a week.

And sometimes the bottleneck is trust between services: a certificate, an authentication flow, a retry policy nobody has looked at in years. Those are easy to ignore because they work right up until the day they don’t.

So I try not to assume the database is the culprit. Performance and reliability problems can sit at almost any layer.

You recently published a simulation of AI agents retrying payments. What did you set up, and what happened?

I wanted to test one uncomfortable case. An AI agent calls a payment API. The API is healthy, with a median latency of 350 milliseconds and a 99th percentile around 2.3 seconds. The agent’s tool call times out, so the agent does what agents do and tries again.

A timeout doesn’t mean the charge failed. It means you stopped waiting.

The first charge can still commit on the server, and then the retry creates a second one. I simulated 200,000 payment intents with up to two retries and no idempotency key. With a one-second timeout, 9.5 percent of intents were charged at least twice. At two seconds, it was 1.4 percent, and at five seconds, 0.05 percent.

Then I slowed the API down three times, the way a failover or a slow disk would. At a two-second timeout, 21 percent of intents were charged twice. At one second, more than half were.

Intents charged at least twice, by timeout

TimeoutNormal API (median 350 ms, p99 ≈ 2.3 s)API slowed 3×
1 second9.50%More than half
2 seconds1.40%21%
5 seconds0.05%—

200,000 simulated payment intents, up to two retries, no idempotency key. A dash means that scenario was not reported.

So raising the timeout just moves the cliff. The fix is old and boring: generate one idempotency key per intent, send it on every retry, and let the server return the first result instead of creating a second charge. In the simulation, duplicates dropped to zero.

Where does idempotency make the biggest difference?

Anywhere a repeated attempt can change money or access.

Subscriptions are a good example. If a free trial starts twice, or an entitlement event is applied twice, the user and the business end up with different versions of the truth. That’s why I treat idempotent delivery as a design requirement, not a cleanup task.

Entitlements are the other one. Access decisions have to be exact every time, even when a call is repeated or a cache is stale. A user who paid should get in, and a user who didn’t shouldn’t.

Payments are the clearest case. A duplicate API call can be harmless. A duplicate charge is not. Idempotency is what separates a safe retry from a second transaction.

Why do old production lessons matter more now that AI agents are calling APIs?

Because agents don’t remove the old problems. They trigger them more often, and with more patience.

An agent is a client that retries eagerly, at volume, without hesitation. If the systems it calls have weak authentication, unclear timeout behavior or unsafe retries, the agent will find those edges in normal operation. It isn’t being malicious. It just keeps going.

That’s why the unglamorous disciplines still matter. Feature flags and dark launches let you try a new path without betting the whole service on it. Dead-letter queues isolate a poison message so one bad event doesn’t block the rest. Good telemetry tells you something is failing while it’s still small.

I use AI coding assistants every day for implementation, tests and debugging. They make me faster. They don’t replace tests, review or a safe way back.

Is the line between backend engineering and AI engineering disappearing?

I think it’s blurring, yes.

AI used to be discussed mostly in terms of models. Now an agent is usually one component in a much larger software system, surrounded by tools, APIs, databases, queues, permissions, monitoring and interfaces.

My payment simulation is really about that boundary. The agent behaved reasonably. The API behaved reasonably. The failure appeared in the contract between them.

As agents move deeper into products, engineers need to understand both sides of that contract: what an agent will do when a result is ambiguous, and how to design the systems it calls so that ambiguity doesn’t turn into damage.

I see the same pattern in open source. I’ve had two fixes merged into Netty, the network framework underneath many JVM services. One makes its HTTP/2 implementation reject frames larger than the maximum frame size the connection allows (Netty PR #17779). The other closes channels that are still registered when an event loop shuts down (Netty PR #18035). Both are about the edges: bad input and shutdown, and that’s where systems tend to fail.

What’s the biggest challenge for distributed systems as agents scale?

Getting from capable agents to dependable systems.

As agents get more powerful, the infrastructure around them has to keep up. Data has to move quickly. Tool calls have to meet latency targets. Applications have to stay reliable when a call is slow, repeated or only partly successful.

The question I ask hasn’t changed much over my career. Only the scale has:

What is preventing this system from delivering its intended value, and how do we make its failure modes safe?

Sometimes the answer is slow data. Sometimes it’s a retry without an idempotency key. Sometimes it’s a security migration nobody wants to touch, or telemetry that hides an error for too long. At scale, you often have all of them at once, and that’s where distributed systems engineering stops being about writing services and becomes the work of making the whole system trustworthy.

Robinhood Launches First Actively Managed ETF Stock Token Linked to T. Rowe Price Technology Fund

Binance Taps Mandiant, SlowMist and Verichains for Security Reviews

Eric Trump-Backed American Bitcoin Secures FalconX Loan to Expand Mining Operations

Kalshi to Continue Operations as Prediction Market Legal Battle Intensifies

US Moves to Recover USD 1.1 Billion in Crypto from Binance Hack