Addons are really quite simple. Basically, it's a way for vendors to use Heroku's billing system to provision some 'add on' service that you might find useful.
Let's use Heroku Postgres as an example. It's the most popular addon available. As a user with a Heroku app, if you run the heroku addons:create heroku-postgresql
command, here's what happens:
- An API request is sent from your laptop to Heroku saying "provision a Heroku database for me!"
- Heroku gets this API request, and forwards it to the addon provider (Heroku Postgres in this case).
- Heroku Postgres gets a provision API request along with your Heroku app name, provisions a new database for you, and then sets some environment variables in your Heroku app (
DATABASE_URL
).
- From this point on, Heroku will start billing you for the Heroku Postgresql addon (depending on what plan you picked, and for how long you use it).
- Every month Heroku will then charge you money for your apps AND your addons, and pay the addon provider their cut of the money.
The main benefit to using addons as opposed to going to a database vendor's website directly, purchasing a database, and then creating your OWN environment variables is this:
- Unified billing. Heroku bills you for all the services you use in one place on one credit card. This is easier to track for a lot of companies.
- You get to use Heroku's support system to interact with ALL the vendors you use. This makes getting support a lot simpler.
- You are always guaranteed to pay for only what you use. If you provision a Heroku addon and then remove it 10 seconds later, you're only charged for 10 seconds worth of usage. If you buy a database from a vendor directly, they'll usually charge you in different ways which are usually more expensive for you.
To see the full addon API, you can check out this link: https://devcenter.heroku.com/articles/add-on-provider-api
In general, addons are just a nice convenient way of provisioning useful services you probably already use for your applications.
They provide no security benefits or drawbacks. They are completely neutral. Think of them as a convenience factor, they won't at all affect account security / etc.