{"_id":"5a8fae0368264c001f20cc19","category":{"_id":"5a8fae0368264c001f20cc06","version":"5a8fae0268264c001f20cc00","project":"5633ebff7e9e880d00af1a53","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-23T19:13:48.702Z","from_sync":false,"order":1,"slug":"quickstart-guides","title":"Bonsai Heroku Basics"},"project":"5633ebff7e9e880d00af1a53","user":"5633ec9b35355017003ca3f2","parentDoc":null,"version":{"_id":"5a8fae0268264c001f20cc00","project":"5633ebff7e9e880d00af1a53","__v":2,"createdAt":"2018-02-23T06:00:34.961Z","releaseDate":"2018-02-23T06:00:34.961Z","categories":["5a8fae0268264c001f20cc01","5a8fae0268264c001f20cc02","5a8fae0368264c001f20cc03","5a8fae0368264c001f20cc04","5a8fae0368264c001f20cc05","5a8fae0368264c001f20cc06","5a8fae0368264c001f20cc07","5a8fae0368264c001f20cc08","5a8fae0368264c001f20cc09","5abaa7eb72d6dc0028a07bf3"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-12-30T20:38:52.230Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Bonsai clusters can be provisioned in a couple of different ways. These instructions are for Heroku users. If you have an account on Bonsai.io or via Manifold, then you will not need these instructions. Instead, check out:\\n\\n* [Getting Started With Bonsai.io](doc:getting-started-with-bonsaiio) \\n* [Getting Started With Manifold](doc:getting-started-with-manifold)\",\n  \"title\": \"Hold up!\"\n}\n[/block]\nWhen it's time to scale, you can easily upgrade your shared plan, or migrate to a dedicated cluster.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"How to Update Your Cluster Plan\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Most plan changes take effect instantly. However, if you're trying to upgrade or downgrade across an architecture class, there will be a delay in processing. See [Migrating Across Architectures](doc:changing-your-plan#migrating-across-architectures) (below) for more information.\",\n  \"title\": \"Note on plan changes\"\n}\n[/block]\nUpdating your cluster plan with Heroku is fairly simple. You can do this in either of two ways:\n\n1. Through the Heroku CLI tool\n2. Through the Heroku UI - your app dashboard\n\n### Using the Command Line\n\nYou can view all of our available plans for Heroku users on the [Bonsai Heroku Add-on page](https://elements.heroku.com/addons):\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/7194131-heroku-bonsai-change-plan-1.png\",\n        \"heroku-bonsai-change-plan-1.png\",\n        951,\n        946,\n        \"#e1e3e6\"\n      ],\n      \"caption\": \"The Heroku addons page shows a list of all available plans. Note the slug in the black box at the bottom.\"\n    }\n  ]\n}\n[/block]\nFrom there, choose the plan you'd like to change your cluster to and note the plan slug. For example, our `Bonsai 10` has a plan slug of `shared-10`, our `Dedicated 80` has a slug of `dedicated-80`, etc. Open up your project in a terminal and run:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ heroku addons:upgrade bonsai:shared-10\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"If you have several applications with Bonsai Add-ons, you can specify which one you would like to upgrade or downgrade with the `-a` flag:\\n\\n```bash\\n$ heroku addons:upgrade bonsai:shared-10 -a mycoolelasticsearchapp\\n```\"\n}\n[/block]\n### Using the Heroku app Dashboard\n\nLog into your Heroku account and open your app dashboard. In this example, the app is called `mycoolelasticsearchapp`:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/d680f0e-heroku-dashboard-1.png\",\n        \"heroku-dashboard-1.png\",\n        2436,\n        762,\n        \"#f0f7f9\"\n      ]\n    }\n  ]\n}\n[/block]\nClick on the Resources tab to view your Add-ons:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/ce3fb4a-heroku-dashboard-2.png\",\n        \"heroku-dashboard-2.png\",\n        1292,\n        1248,\n        \"#eaf1f3\"\n      ]\n    }\n  ]\n}\n[/block]\nYou'll see a list of your Add-ons, with a carot menu on the far right side.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/9475f0f-heroku-remove-addon-1.png\",\n        \"heroku-remove-addon-1.png\",\n        2478,\n        962,\n        \"#ecf3f5\"\n      ]\n    }\n  ]\n}\n[/block]\nClicking on the carot icon will open up a dropdown menu, with `Edit plan` as an option:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/e0898d0-heroku-remove-addon-2.png\",\n        \"heroku-remove-addon-2.png\",\n        2438,\n        584,\n        \"#e9ebf0\"\n      ]\n    }\n  ]\n}\n[/block]\nThis will open a modal, and you can choose a new plan for your cluster:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/82ed014-heroku-bonsai-change-plan-2.png\",\n        \"heroku-bonsai-change-plan-2.png\",\n        1028,\n        874,\n        \"#9294ad\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"How Heroku Handles Billing\"\n}\n[/block]\nHeroku handles all of the billing, and [prorates by the second](https://devcenter.heroku.com/articles/add-ons). \n\nA contrived example: a customer signs up for a $50/mo plan at 00:00:00, then decides to upgrade to a $150 plan at 00:10:30, then downgrades back down to a $50 plan at 01:00:00, then destroys it at 02:45:00. The customer's bill would be roughly calculated as:\n\n* 630s on a $50/mo plan = $0.012\n* 2970s on a $150/mo plan = $0.17\n* 6300s on a $50/mo plan = $0.12\n* **Total: $0.30**\n\nThis amount would be added to the customer's next invoice from Heroku.\n[block:api-header]\n{\n  \"title\": \"Migrating Across Architectures\"\n}\n[/block]\nBonsai offers two main architecture classes: multitenant and single tenant. The multitenant class -- sometimes called \"shared\" -- is designed to allow clusters to share hardware resources while still being sandboxed from one another. This allows us to provide unparalleled performance per dollar in a way that's also extremely affordable.\n\nThe single tenant class -- sometimes called \"dedicated\" -- maps one cluster to a private set of hardware resources. Because these resources are not shared with any other cluster, single tenant configurations provide maximum performance for a slightly higher price. \n\nPlan changes within the multitenant class take place instantly. However, moving a cluster from one class to another will take some time. This is because data will need to be moved across a network boundary, and search resources may need to be created.\n\nIn other words, if a customer upgrades from a \"Shared\" plan to a \"Dedicated,\" the Bonsai app will need to provision and configure new private servers, wait for them to come online and pass health checks, then migrate their cluster's data out of the multitenant class and into their new single tenant class.\n\nAlternately, if a customer downgrades from a \"Dedicated\" plan to a \"Shared\" plan, a data migration will need to be performed, and the old servers torn down.\n\nThe time required for these migrations can vary. If you have questions or concerns, please send us a note at [support:::at:::bonsai.io](mailto:support@bonsai.io)","excerpt":"How to change your cluster's plan through Heroku.","slug":"changing-your-plan","type":"basic","title":"Changing Your Plan"}

Changing Your Plan

How to change your cluster's plan through Heroku.

[block:callout] { "type": "warning", "body": "Bonsai clusters can be provisioned in a couple of different ways. These instructions are for Heroku users. If you have an account on Bonsai.io or via Manifold, then you will not need these instructions. Instead, check out:\n\n* [Getting Started With Bonsai.io](doc:getting-started-with-bonsaiio) \n* [Getting Started With Manifold](doc:getting-started-with-manifold)", "title": "Hold up!" } [/block] When it's time to scale, you can easily upgrade your shared plan, or migrate to a dedicated cluster. [block:api-header] { "type": "basic", "title": "How to Update Your Cluster Plan" } [/block] [block:callout] { "type": "info", "body": "Most plan changes take effect instantly. However, if you're trying to upgrade or downgrade across an architecture class, there will be a delay in processing. See [Migrating Across Architectures](doc:changing-your-plan#migrating-across-architectures) (below) for more information.", "title": "Note on plan changes" } [/block] Updating your cluster plan with Heroku is fairly simple. You can do this in either of two ways: 1. Through the Heroku CLI tool 2. Through the Heroku UI - your app dashboard ### Using the Command Line You can view all of our available plans for Heroku users on the [Bonsai Heroku Add-on page](https://elements.heroku.com/addons): [block:image] { "images": [ { "image": [ "https://files.readme.io/7194131-heroku-bonsai-change-plan-1.png", "heroku-bonsai-change-plan-1.png", 951, 946, "#e1e3e6" ], "caption": "The Heroku addons page shows a list of all available plans. Note the slug in the black box at the bottom." } ] } [/block] From there, choose the plan you'd like to change your cluster to and note the plan slug. For example, our `Bonsai 10` has a plan slug of `shared-10`, our `Dedicated 80` has a slug of `dedicated-80`, etc. Open up your project in a terminal and run: [block:code] { "codes": [ { "code": "$ heroku addons:upgrade bonsai:shared-10", "language": "shell" } ] } [/block] [block:callout] { "type": "info", "body": "If you have several applications with Bonsai Add-ons, you can specify which one you would like to upgrade or downgrade with the `-a` flag:\n\n```bash\n$ heroku addons:upgrade bonsai:shared-10 -a mycoolelasticsearchapp\n```" } [/block] ### Using the Heroku app Dashboard Log into your Heroku account and open your app dashboard. In this example, the app is called `mycoolelasticsearchapp`: [block:image] { "images": [ { "image": [ "https://files.readme.io/d680f0e-heroku-dashboard-1.png", "heroku-dashboard-1.png", 2436, 762, "#f0f7f9" ] } ] } [/block] Click on the Resources tab to view your Add-ons: [block:image] { "images": [ { "image": [ "https://files.readme.io/ce3fb4a-heroku-dashboard-2.png", "heroku-dashboard-2.png", 1292, 1248, "#eaf1f3" ] } ] } [/block] You'll see a list of your Add-ons, with a carot menu on the far right side. [block:image] { "images": [ { "image": [ "https://files.readme.io/9475f0f-heroku-remove-addon-1.png", "heroku-remove-addon-1.png", 2478, 962, "#ecf3f5" ] } ] } [/block] Clicking on the carot icon will open up a dropdown menu, with `Edit plan` as an option: [block:image] { "images": [ { "image": [ "https://files.readme.io/e0898d0-heroku-remove-addon-2.png", "heroku-remove-addon-2.png", 2438, 584, "#e9ebf0" ] } ] } [/block] This will open a modal, and you can choose a new plan for your cluster: [block:image] { "images": [ { "image": [ "https://files.readme.io/82ed014-heroku-bonsai-change-plan-2.png", "heroku-bonsai-change-plan-2.png", 1028, 874, "#9294ad" ] } ] } [/block] [block:api-header] { "title": "How Heroku Handles Billing" } [/block] Heroku handles all of the billing, and [prorates by the second](https://devcenter.heroku.com/articles/add-ons). A contrived example: a customer signs up for a $50/mo plan at 00:00:00, then decides to upgrade to a $150 plan at 00:10:30, then downgrades back down to a $50 plan at 01:00:00, then destroys it at 02:45:00. The customer's bill would be roughly calculated as: * 630s on a $50/mo plan = $0.012 * 2970s on a $150/mo plan = $0.17 * 6300s on a $50/mo plan = $0.12 * **Total: $0.30** This amount would be added to the customer's next invoice from Heroku. [block:api-header] { "title": "Migrating Across Architectures" } [/block] Bonsai offers two main architecture classes: multitenant and single tenant. The multitenant class -- sometimes called "shared" -- is designed to allow clusters to share hardware resources while still being sandboxed from one another. This allows us to provide unparalleled performance per dollar in a way that's also extremely affordable. The single tenant class -- sometimes called "dedicated" -- maps one cluster to a private set of hardware resources. Because these resources are not shared with any other cluster, single tenant configurations provide maximum performance for a slightly higher price. Plan changes within the multitenant class take place instantly. However, moving a cluster from one class to another will take some time. This is because data will need to be moved across a network boundary, and search resources may need to be created. In other words, if a customer upgrades from a "Shared" plan to a "Dedicated," the Bonsai app will need to provision and configure new private servers, wait for them to come online and pass health checks, then migrate their cluster's data out of the multitenant class and into their new single tenant class. Alternately, if a customer downgrades from a "Dedicated" plan to a "Shared" plan, a data migration will need to be performed, and the old servers torn down. The time required for these migrations can vary. If you have questions or concerns, please send us a note at [support@bonsai.io](mailto:support@bonsai.io)