Serverless is quite trendy nowadays. For those of us new to the Cloud game, Serverless is a way to deploy your apps without worrying about maintaining infrastructure. Imagine the LAMP stack (Linux, Apache, MySQL, and PHP). With serverless you only have to worry about the ‘P’ that is PHP. Linux (the operating system), Apache (the web server), and MySQL (the database) are all managed by the cloud service provider. Examples of modern serverless platforms include Heroku, Vercel, Fly.io, & AWS Elastic BeanStalk.
Great right? Yes great you and your developers can finally focus on just delivering your application. Correct, but it comes at a cost. How most of these platforms lure you in is with a free tier where you get a lot of features up front like automatic resource scaling but you need to pay-as-you-go and/or pay a tiny subscription. This seems innocent and even cost-effective to the fledgling development team who wants to get their product out there fast, but while infrastructure scales well with serverless your costs don’t. Cara.app is a cautionary tale, it might still be unprofitable from the huge serverless bill it accrued. Although you could use “spend management” like the one provided by Vercel.
There is another way to go “serverless” but with servers. Using projects like Coolify and Dokploy to manage your servers is a great alternative – let’s call them Open Source Serverless. There are other tools like Kamal and Dokku but I chose to look at Coolify and Dokploy because they have an easy-to-use Web Interface. Below I will be comparing traditional Serverless and Open Source Serverless (Coolify and Dokploy).
Features | Traditional Serverless (Netlify, Vercel, Heroku etc.) | Open Source Serverless (Coolify, Dokploy, Dokku etc.) |
---|---|---|
Cost | High cost from various types of charges | Cheap, can even run on a Raspberry Pi |
Vendor Lock-In | Yes | Very portable |
Maintenance | Easy to maintain, often custom-made for a particular development framework | Need some understanding of Nixpacks, Docker & the tool itself |
User Interface (UI) | Very good UI | Dokploy has a great interface but others could be better |
Customization & Optimization | Limited Options to optimize your infrastructure which is important as you scale | Unlimited options in terms of optimizing your infrastructure |
Open source | Limited | Yes, which makes your serverless infrastructure very customizable |
I currently use Open source serverless for my needs and I will go into details on my experience highlighting each point in the table above.
- Cost: The cost of Open source serverless (Coolify) in my experience is very cheap. I am only paying for my VPS servers since I am self-hosting. Max $20 monthly for two servers. This setup on other cloud providers will cost me an arm and a leg.
- Vendor Lock-In: I was able to try different Open source platforms before settling on one. No lock-in it’s Docker & Traefik with a dashboard and you can move your app somewhere else.
- Maintenance: This is where I spent a lot of time. Bringing over my app and setting up my custom infrastructure took some time and planning. I also encountered some bugs in the software – which I had to patch or fix manually.
- User Interface: For this, I looked at Vercel, Coolify & Dokploy. Vercel wins hands down it was so sleek and easy to get around. I was tempted but I resisted considering the costs. Coolify’s UI is all over the place and takes getting used to but it has the best features and services. Dokploy’s UI was okay although it had fewer features than Coolify.
- Customization & Optimization: This is where Coolify wins. I specifically choose Coolify for it ease of customization and it huge community. Whenever I ran into a roadblock I could easily go into the code and make changes. Using Dockerfile, Docker Compose & NixPacks, I could easily create my own services and deploy them.
- Open Source: The open-source nature of Coolify has attracted a huge community that helps with support and testing. For others like Vercel, you might not easily access and contribute to the project and it’s community.
In conclusion, use what is best for you, I would use this rule of thumb:
- Normal serverless like Vercel; if I have the funding, little time, and just want to focus on building apps.
- Open Source Serverless like Coolify; if I have time, limited funding, and going to support multiple types of services and apps.