| I experimented with hosting a production app from a $250 used M1 Mac Mini instead of using cloud services. Here's what I've learned: Performance: - 1,500-2,000 QPS achieved for SSR and API endpoints during load tests
- 50% max CPU utilization hit during viral traffic (350k reddit post views/48h)
- System Specs: M1 Mini w/ 8GB RAM, running headless Linux Tech Stack: - Docker containers optimized for ARM
- Cloudflare Zero Trust Tunnel for connecting to the public internet
- Grafana/Prometheus/Loki for monitoring
- PostGIS for geographical queries
- Custom ARM64 PostGIS image Monthly Costs Comparison: Cloud Hosting: - Compute: $20-30/month
- Database: $15-20/month
- Storage: $5-10/month
- Total: $40-60+/month Self-Hosted M1 Mini: - Hardware: $250 (one-time)
- Electricity: $1-4/month
- Total Reoccurring Costs: ~$2/month Key Challenges: - ARM compatibility for PostGIS (built custom image)
- Monitoring implementation (self-hosted Grafana stack)
- Third-party API costs during traffic spikes
- Single point of failure (power outage took us down for a couple hours) The setup handles our current scale well, with room for optimization. Containerized architecture means cloud migration is straightforward if/when needed. Happy to share implementation details or answer questions about any aspect of the setup.
Full technical details: https://lab.workhub.so/running-your-app-on-pocket-change |