Saltar al contenido principal
Performance budgets · quantified

Performance budgets

8 latency budgets p50/p95/p99 quantified · 6 resource budgets (CPU · memory · bundle size · Lighthouse) · 6 regression detection mechanisms · 5 documented improvements last 90 días. Performance que SE MIDE · NO afirmaciones cualitativas marketing.

8 latency budgets · p50/p95/p99

Componentp50p95p99CurrentAction
WhatsApp webhook processing (full)<500ms<2s<5sp50 380ms · p95 1.2s · p99 4.1s (2 demo clinics)Within budget · monitor trend monthly
Health endpoint /health<50ms<100ms<200msp50 35ms · p95 78ms · p99 142msWithin budget · cached static response
Bot response (LLM inference call)<2s<5s<10sp50 1.8s · p95 4.2s · p99 8.7sWithin budget · OpenAI gpt-4o-mini optimization · streaming planned Q3
DB query (single tenant read)<20ms<100ms<300msp50 12ms · p95 67ms · p99 220msWithin budget · Supabase optimization + indexes ready
Admin dashboard page load (TTFB)<200ms<800ms<2sp50 180ms · p95 650ms · p99 1.7sWithin budget · Cloudflare Pages edge cache
Cal.com availability check<300ms<1s<3sp50 250ms · p95 870ms · p99 2.4sWithin budget · external dependency · circuit breaker active
Stripe webhook processing<200ms<500ms<1sp50 150ms · p95 380ms · p99 720msWithin budget · simple idempotent processing
End-to-end message resolution (P0)<3s<8s<15sp50 2.7s · p95 6.8s · p99 13.4sWithin budget · improvement target Q3 streaming -30% p95

6 resource budgets

ResourceLimitCurrentAction
Cloudflare Worker CPU time50ms p95 (free plan limit)p95 38msWithin budget · NO worker timeouts last 90d
Cloudflare Worker memory128MB max per requestp95 42MB · p99 87MBWithin budget · NO OOM kills
Cloudflare Worker requests/min100k/min (plan limit)Peak 850/min observedMassive headroom · plan scales 10x current usage
Bundle size landing-next deployed<1MB first load JS gzipped~340KB first load JS gzippedWithin budget · Next.js 16 tree-shaking + code splitting
Lighthouse Performance score landing>90 mobile · >95 desktopMobile 94 · Desktop 98 (last measure 2026-05-15)Within budget · monthly Lighthouse CI audit
Cumulative Layout Shift (CLS)<0.1 (Core Web Vital good)0.02 measured · excellentWithin budget · all images aspect-ratio reserved

Regression detection · 6 mechanisms

  • Pre-merge · build size diff vs main · alert si bundle grows >10% · investigate before merge
  • Pre-merge · Lighthouse CI runs critical pages · regression si score drops >5 points · blocking merge
  • Post-deploy · synthetic monitoring 60s polls · alert si p95 latency >budget for 5+ minutes
  • Daily · production p50/p95/p99 metrics report · trends week-over-week · investigate sustained drift
  • Weekly · cost-per-request metric · alert si trending >25% week-over-week · investigate root cause
  • Monthly · performance review meeting · founder alone pre-tracción · with team post-tracción · documented improvements queue

Improvement history · 5 documented wins last 90d

DateComponentBeforeAfterChange
2026-05-10Bot response p955.2s4.2s (-19%)OpenAI gpt-4o-mini migration from gpt-4-turbo · cost -60% bonus
2026-04-22DB query p95120ms67ms (-44%)Composite index added on (clinic_id, created_at) · query plan improved
2026-04-15Webhook processing p951.8s1.2s (-33%)Removed sync Cal.com check from hot path · moved to async background
2026-03-28Landing page LCP2.4s1.6s (-33%)Hero image WebP + AVIF · Next.js Image component optimization
2026-03-12Admin dashboard TTFB1.1s650ms (-41%)Cloudflare Pages cache headers tightened · stale-while-revalidate
Pre-revenue caveat · low-volume measurements

Métricas actuales basadas en 2 demo clínicas con volumen bajo (~50-200 mensajes/día each). p95/p99 estadísticamente noisy con tan poco volumen. Cuando lleguen clientes reales con volumen alto · expected ligero degradación inicial p95/p99 que será re-baselined honestamente.

Compromiso: budgets NO se reescriben silently si traffic real revela targets eran optimistic · postmortem público + ADR documenta re-baseline + improvement plan.

¿Tu performance team necesita detailed metrics?

Para Enterprise procurement · raw metrics export · Grafana dashboard sample · synthetic monitoring config disponibles bajo NDA Enterprise.