InterviewHubPRO
Section Overview
Q35

Question 35 of 50

Part 3: Engineering Leadership, Code Quality & Collaboration (26 - 36)

70%
Behavioral & Leadership (50 Qs)•Part 3: Engineering Leadership, Code Quality & Collaboration (26 - 36)

What is your approach to system deprecation, data migration, and retiring legacy services safely?

In Simple Words: Deprecation requires telemetry, communication, brownout testing, and automated migration tooling.

The Safe Retirement Protocol:

  1. Telemetry & Audit: Inspect access logs and metrics to identify remaining client consumers.
  2. Deprecation Warnings: Emit HTTP Sunset headers and notify client teams 90 days in advance.
  3. Brownout Testing (Scream Testing): Temporarily disable the legacy API for 15 minutes during scheduled non-peak hours to identify unannounced dependencies.
  4. Decommission & Cleanup: Drop read replicas, delete routing DNS records, archive repositories, and tear down compute infrastructure.

Practical Script & Summary Template

typescript
// Express middleware emitting RFC 8594 Sunset deprecation headers:
export function deprecationMiddleware(req: Request, res: Response, next: NextFunction) {
  res.setHeader('Deprecation', 'true');
  res.setHeader('Sunset', 'Wed, 31 Dec 2026 23:59:59 GMT');
  res.setHeader('Link', '<https://api.docs.enterprise.com/migration-v2>; rel="successor-version"');
  next();
}