<svg viewBox="0 0 800 600" xmlns="http://www.w3.org/2000/svg">
<defs>
<pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse">
<path d="M 20 0 L 0 0 0 20" fill="none" stroke="#2a2a2a" stroke-width="0.5"/>
</pattern>
</defs>
<!-- Background -->
<rect width="800" height="600" fill="#0f172a"/>
<rect width="800" height="600" fill="url(#grid)" opacity="0.3"/>
<!-- Title -->
<text x="400" y="30" text-anchor="middle" fill="#f8fafc" font-size="20" font-weight="bold">
Patrones de Resiliencia en Servidores MCP
</text>
<!-- Circuit Breaker Section -->
<g transform="translate(50, 80)">
<rect x="0" y="0" width="200" height="120" fill="#2d4a22" stroke="#4ade80" stroke-width="2" rx="8"/>
<text x="100" y="20" text-anchor="middle" fill="#4ade80" font-size="14" font-weight="bold">Circuit Breaker</text>
<!-- States -->
<circle cx="50" cy="50" r="15" fill="#4ade80" stroke="#0f172a" stroke-width="2"/>
<text x="50" y="55" text-anchor="middle" fill="#f8fafc" font-size="10" font-weight="bold">CLOSED</text>
<circle cx="100" cy="50" r="15" fill="#fbbf24" stroke="#0f172a" stroke-width="2"/>
<text x="100" y="55" text-anchor="middle" fill="#f8fafc" font-size="10" font-weight="bold">HALF</text>
<circle cx="150" cy="50" r="15" fill="#ef4444" stroke="#0f172a" stroke-width="2"/>
<text x="150" y="55" text-anchor="middle" fill="#f8fafc" font-size="10" font-weight="bold">OPEN</text>
<!-- Arrows -->
<path d="M 65 50 L 85 50" stroke="#0f172a" stroke-width="2" marker-end="url(#arrowhead)"/>
<path d="M 115 50 L 135 50" stroke="#0f172a" stroke-width="2" marker-end="url(#arrowhead)"/>
<path d="M 150 35 Q 175 25 150 15 Q 125 25 100 35" stroke="#0f172a" stroke-width="2" fill="none" marker-end="url(#arrowhead)"/>
<text x="100" y="90" text-anchor="middle" fill="#f8fafc" font-size="11">
Protege contra cascadas de fallos
</text>
</g>
<!-- Retry with Backoff Section -->
<g transform="translate(300, 80)">
<rect x="0" y="0" width="200" height="120" fill="#4a2d22" stroke="#f97316" stroke-width="2" rx="8"/>
<text x="100" y="20" text-anchor="middle" fill="#f97316" font-size="14" font-weight="bold">Retry with Backoff</text>
<!-- Timeline -->
<line x1="20" y1="70" x2="180" y2="70" stroke="#0f172a" stroke-width="2"/>
<circle cx="40" cy="70" r="5" fill="#f97316"/>
<circle cx="80" cy="70" r="5" fill="#f97316"/>
<circle cx="140" cy="70" r="5" fill="#f97316"/>
<!-- Delay indicators -->
<text x="60" y="85" text-anchor="middle" fill="#f8fafc" font-size="9">1s</text>
<text x="110" y="85" text-anchor="middle" fill="#f8fafc" font-size="9">2s</text>
<text x="160" y="85" text-anchor="middle" fill="#f8fafc" font-size="9">4s</text>
<text x="100" y="105" text-anchor="middle" fill="#f8fafc" font-size="11">
Reintentos inteligentes exponenciales
</text>
</g>
<!-- Bulkhead Section -->
<g transform="translate(550, 80)">
<rect x="0" y="0" width="200" height="120" fill="#22304a" stroke="#3b82f6" stroke-width="2" rx="8"/>
<text x="100" y="20" text-anchor="middle" fill="#3b82f6" font-size="14" font-weight="bold">Bulkhead Pattern</text>
<!-- Compartments -->
<rect x="20" y="35" width="45" height="50" fill="#3b82f6" opacity="0.3" stroke="#3b82f6"/>
<rect x="75" y="35" width="45" height="50" fill="#3b82f6" opacity="0.3" stroke="#3b82f6"/>
<rect x="130" y="35" width="45" height="50" fill="#ef4444" opacity="0.3" stroke="#ef4444"/>
<text x="42" y="65" text-anchor="middle" fill="#f8fafc" font-size="9">DB</text>
<text x="97" y="65" text-anchor="middle" fill="#f8fafc" font-size="9">API</text>
<text x="152" y="65" text-anchor="middle" fill="#f8fafc" font-size="9">Cache</text>
<text x="100" y="105" text-anchor="middle" fill="#f8fafc" font-size="11">
Aislamiento de recursos críticos
</text>
</g>
<!-- Health Check Section -->
<g transform="translate(50, 250)">
<rect x="0" y="0" width="200" height="120" fill="#4a2242" stroke="#ec4899" stroke-width="2" rx="8"/>
<text x="100" y="20" text-anchor="middle" fill="#ec4899" font-size="14" font-weight="bold">Health Monitoring</text>
<!-- Health indicators -->
<circle cx="60" cy="60" r="12" fill="#4ade80"/>
<text x="60" y="65" text-anchor="middle" fill="#f8fafc" font-size="10">✓</text>
<text x="60" y="85" text-anchor="middle" fill="#f8fafc" font-size="9">Healthy</text>
<circle cx="140" cy="60" r="12" fill="#ef4444"/>
<text x="140" y="65" text-anchor="middle" fill="#f8fafc" font-size="10">✗</text>
<text x="140" y="85" text-anchor="middle" fill="#f8fafc" font-size="9">Degraded</text>
<text x="100" y="105" text-anchor="middle" fill="#f8fafc" font-size="11">
Monitoreo continuo de salud
</text>
</g>
<!-- Graceful Degradation Section -->
<g transform="translate(300, 250)">
<rect x="0" y="0" width="200" height="120" fill="#2a4a2a" stroke="#10b981" stroke-width="2" rx="8"/>
<text x="100" y="20" text-anchor="middle" fill="#10b981" font-size="14" font-weight="bold">Graceful Degradation</text>
<!-- Service levels -->
<rect x="30" y="35" width="140" height="15" fill="#10b981" opacity="0.8"/>
<text x="100" y="47" text-anchor="middle" fill="#f8fafc" font-size="9">Full Functionality</text>
<rect x="30" y="55" width="100" height="15" fill="#fbbf24" opacity="0.8"/>
<text x="80" y="67" text-anchor="middle" fill="#f8fafc" font-size="9">Core Features</text>
<rect x="30" y="75" width="60" height="15" fill="#ef4444" opacity="0.8"/>
<text x="60" y="87" text-anchor="middle" fill="#f8fafc" font-size="9">Basic Only</text>
<text x="100" y="105" text-anchor="middle" fill="#f8fafc" font-size="11">
Degradación controlada de servicios
</text>
</g>
<!-- Disaster Recovery Section -->
<g transform="translate(550, 250)">
<rect x="0" y="0" width="200" height="120" fill="#42224a" stroke="#a855f7" stroke-width="2" rx="8"/>
<text x="100" y="20" text-anchor="middle" fill="#a855f7" font-size="14" font-weight="bold">Disaster Recovery</text>
<!-- Primary and backup -->
<rect x="30" y="40" width="60" height="30" fill="#10b981" opacity="0.6"/>
<text x="60" y="58" text-anchor="middle" fill="#f8fafc" font-size="10">Primary</text>
<rect x="110" y="40" width="60" height="30" fill="#6b7280" opacity="0.6"/>
<text x="140" y="58" text-anchor="middle" fill="#f8fafc" font-size="10">Backup</text>
<!-- Failover arrow -->
<path d="M 95 55 L 105 55" stroke="#a855f7" stroke-width="3" marker-end="url(#arrowhead)"/>
<text x="100" y="85" text-anchor="middle" fill="#f8fafc" font-size="11">
RTO: < 5min | RPO: < 1min
</text>
</g>
<!-- Central Flow -->
<g transform="translate(200, 420)">
<rect x="0" y="0" width="400" height="100" fill="#1f2937" stroke="#6b7280" stroke-width="2" rx="8"/>
<text x="200" y="25" text-anchor="middle" fill="#f8fafc" font-size="16" font-weight="bold">
MCP Server con Resiliencia Completa
</text>
<text x="200" y="45" text-anchor="middle" fill="#9ca3af" font-size="12">
• Detección automática de fallos • Recuperación transparente
</text>
<text x="200" y="60" text-anchor="middle" fill="#9ca3af" font-size="12">
• Métricas en tiempo real • Alertas inteligentes
</text>
<text x="200" y="75" text-anchor="middle" fill="#9ca3af" font-size="12">
• Escalabilidad horizontal • Zero-downtime deployment
</text>
</g>
<!-- Arrow definitions -->
<defs>
<marker id="arrowhead" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
<polygon points="0 0, 10 3.5, 0 7" fill="#0f172a"/>
</marker>
</defs>
<!-- Connecting lines -->
<path d="M 150 200 Q 200 350 250 420" stroke="#6b7280" stroke-width="2" fill="none" opacity="0.5"/>
<path d="M 400 200 Q 400 350 400 420" stroke="#6b7280" stroke-width="2" fill="none" opacity="0.5"/>
<path d="M 650 200 Q 600 350 550 420" stroke="#6b7280" stroke-width="2" fill="none" opacity="0.5"/>
<path d="M 150 370 Q 200 390 250 420" stroke="#6b7280" stroke-width="2" fill="none" opacity="0.5"/>
<path d="M 400 370 Q 400 390 400 420" stroke="#6b7280" stroke-width="2" fill="none" opacity="0.5"/>
<path d="M 650 370 Q 600 390 550 420" stroke="#6b7280" stroke-width="2" fill="none" opacity="0.5"/>
</svg>