Thank you so much for the feedback really appreciate it! 🙌
You're absolutely right as beginners, understanding why we use certain tools is just as important as learning how to use them. Here's a quick breakdown:
🌀 Why use Gunicorn instead of running Flask directly?
Flask’s built-in server (app.run()) is great for development but not meant for production. It lacks the robustness, speed, and process management needed under load.
Gunicorn is a WSGI-compliant production server it can handle multiple requests concurrently using workers and is far more reliable for real-world deployments.
🛡️ Why use PM2?
When we run a server using Gunicorn or Node, if the instance reboots or the process crashes, it stops running.
PM2 (Process Manager) keeps your app running in the background, restarts it if it fails, and can auto-start it on boot. It’s super helpful until you start managing apps with Docker or Kubernetes.
🔧 Why not just use Docker?
Docker is definitely a great next step! But for learning core DevOps concepts, doing manual deployments teaches:
What actually happens under the hood
Linux administration, file paths, networking, system services
How to debug and configure your apps before abstracting with containers
Once we master the fundamentals, Docker becomes way easier to grasp and use effectively.
Hope this helps clarify the reasoning behind the tool choices! 😊 Let me know if you'd like a follow up blog explaining this in more detail I'd be happy to write it!