انتقل إلى المحتوى

نظرة عامة للمناوبة (On‑call)

  • ابدأ بفحص نقاط الصحة (Health).
  • اتبع المسار الذهبي أو المتدهور حسب الحالة.
  • انتقل إلى دفتر التشغيل المناسب لتنفيذ الإجراء.

خريطة الصحة عبر الخدمات

  • نقاط الصحة --- GET ${API_URL}/health · GET ${SCRAPER_URL}/health · GET ${AI_BOX_URL}/health · ${OS_URL}/_cluster/health
    مزيد من الأوامر: راجع قسم حالة الخدمة أدناه.
  • الاعتمادية (Dependencies) --- API ↔ OpenSearch ↔ AI‑Box ↔ Scraper
    مصفوفة العقود
  • دفاتر التشغيل --- API · AI‑Box · Scraper · Search

المسارات

sequenceDiagram
  autonumber
  participant SCR as Scraper
  participant API as واجهة API
  participant OS as OpenSearch
  participant AI as AI‑Box
  SCR->>API: POST /ingest
  API->>OS: فهرسة
  API->>AI: إعادة ترتيب/إثراء
  AI-->>API: نتائج
  API-->>Client: استجابة البحث
sequenceDiagram
  autonumber
  participant Client as العميل
  participant API as واجهة API
  participant OS as OpenSearch
  participant AI as AI‑Box
  Client->>API: /search
  API->>OS: _search
  Note right of API: إذا تجاوزت مهلة AI‑Box 1500ms، قدّم نتائج معجمية الآن
  API-->>Client: 200 {"degraded": true}

عقود الاعتمادية — ملخّص

المتصل → المتلقي المهلة المحاولات التراجع بديل أين أتصرف
Scraper → API 2s 3 أُسِّي + اهتزاز + Retry-After قرص + Replay Scraper ▸ Replay
API → AI‑Box 1500ms 1 أُسِّي + اهتزاز Lexical فقط API ▸ Degrade
API → Search 800ms 0 BM25 فقط Search ▸ Troubleshoot

أوامر سريعة (تبويبات)

curl -s ${API_URL}/health | jq
curl -s ${SCRAPER_URL}/profiles | jq 'length'
curl -s ${AI_BOX_URL}/health | jq
curl -s ${OS_URL}/_cluster/health | jq '.status'
curl -s -D- ${API_URL}/v1/search?q=test -H "X-Request-ID=oncall-$RANDOM" | sed -n '1,20p'
curl -s ${SCRAPER_URL}/metrics | grep backoff_events_total
curl -s ${API_URL}/metrics | grep rerank_timeout

إلى أين بعد ذلك؟