replit-reliability-patterns

Featured

Implement reliability patterns for Replit: cold start handling, graceful shutdown, persistent state, and keep-alive. Use when building fault-tolerant Replit apps, handling container restarts, or adding resilience to production Replit deployments. Trigger with phrases like "replit reliability", "replit container restart", "replit data persistence", "replit always on", "replit graceful shutdown".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Replit Reliability Patterns ## Overview Production reliability patterns for Replit's container-based hosting. Replit containers restart on deploy, sleep on inactivity (Autoscale), and have ephemeral filesystems. These patterns ensure your app survives container lifecycle events gracefully. ## Prerequisites - Replit Deployment configured - External storage for persistent state (PostgreSQL or Object Storage) - Understanding of Replit container lifecycle ## Container Lifecycle ``` Container starts → App boots → Handles requests → [Sleep or Restart] │ ┌────────────────────────────────────┘ │ ┌───────┴──────┐ │ Sleep trigger │ Autoscale: no traffic for ~5 min │ Restart trigger│ Deploy, config change, or crash └───────┬──────┘ │ State lost: filesystem, in-memory data, caches State kept: PostgreSQL, KV Database, Object Storage, Secrets ``` ## Instructions ### Step 1: Graceful Startup ```typescript // Handle cold starts — prioritize accepting requests over initialization import express from 'express'; const app = express(); let ready = false; // Accept requests immediately app.listen(parseInt(process.env.PORT || '3000'), '0.0.0.0', () => { console.log(`Server started in ${process.uptime().toFixed(1)}s`); // Initialize in background initialize().catch(console.error); }); // Health endpoint...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

replit-performance-tuning

Optimize Replit app performance: cold start, memory, Nix caching, and deployment speed. Use when experiencing slow startup, high memory usage, deployment timeouts, or optimizing Replit container resource usage. Trigger with phrases like "replit performance", "optimize replit", "replit slow", "replit cold start", "replit memory", "replit startup time".

2,266 Updated today
jeremylongshore
AI & Automation Featured

replit-sdk-patterns

Apply production-ready patterns for Replit Database, Object Storage, and Auth APIs. Use when implementing Replit integrations, structuring data access layers, or establishing team coding standards for Replit services. Trigger with phrases like "replit patterns", "replit best practices", "replit code patterns", "idiomatic replit", "replit SDK".

2,266 Updated today
jeremylongshore
AI & Automation Featured

replit-observability

Monitor Replit deployments with health checks, uptime tracking, resource usage, and alerting. Use when setting up monitoring for Replit apps, building health dashboards, or configuring alerting for deployment health and performance. Trigger with phrases like "replit monitoring", "replit metrics", "replit observability", "monitor replit", "replit alerts", "replit uptime".

2,266 Updated today
jeremylongshore
AI & Automation Featured

replit-prod-checklist

Execute Replit production deployment checklist with rollback and health monitoring. Use when deploying Replit apps to production, preparing for launch, or implementing go-live procedures with Autoscale or Reserved VM. Trigger with phrases like "replit production", "deploy replit", "replit go-live", "replit launch checklist", "replit prod ready".

2,266 Updated today
jeremylongshore
AI & Automation Featured

replit-known-pitfalls

Avoid the top Replit anti-patterns: ephemeral filesystem, public secrets, port binding, Nix gotchas, and database limits. Use when reviewing Replit code, onboarding developers, or auditing existing Replit apps for common mistakes. Trigger with phrases like "replit mistakes", "replit anti-patterns", "replit pitfalls", "replit what not to do", "replit code review".

2,266 Updated today
jeremylongshore