惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

腾讯CDC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
The Cloudflare Blog
爱范儿
爱范儿
阮一峰的网络日志
阮一峰的网络日志
WordPress大学
WordPress大学
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
Last Week in AI
Last Week in AI
Jina AI
Jina AI
V
V2EX
罗磊的独立博客
V
Visual Studio Blog
A
About on SuperTechFans
IT之家
IT之家
P
Proofpoint News Feed
B
Blog
博客园 - Franky
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
Y
Y Combinator Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Goodbye Nginx and Redis: Building a Zero-Service Monolith...
The One-Man · 2026-05-19 · via DEV Community

The "Zero-Service" Monolith: How to run your entire app on a single server port

For years, I believed that a professional Rails app needed a small army of services to survive in production. You couldn't just run Rails. You needed Nginx to handle SSL and assets, Redis to handle background jobs and caching, and maybe a separate load balancer.

As a solo developer, managing all these pieces is exhausting. Every new service is another thing that can crash, another version to update, and another port to secure.

With Rails 8, we are entering the era of the "Zero-Service" Monolith. The goal is simple: your entire application should live inside a single Docker container and communicate with the world through one single port. No Redis, no Nginx, no headaches.

Here is how to collapse your stack into a single, powerful unit.

STEP 1: The "Solid" Trilogy (Deleting Redis)

In the past, Redis was mandatory for two things: background jobs (Sidekiq) and caching.

Rails 8 replaces Redis with the "Solid" gems. These tools use your existing database (Postgres, MySQL, or SQLite) to do the work that Redis used to do.

  1. Solid Queue: Handles your background jobs.
  2. Solid Cache: Handles your HTML fragment caching.
  3. Solid Cable: Handles your real-time WebSockets.

By switching to these, you can literally uninstall Redis from your server. Your background jobs now have the same "ACID" guarantees as your data, and you have one less service to monitor.

STEP 2: Thruster (Deleting Nginx)

Puma (the Rails web server) is great at running Ruby, but it isn't great at serving images or handling SSL certificates. That is why we always put Nginx in front of it.

Rails 8 includes a new tool called Thruster. It is a tiny, incredibly fast proxy written in Go that wraps around your Rails app.

Thruster handles:

  • HTTP/2: Speeds up loading for your users.
  • SSL (HTTPS): It manages your Let's Encrypt certificates automatically.
  • Asset Compression: It Gzips your CSS and JS files so they download faster.

Because Thruster is bundled into the Rails Docker image, you don't need to install or configure Nginx on your server anymore. You just point your domain to the container, and Thruster handles the rest.

STEP 3: The Single-Port Configuration

When you use Kamal 2 to deploy your Rails 8 app, it packages everything into one container.

In your deploy.yml, you no longer have to define "Sidecars" for Nginx or link to a Redis container. You just define your web server.

# config/deploy.yml
service: my-app
image: yourname/my-app

servers:
  web:
    - 123.45.67.89

proxy:
  ssl: true
  host: myapp.com
  # Everything enters through port 80/443 and goes straight 
  # to Thruster inside the container.

Enter fullscreen mode Exit fullscreen mode

When this container starts up, it boots Thruster, which boots Puma, which starts the background job workers. Every part of your app is now living in the same memory space, on the same timeline.

STEP 4: SQLite for the Win (Optional)

If you want to go for the "Ultimate Zero-Service" setup for a micro-SaaS or a side project, you can even skip the external Database server by using SQLite.

With the recent improvements in Rails 8, SQLite is production-ready for many use cases. If you use SQLite, your "database" is just a file inside your container. Combined with Litestream for backups, your entire "Cloud Empire" is now literally just one single Docker process running on a $5 VPS.

Why this is a game changer for you

  1. Mental Bandwidth: You only have to think about one thing. Is the container running? If yes, the whole app is working.
  2. Cheaper Hosting: You don't need a server with 16GB of RAM to run 5 different services. A small, cheap server is plenty.
  3. Faster Onboarding: When you hire a freelancer or use an AI to help you, they don't have to spend two hours setting up a complex local environment. They just run the app.

Summary

The "Zero-Service" Monolith isn't about being lazy; it's about being efficient. As a solo developer, every minute you spend configuring a Redis config file is a minute you aren't building features for your customers.

Rails 8 and Kamal 2 have made it possible to own your infrastructure without being a DevOps expert. One container, one port, one successful business.