Claude Codeでグレースフルデグレデーションを設計する:部分的サービス継続・フォールバック階層・ユーザー影響最小化

はじめに 「推薦エンジンが落ちたら全ページが503になった」——グレースフルデグレデーションで依存サービスが落ちてもコアユーザー体験は維持し、フォールバックで代替コンテンツを提供する設計をClaude Codeに生成させる。 CLAUDE.mdにグレースフルデグレデーション設計ルールを書く ## グレースフルデグレデーション設計ルール ### 機能の重要度分類 - CRITICAL: 認証・...

By · · 1 min read
Claude Codeでグレースフルデグレデーションを設計する:部分的サービス継続・フォールバック階層・ユーザー影響最小化

Source: DEV Community

はじめに 「推薦エンジンが落ちたら全ページが503になった」——グレースフルデグレデーションで依存サービスが落ちてもコアユーザー体験は維持し、フォールバックで代替コンテンツを提供する設計をClaude Codeに生成させる。 CLAUDE.mdにグレースフルデグレデーション設計ルールを書く ## グレースフルデグレデーション設計ルール ### 機能の重要度分類 - CRITICAL: 認証・決済・注文確定 → 絶対に落とさない - HIGH: 検索・商品一覧 → 最大努力で維持(キャッシュフォールバック) - MEDIUM: パーソナライズ推薦 → 落ちたら汎用コンテンツで代替 - LOW: リアルタイム閲覧数・ランキング → 落ちたら非表示でOK ### フォールバック階層 1. Primaryサービス(通常通り) 2. Staleキャッシュ(Redisにある古いデータ) 3. 静的フォールバック(ハードコードされたデフォルト) 4. 機能なし(エラーではなく「現在利用できません」UI) ### ユーザーへの通知 - CRITICAL障害: エラーページ(透明性) - MEDIUM/LOW障害: サイレントデグレード(ユーザーに気づかせない) - 管理者ダッシュボード: 全デグレード状況をリアルタイム表示 グレースフルデグレデーション実装の生成 グレースフルデグレデーションシステムを設計してください。 要件: - 機能重要度分類 - フォールバック階層 - サイレントデグレード - デグレード状況の追跡 生成ファイル: src/resilience/degradation/ 生成されるグレースフルデグレデーション実装 // src/resilience/degradation/degradationManager.ts — デグレデーション管理 export type FeaturePriority = 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW'; export interface FallbackStrategy<T> { staleCache?: () => Promise<T | null>; // 古いキャッシュから取得 staticDefault?: () => T; // 静的デフォ

Related Posts

Similar Topics

#ai (18)#fix (15)#feat (15)#webdev (14)#javascript (13)#opensource (8)#chore (8)#large language models (4)#modernization (6)#backbonejs (6)#es6 (6)#redis (2)#security (5)#nextjs (5)#programming (5)#css (5)#code generation (4)#api (4)#node (4)#html (4)

Trending on ShareHub

  1. Understanding Modern JavaScript Frameworks in 2026
    by Alex Chen · Feb 12, 2026 · 0 likes
  2. The System Design Primer
    by Sarah Kim · Feb 12, 2026 · 0 likes
  3. Just shipped my first open-source project!
    by Alex Chen · Feb 12, 2026 · 0 likes
  4. OpenAI Blog
    by Sarah Kim · Feb 12, 2026 · 0 likes
  5. Building Accessible Web Applications: A Practical Guide
    by Alex Chen · Feb 12, 2026 · 0 likes
  6. Rapper Lil Poppa dead at 25, days after releasing new music
    Rapper Lil Poppa dead at 25, days after releasing new music
    by Anonymous User · Feb 19, 2026 · 0 likes
  7. write-for-us
    by Volt Raven · Mar 7, 2026 · 0 likes
  8. Before the Coffee Gets Cold: Heartfelt Story of Time Travel and Second Chances
    Before the Coffee Gets Cold: Heartfelt Story of Time Travel and Second Chances
    by Anonymous User · Feb 12, 2026 · 0 likes
    #coffee gets cold #the #time travel
  9. Best DoorDash Promo Code Reddit Finds for Top Discounts
    Best DoorDash Promo Code Reddit Finds for Top Discounts
    by Anonymous User · Feb 12, 2026 · 0 likes
    #doordash #promo #reddit
  10. Premium SEO Services That Boost Rankings & Revenue | VirtualSEO.Expert
    by Anonymous User · Feb 12, 2026 · 0 likes
  11. NBC under fire for commentary about Team USA women's hockey team
    NBC under fire for commentary about Team USA women's hockey team
    by Anonymous User · Feb 18, 2026 · 0 likes
  12. Where to Watch The Nanny: Streaming and Online Viewing Options
    Where to Watch The Nanny: Streaming and Online Viewing Options
    by Anonymous User · Feb 12, 2026 · 0 likes
    #streaming #the nanny #where
  13. How Much Is Kindle Unlimited? Subscription Cost and Plan Details
    How Much Is Kindle Unlimited? Subscription Cost and Plan Details
    by Anonymous User · Feb 12, 2026 · 0 likes
    #kindle unlimited #subscription #unlimited
  14. Russian skater facing backlash for comment about Amber Glenn
    Russian skater facing backlash for comment about Amber Glenn
    by Anonymous User · Feb 18, 2026 · 0 likes
  15. Google News
    Google News
    by Anonymous User · Feb 18, 2026 · 0 likes

Latest on ShareHub

Browse Topics

#artificial intelligence (31558)#data science (24017)#ai (16781)#generative ai (15034)#crypto (14994)#machine learning (14680)#bitcoin (14232)#featured (13553)#news & insights (13064)#crypto news (11082)

Around the Network