# How to Safely Shut Down Microservices Without Breaking Apps

> A method for shutting down parts of a software system one by one by mapping active requests to specific services, ensuring no tasks are interrupted during updates.

- **Patent:** US 12217035
- **Original title:** Microservice termination while maintaining high availability
- **Owner:** Microsoft Technology Licensing LLC
- **Granted:** 2025
- **Status:** Active
- **Times cited:** 0
- **Field:** software, telecommunications, ai_ml, ecommerce

## What it does

This patent describes a 'termination manager' that watches the work queues of a complex software application built from many small, independent programs called microservices. When an application needs to be updated or shut down, the manager looks at every active request and builds a 'call graph'—a map showing exactly which microservices that request needs to touch to finish its job. If a microservice is not on any active map, the system knows it is safe to turn off that service immediately. As requests finish and drop off the map, the manager keeps killing off the remaining services in a smart, orderly sequence until the entire old version of the application is gone without dropping a single user request.

## What it does NOT cover

- Does not cover shutting down services based on time-based delays or static timers.
- Does not cover systems that simply kill all services at once regardless of active requests.
- Does not cover load balancing or routing traffic to new services.
- Does not cover hardware-level power management or physical server shutdown.

## The clever bit

Instead of waiting for an arbitrary 'drain' period to expire, the system uses the actual call stack of pending requests to mathematically prove which services are no longer needed, allowing for the fastest possible safe shutdown.

## Real-world examples

1. Rolling updates of microservice-based cloud applications
2. Continuous deployment pipelines in Azure Kubernetes Service
3. Automated infrastructure decommissioning

## Why it matters

In modern cloud computing, applications are composed of hundreds of tiny, interconnected services. Updating these without causing 'downtime' or 'request failures' is a massive engineering challenge. This patent provides a formal logic for ensuring that service termination is request-aware, which is essential for maintaining high availability in platforms like Microsoft Azure or large-scale enterprise software.

## Frequently asked questions

### What does How to Safely Shut Down Microservices Without Breaking Apps cover?

A method for shutting down parts of a software system one by one by mapping active requests to specific services, ensuring no tasks are interrupted during updates.

### Who owns patent US 12217035?

Microsoft Technology Licensing LLC owns this patent, granted in 2025.

### When does this patent expire?

This patent is expected to expire on February 4, 2045, when the invention enters the public domain.

### What problem does this patent solve?

In modern cloud computing, applications are composed of hundreds of tiny, interconnected services. Updating these without causing 'downtime' or 'request failures' is a massive engineering challenge. This patent provides a formal logic for ensuring that service termination is request-aware, which is essential for maintaining high availability in platforms like Microsoft Azure or large-scale enterprise software.

### What does this patent NOT cover?

Does not cover shutting down services based on time-based delays or static timers.

**Full plain-English explainer:** https://patentbrief.org/patent/us/12217035/vision-pro-spatial-photos-videos

**Original patent:** https://patents.google.com/patent/US12217035

---

_Source: PatentBrief — https://patentbrief.org. Patent facts are from public records; the plain-English explanation is PatentBrief's._
