AI accelerated releases. Now the system must withstand failures

AI agents accelerated releases and failures increased. Prepare for outages with timeouts, circuit breakers, idempotency and model fallback.

  • More changes, more incidents
  • Where systems with embedded AI break
  • What Newman recommends doing before an incident
  • How we build resilience into AI integrations

Trigger

Sam Newman, author of Building Microservices, published Building Resilient Distributed Systems and discussed it with Gergely Orosz on the podcast The Pragmatic Engineer. The conversation’s main topic: AI agents write more code and teams release changes more often; the speakers observe more production incidents. My view is that a business benefits from faster AI development only when its systems are designed to withstand failures.

Otherwise, the company loses the development hours it saved to downtime.

More changes, more incidents

Every deployment carries risk

Imagine a team that released five changes a week and reviewed each one. With an agent, it produces dozens daily but has the same number of reviewers.

Reviewers approve code faster than they can understand it. The data reflects this.

Google’s DORA team found in the Accelerate State of DevOps 2024 report that a 25% increase in AI adoption was associated with a 7.2% reduction in delivery stability and a 1.5% reduction in throughput.

DORA’s stability dimension combines the share of changes causing a failure and recovery time. Developers report greater personal productivity while their teams’ production metrics deteriorate.

For an executive, the conclusion is straightforward: AI-assisted development increases the operational workload.

If nobody planned for that workload, customers pay for it when they encounter an error on the site.

Where systems with embedded AI break

Embedding AI adds three failure points that were absent or less significant before. The model provider. OpenAI, Anthropic, GigaChat and YandexGPT experience outages, rate limits and latency spikes: a response taking two seconds normally may take forty at peak demand. A system waiting synchronously can remain blocked for all forty seconds. Integrations. An AI agent checking stock in 1C or enriching a product card in Akeneo depends on those systems.

At month-end close, 1C responds slowly and the agent passes that delay down the chain. New code. A model writes for the happy path unless the task describes failures. Timeouts, partial responses and redelivered messages often go unhandled in such code.

What Newman recommends doing before an incident

  1. The techniques in the book have been known for years. AI turns them from good practice into a basic requirement. ###

  2. Timeouts and retries Every external call needs an explicit waiting limit.

  3. Retry requests with exponential backoff and jitter, so a thousand clients do not hit the service simultaneously as it recovers. ###

  4. Circuit breakers and bulkheads A circuit breaker works like the breaker in an electrical panel.

  5. After repeated errors, it stops sending requests to the failing service and returns a fallback response. A bulkhead gives each dependency its own resource pool: slow catalogue search consumes only its own threads, leaving checkout threads unaffected. ### Idempotency

  6. An operation is idempotent when repeating it does not change the result.

  7. A payment message with a unique key can be delivered twice, but the charge is made only once.

  8. Without idempotency, every retried request can create a duplicate order.

Assess where AI can deliver impact in your process

How we build resilience into AI integrations

  1. In KT.Team projects, we build these safeguards into the architecture from the first sprint.

  2. Adding them to an operating system after the first incident takes longer and costs more.

  3. Model calls go through LLM & Security Gateway.

  4. The gateway enforces timeouts and limits, counts tokens and switches to a backup model. If Claude does not respond in time, it routes the request to Qwen or GigaChat.

  5. The gateway routes tasks involving personal data only to the required CIS environment.

  6. The application does not need to know about that choice; it simply receives a response.

  7. We use queues for exchanges with accounting systems: Apache Kafka or a message bus Datareon.

  8. If 1C is unavailable for half an hour, messages wait in the queue while the site continues accepting orders.

  9. Message consumers are idempotent, so redelivery does not create duplicates. In AI-native development the agent writes code, but automated tests, a canary release to a small traffic share and automatic rollback on increased errors decide what reaches production.

  10. The agent supplies speed; only commits that pass the gates reach customers.

Three questions for every dependency

List your system’s external dependencies: models, ERP, PIM, payments and delivery. Answer three questions in writing for each one.

How many seconds do we wait before giving up?

What does the user see when the dependency is unavailable?

Who learns about the failure, and after how many minutes?

If even one answer is ‘we do not know’, you have identified the next incident before it happens.

Verdict

AI lowers the cost of changing code, but production failures remain expensive. Companies accelerating development without investing in resilience will get more releases and more overnight calls to on-call staff. Keeping the user’s service running during a model-provider outage requires engineered timeouts, queues, fallback routes and gates. Design them before the incident: there will be no time during it.

Source

Gergely Orosz, Building resilient AI-powered software, and planning for when things go wrong, The Pragmatic Engineer: an interview with

Sam Newman about Building Resilient Distributed Systems

, https://newsletter.pragmaticengineer.com/p/building-resilient-systems. Delivery-stability figures: Google DORA, Accelerate State of DevOps Report 2024.

Discuss the article: AI accelerated releases. Now the system must…

Enter your email or phone number so we can get back to you.

Send via: