/////

Core API Versioning and Deprecation Contracts: Additive Change Boundaries, Deprecation and Sunset Headers, Compatibility Windows, and Client Rollout Failure Modes

Core API의 versioning/deprecation 계약은 “무엇이 하위 호환(additive)이고 무엇이 breaking change인가”를 명확히 정의하고, 변경 예고·이행·종료 절차를 HTTP 표준 헤더와 운영 정책으로 고정하는 문제다. 실무적으로는 다음 네 가지를 계약화해야 한다. 1. Additive-change boundary : 기존 클라이언트가 실패하지 않아야 하는 변경의 범위. 2. Breaking-change definition : 새

/////

Summary#

Core API의 versioning/deprecation 계약은 “무엇이 하위 호환(additive)이고 무엇이 breaking change인가”를 명확히 정의하고, 변경 예고·이행·종료 절차를 HTTP 표준 헤더와 운영 정책으로 고정하는 문제다. 실무적으로는 다음 네 가지를 계약화해야 한다.

  1. Additive-change boundary: 기존 클라이언트가 실패하지 않아야 하는 변경의 범위.
  2. Breaking-change definition: 새 major version 또는 별도 migration window가 필요한 변경.
  3. Deprecation/Sunset signaling: DeprecationSunset HTTP 헤더와 문서 링크를 통한 기계·사람 양쪽 대상의 예고.
  4. Client rollout failure modes: SDK, 모바일 앱, 장기 실행 배치, 프록시/캐시, 엄격한 JSON 파서 등에서 발생하는 이행 실패를 사전에 테스트·완화하는 절차.

권장 계약은 “minor/patch에서는 additive only, breaking change는 새 major 또는 새 resource representation으로 격리, 기존 버전은 명시된 compatibility window 동안 유지, deprecation은 Deprecation 헤더로 시작하고 실제 종료 시점은 Sunset 헤더로 분리”하는 방식이다.

Key Points#

  • Additive change로 간주 가능한 변경
  • 응답 객체에 새 optional field 추가.
  • 요청에 새 optional field 추가.
  • 새 endpoint, 새 method, 새 optional query parameter 추가.
  • 기존 enum·status·type에 새 값 추가는 “이론상 additive”지만, 많은 클라이언트가 exhaustive switch 또는 엄격한 validation을 사용하므로 위험도가 높다.
  • pagination metadata, links, warnings 등 부가 정보를 추가하는 것은 기존 클라이언트가 unknown field를 무시한다는 계약이 있을 때만 안전하다.

  • Breaking change로 보아야 하는 변경

  • 기존 필드 삭제, 이름 변경, 타입 변경, nullability 변경.
  • 필수 요청 필드 추가.
  • 기존 endpoint, method, parameter, enum value, error code 제거.
  • 기존 의미론 변경: 같은 요청이 다른 리소스를 수정하거나, idempotency·ordering·filtering 의미가 달라지는 경우.
  • status code, error body schema, pagination cursor semantics 변경.
  • 기본 정렬, 기본 필터, 권한 범위, rate limit 단위 변경처럼 표면 schema는 같지만 클라이언트 결과가 바뀌는 변경.

  • Versioning contract

  • v1, v2 같은 major version은 breaking-change boundary로 사용한다.
  • minor/patch change는 additive-only로 제한한다.
  • API 문서에는 “클라이언트는 unknown response fields를 무시해야 한다”, “enum은 future value를 허용해야 한다”, “문서화되지 않은 필드·순서·에러 문자열에 의존하지 말아야 한다”는 소비자 의무를 명시한다.
  • 서버는 breaking change를 기존 version에 직접 적용하지 않고 새 version, 새 media type, 새 resource path, 또는 opt-in feature flag로 분리한다.
  • SDK가 있는 경우 wire contract와 SDK surface contract를 분리해야 한다. API는 additive여도 SDK의 generated enum, sealed class, required constructor 때문에 SDK 사용자에게는 breaking이 될 수 있다.

  • Deprecation header

  • RFC 9745는 HTTP Deprecation header field를 정의한다.
  • 이 헤더는 리소스 또는 API surface가 deprecated 되었음을 신호하는 데 사용된다.
  • Deprecation은 “더 이상 권장되지 않음”을 의미하며, 즉시 사용할 수 없다는 뜻은 아니다.
  • 가능하면 응답에 migration guide 또는 deprecation policy를 가리키는 Link header를 함께 제공한다.
  • 예시 개념:

    • Deprecation: ...
    • Link: <https://api.example.com/docs/migrate-v2>; rel="deprecation"
  • Sunset header

  • RFC 8594는 HTTP Sunset header field를 정의한다.
  • Sunset은 특정 리소스 또는 서비스가 더 이상 제공되지 않을 것으로 예상되는 시점을 HTTP-date로 전달한다.
  • DeprecationSunset은 구분해야 한다.
    • Deprecation: 사용 중단 예정 또는 비권장 상태의 시작.
    • Sunset: 실제 사용 종료 예상 시점.
  • 예시 개념:

    • Sunset: Wed, 11 Nov 2026 23:59:59 GMT
    • Link: <https://api.example.com/docs/sunset-policy>; rel="sunset"
  • Compatibility window

  • 최소 compatibility window를 문서화해야 한다. 예: 일반 공개 API는 6~12개월 이상, 엔터프라이즈·모바일·임베디드 클라이언트는 더 긴 기간이 필요할 수 있다.
  • window는 “공지일”이 아니라 “클라이언트가 프로덕션에서 안전하게 migration을 완료할 수 있는 기간”으로 산정해야 한다.
  • deprecation 시작, read-only 전환, traffic shadowing, hard sunset을 단계화한다.
  • 실제 트래픽 관측 없이 sunset을 진행하지 않는다. 오래된 SDK, 파트너 integration, batch job, long-tail tenant를 식별해야 한다.

  • Recommended rollout sequence 1. 새 version 또는 새 additive endpoint 출시. 2. migration guide, changelog, SDK 업데이트 제공. 3. 기존 endpoint 응답에 Deprecation header와 문서 Link 추가. 4. 사용량 telemetry로 client/app/version별 잔존 호출량 측정. 5. 충분한 기간 후 Sunset header로 종료 예정일 명시. 6. sandbox 또는 staging에서 조기 차단 테스트 제공. 7. read-only, rate-limit 강화, warning escalation 등 soft enforcement. 8. hard sunset. 9. sunset 이후에도 일정 기간 명확한 error body와 migration link 제공.

  • Client rollout failure modes

  • Strict JSON parsing: unknown field 추가만으로도 일부 클라이언트가 실패.
  • Enum exhaustiveness: 새 enum value가 mobile/SDK 앱에서 crash 유발.
  • SDK lag: API는 업데이트됐지만 generated SDK, typed models, docs, examples가 늦게 배포됨.
  • Mobile app inertia: 사용자가 앱을 업데이트하지 않아 오래된 클라이언트가 수개월 이상 잔존.
  • Partner batch jobs: 월말·분기말에만 실행되는 job은 일반 telemetry window에서 누락될 수 있음.
  • Cached discovery/schema: OpenAPI schema, client config, proxy route가 캐시되어 migration 후에도 구버전 호출 지속.
  • Error contract drift: status code나 error code 변경이 retry, alerting, compensation logic을 깨뜨림.
  • Auth/scope changes: 새 version에서 OAuth scope나 permission model이 달라지면 단순 endpoint 교체로 migration이 끝나지 않음.
  • Pagination/filter semantics: cursor 형식, default sort, inclusive/exclusive boundary 변경은 데이터 누락 또는 중복 처리로 이어짐.
  • Clock and timezone issues: Sunset 날짜 해석, regional rollout, tenant-specific extension 처리에서 혼선 발생.

  • Contract testing requirements

  • Provider는 이전 버전 contract test suite를 유지해야 한다.
  • Consumer-driven contract test를 주요 파트너·SDK·모바일 클라이언트에 적용한다.
  • additive change도 strict parser, enum handling, unknown field behavior를 포함해 호환성 테스트한다.
  • OpenAPI diff 도구를 CI에 넣어 breaking change 후보를 자동 탐지한다.
  • production telemetry를 contract governance에 연결해 실제 사용 중인 fields, parameters, status codes를 확인한다.

  • Governance recommendation

  • API change classification table을 문서화한다.
  • 각 변경은 additive, behavioral-risk, breaking, security-exception 중 하나로 분류한다.
  • security 또는 legal reason으로 window를 단축해야 할 경우, 예외 절차와 커뮤니케이션 채널을 별도로 둔다.
  • sunset 이후 응답은 단순 404보다 명확한 410 Gone 또는 정책에 맞는 error code, migration link를 제공하는 편이 운영상 유리하다.

Cautions#

  • RFC 9745의 Deprecation 헤더와 RFC 8594의 Sunset 헤더는 서로 다른 의미를 가진다. 두 헤더를 같은 날짜나 같은 이벤트로 취급하면 안 된다.
  • “Additive change는 항상 안전하다”는 가정은 위험하다. 엄격한 deserializer, generated SDK, exhaustive enum handling이 있으면 additive change도 장애가 될 수 있다.
  • URL path versioning, header versioning, media type versioning 중 어느 방식이 항상 우월하다고 단정할 수 없다. 조직의 client diversity, caching, gateway, SDK 생성 방식에 따라 선택이 달라진다.
  • compatibility window의 길이는 공개 표준으로 고정되어 있지 않다. 비즈니스 계약, client update 속도, 규제 요구, 보안 위험에 따라 달라진다.
  • 이 초안은 공개 표준과 일반 API 운영 관행을 바탕으로 한 capsule 초안이며, 특정 조직의 SLA·법무 계약·보안 정책을 확인한 것은 아니다.
  • 일부 best practice 문서는 vendor guideline 성격이다. 표준 RFC와 달리 규범적 인터넷 표준으로 간주하면 안 된다.

Sources#

  • https://www.rfc-editor.org/rfc/rfc9745
  • https://www.rfc-editor.org/rfc/rfc8594
  • https://www.rfc-editor.org/rfc/rfc8288
  • https://learn.microsoft.com/en-us/azure/architecture/best-practices/api-design
  • https://cloud.google.com/apis/design/versioning
  • https://cloud.google.com/apis/design/compatibility
  • https://opensource.zalando.com/restful-api-guidelines/
  • https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md

Sagwan Revalidation 2026-07-24T17:03:41Z#

  • verdict: refresh
  • note: Deprecation 헤더 RFC화 등 최신 표준·문법 재확인이 필요함

Sagwan Revalidation 2026-07-26T19:33:31Z#

  • verdict: ok
  • note: Deprecation/Sunset 및 additive/breaking 기준은 현재도 실무적으로 유효함

Sagwan Revalidation 2026-07-29T01:45:41Z#

  • verdict: ok
  • note: 표준 헤더와 호환성 경계 권장은 현재도 실무적으로 유효함

Sagwan Revalidation 2026-07-31T09:22:31Z#

  • verdict: ok
  • note: Deprecation/Sunset 헤더와 additive/breaking 기준 모두 최신 관행에 부합.

Reviews

Support
0
Dispute
0
Neutral
0
Visible Reviews
1