Infrai Developer Guides
Production tutorials, troubleshooting guides, comparisons, and reference architectures for Infrai APIs.
ai
- Cheaper than GPT-4 for summarise, classify and extract: five levers
- Batch product-image generation in Node: bulk prompts, pooled image calls
- Evaluating a cheap LLM API gateway: catalogue, telemetry, cache, routing
- Cheap semantic search over your docs: embeddings and rerank, priced properly
- Forecast a feature's monthly LLM bill before you ship it
- A low-cost chatbot backend: what one support turn actually costs
- Posters and social ads from an image API: resolution, style control, upscale
- Tagging support tickets without fine-tuning: zero-shot, rerank or embeddings
- Reranking 50 search candidates: request, response and mapping back
- Backfilling moderation over posts you already have: a Node bulk job
- Cheap RAG in Node: cost the chunks, the index and the answer separately
- Cheapest text-to-image API for an MVP: sticker price vs what you get billed
analytics
cron
- Cheapest cron for nightly data cleanup: Actions, Workers or EventBridge?
- A nightly cleanup job for an Express app: which scheduler, which cron expression
- One POST for a daily 8am Eastern webhook: the parameters that matter
- Give each transcode to exactly one homelab box, and reclaim it if that box dies
- A morning webhook for your backup job, without a VPS to patch
- Fire a cron job on demand to test the webhook chain before 3am
- Reminder cron fired at the wrong hour: timezone, missed runs, no backfill
- Daily reminder fan-out: cron plans, the queue paces, the sender batches
- Overlapping cron runs: what skip, allow and queue actually do
- Why your daily email cron should enqueue jobs, not send them inline
- Cheapest transactional email API for SaaS welcome emails (Node 22)
- Bounce and complaint handling without webhooks: poll the event feed
- Campaign-lite onboarding: reusable templates plus a batch send
- The best template approach for password-reset email in Node 22
- Choosing a transactional email API: an eight-check acceptance test
- Picking a password-reset email API: retries, DKIM, US and EU
- Transactional email over HTTPS, not an SMTP relay, for a Node SaaS
- A SaaS welcome-email integration: four decisions, with defaults
- SaaS alert emails: give them their own sending subdomain
- Rotating DKIM keys from Node 22: one API call, one DNS cutover
- Welcome email deliverability checklist for SaaS, run as code
- Bulk welcome mail after a user import: chunking, pacing and retries
errors
- Cron jobs, workers and the failures that never throw an exception
- Poll-based error alerting for Node: cron, Slack and a watermark
- Error tracking for a small Node SaaS: capture exceptions without an SDK
- A simple SaaS reliability dashboard in Node, built from the errors API
- Errors, logs and metrics: the minimum failure-alert stack that works
- API-only error monitoring: no session replay, no tracing, no agent
- Tracking failed health checks in Node: timeouts, ECONNREFUSED and DNS
- Grouping, fingerprints, releases: error tracking terms explained
- Slack now, email at 08:00: routing alerts from one error poller
- Alerting on repeats in Express: count deltas and resolve as your ack
- Feature flag toggles, retries and duplicate writes: making rollouts idempotent
- Choosing an error tracker for an Express API in Europe: seven questions
flags
- Debugging 400s on a feature flag API: set, toggle and rollout payloads
- Feature flag kill switch for incident response: the one call to go dark
- Feature flag 404s after a delete and recreate: what actually breaks
- A LaunchDarkly alternative that is just a REST flag store
- Percentage rollouts and user targeting in Express with a REST flag API
- Flag stats, custom metrics or events: measuring a rollout from the backend
image
logs
- Hosted log API, Datadog, or self-hosted ELK: which to start with
- Cheap centralized logging for a small SaaS on Node, Docker and cron
- Error tracking vs logging in a Node SaaS: which one to call, when
- Pino and Winston to an HTTP log ingest API, with request and user ids
- Six Fly.io apps, one log tail: a lightweight alternative to ELK
- Which API for centralized log ingest and search in a startup dashboard
metrics
- Logging vs error tracking vs metrics: which one a small SaaS needs first
- One metrics schema for cron runs, API failures and business events
- Cheap failure alerts for a Node/Express API: counters instead of log search
- Metrics-based failure alerting for a SaaS API: rule shapes that don't flap
- Rollout KPI dashboards on a budget: metrics API vs Statsig and PostHog
- Auto-rollback a bad release in Node: error-rate check, then flip the flag
- Charts for a SaaS admin page: metrics API or log search?
- Can a coding agent wire up observability in one pass? Installs vs REST
- A daily cron that queries your metrics and emails a one-page summary
- Cron heartbeat and missed-run detection for Next.js jobs, without a ping service
- Build an internal uptime page in Node from a 0/1 gauge and two API calls
- Readiness, liveness and startup probes for a Node service on Kubernetes
queue
- Duplicate jobs in an at-least-once queue: the idempotency key that fixes it
- Delayed retries beyond 7 days: chaining hops on a job queue
- Cleanup jobs that retry themselves: Node queue, DLQ, redrive
- Message too large and JSON that won't parse: fixing malformed queue payloads
- Background jobs in Node: create a queue, run a worker, ack and nack
- Job keeps coming back? Three causes of endless queue retries
- Exponential backoff for failed jobs when your queue only retries three times
- Cron or a job queue? Picking one for file, email and webhook work
- Your push subscriber is returning 429: what the queue does next
- Long-running jobs and the 15-minute wall: checkpoint instead of extending
- Batch enqueue in Node: 100 jobs per publish call, then a paced worker
- Choosing a queue for user reminders when the send can fail
sms
- Choosing a 2FA SMS provider: sender registration sets your date
- Phone OTP as a service: what send-plus-verify actually takes off you
- 2FA SMS API with resend and cancel: a Node 22 login controller
- The cheapest event-notification API depends on your channel mix
- SMS-primary 2FA with an email fallback: the beginner architecture
- A beginner's 2FA login stack: OTP, suppression preflight, polling
- SMS 2FA in Express: switch lanes when the code never arrives
- The simplest SMS OTP API for SaaS login: two calls, one key
- Picking an SMS alerts API when you refuse to run a webhook endpoint
- Picking an SMS alerts provider for reminders, shipping and logins
- Email or SMS for SaaS alerts: what a delivered notification costs
- Cheap SMS alerts for a startup: the unit, the sender, the receipt
storage
- 429s in an image pipeline: retry the upload, never the render
- Kick off transcoding when a video lands, without polling the bucket
- Fixing upload timeouts for large AI-generated PNG and WebP renders
- Malformed base64 when saving a generated PNG to object storage
- Expire backups after 30 days with object-storage lifecycle rules
- Square avatar crops with sharp, stored as a size set in private storage
- No object versioning? Give avatars a rollback window instead
- Replacing an avatar safely when two uploads race for the same key
- The restore half of a backup: an admin download flow in Node 22
- Cheapest object storage for app backups: price the restore, not the archive
- Cheapest object storage for SaaS documents: measure before you shop
- Object storage key naming for originals, thumbnails, WebP and AVIF