Hey, I'm Marco and welcome to my newsletter!
As a software engineer, I created this newsletter to share my first-hand knowledge of the development world. Each topic we will explore will provide valuable insights, with the goal of inspiring and helping all of you on your journey.
In this episode I want to show you the add-ons I use on Heroku, they are the result of use in various projects and I chose them with the goal of minimizing cost and maximizing benefit.
1) 🛠️ Heroku add-ons
Sometimes, when we set up a server or a web app, we need extra services like databases and caches. I've found a handy solution: using Heroku add-ons directly. They might cost a bit more, but they make the setup process a lot smoother. This flexibility allows us to think about switching to other platforms or self-hosting as our application grows more mature.
The initial benefit is that we don't have to deal with complex system configurations, which I find pretty boring.
The add-ons I'll be sharing cover:
Database
Cache
Search engines
Cron scheduler
Logging system
If you need help deploying a Node.js app on Heroku, I've got a guide for you. Check it out here:
2) 🗄️ Database
When it comes to databases, there are different add-ons available for both relational and non-relational databases. In my projects, I usually go for relational databases, and I think the most cost-effective option is Heroku Postgres.
1) Heroku Postgres
This is a PostgreSQL database on Heroku, an open-source system with 35+ years of development. It's known for being reliable, feature-rich, and fast, offering cool stuff like partial indexes and materialized views.
The Mini plan, at $5/month, suits small projects with 10,000 rows and 1 GB storage. If you need more, the Basic plan is $9/month, giving you 10 million records and 10 GB storage. What's great about Heroku is you can switch plans without losing data. That way, you only pay for what you actually need.
Here all the details: https://elements.heroku.com/addons/heroku-postgresql
2) JawsDB MySQL
JawsDB provides a MySQL database, and it's cool because it has a free plan, perfect for trying things out or starting off. You can store records up to 5 megabytes. If you're considering the $10 plan with 1 gigabyte storage, I'd suggest checking out Heroku Postgres add-ons instead.
find all the details here: https://elements.heroku.com/addons/jawsdb
3)⚡Cache
For caching, I've tried both Memcached and Redis. In my projects, I always go with Redis because it's more comprehensive, it supports various data structures and atomic operations, which are handy for things like managing concurrency.
Redis Cloud
Redis Cloud is a simple way to create and handle fast, scalable apps. It has a free plan that lets you store up to 30 megabytes of data. If you need more, you can upgrade to plans with 100MB and beyond.
Find all the details here: https://elements.heroku.com/addons/rediscloud
4) 🔍 Search engine
For searching, let's talk about Elasticsearch. It's a strong open-source engine built to handle big data in real time. It's great for applications needing fast and flexible data retrieval, with features like full-text search, scalability, and robust data analysis capabilities.
Bonsai Elasticsearch
Bonsai Elasticsearch is Heroku's first Elasticsearch tool. The free plan lets you store up to 35,000 documents within 125 megabytes. If you need more, you can jump to the next plan for $10 a month, which allows up to 100,000 documents and 1 gigabyte of storage.
You can find details here: https://elements.heroku.com/addons/bonsai
5) ⏲️ Cron scheduler
Heroku cron schedulers are handy add-ons that let you run commands regularly. They come in both free and paid versions.
1) Heroku Scheduler
This add-on is free and allows you to execute commands.
Every 10 minutes
Every hour at a specific minute
Every day at a specific hour
https://devcenter.heroku.com/articles/scheduler
2) Advanced Scheduler
Advanced Scheduler is a stronger add-on than the one before, letting you set more specific times, start tasks faster, and retry jobs if they fail. It has a free plan for up to 100 runs and then a Premium plan for $15 per month, giving you 50,000 runs per month.
https://elements.heroku.com/addons/advanced-scheduler
6)📝 Logging system
A log storage system is important because it keeps a history of server activities, helping troubleshoot and identify problems.
Papertrail
See log activity at a glance with visualizations for new or saved searches. Quickly spot patterns or issues, making error troubleshooting faster.
The free plan lets you store up to 10 megabytes per day for the last 7 days. For more capacity, there's an $8 per month plan that increases the daily limit to 65 megabytes and keeps logs for 1 year.
Details here: https://elements.heroku.com/addons/papertrail
And that’s it for today! If you are finding this newsletter valuable, consider doing any of these:
🍻 Read with your friends — Implementing lives thanks to word of mouth. Share the article with someone who would like it.
📣 Provide your feedback - We welcome your thoughts! Please share your opinions or suggestions for improving the newsletter, your input helps us adapt the content to your tastes.
I wish you a great day! ☀️
Marco