{"_id":"5ae39458ad609b000336c81d","project":"5633ebff7e9e880d00af1a53","version":{"_id":"5a8fae0268264c001f20cc00","project":"5633ebff7e9e880d00af1a53","__v":4,"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","5b8ee7842790f8000333f9ba","5b8ee8f244a21a00034b5cd9"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0"},"category":{"_id":"5a8fae0368264c001f20cc04","version":"5a8fae0268264c001f20cc00","project":"5633ebff7e9e880d00af1a53","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-05-31T04:26:39.925Z","from_sync":false,"order":5,"slug":"versions","title":"Bonsai.io Platform"},"user":"5637d336aa96490d00a64f81","githubsync":"","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-04-27T21:21:28.596Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"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 securely sandboxed from one another. This allows us to provide unparalleled performance per dollar at smaller scales. All Hobby and Standard plans use multitenant architecture.\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, security and customization. All Business and Enterprise plans use dedicated architecture.\n\n\n[block:api-header]\n{\n  \"title\": \"Multi Tenant Class\"\n}\n[/block]\nBonsai's multitenant class utilizes some sandboxing features built into Elasticsearch. This allows the service to run multiple clusters on a single instance of Elasticsearch per node. This approach saves substantial hardware and network resources, and allows for radical cost savings especially for students, hobbyists, startups, projects in development, small businesses, and so on.\n\nA great benefit of this approach is that Bonsai is able to provide some really nice features out of the box, for no additional cost: all multitenant clusters -- even the free ones -- are running on 3 nodes. They also get industry standard SSL/TLS and HTTP Basic authentication (see [Security](doc:security) for more information), which keeps your data safe. Plus, the [Bonsai dashboard](doc:managing-your-cluster) offers plenty of tools for monitoring, managing, and engaging with your cluster.\n\nBecause these clusters are running on a shared Elasticsearch instance, there are also a few limitations. For one, certain [API endpoints](doc:bonsai-unsupported-actions) and actions are unavailable for security and performance reasons. [Snapshots](doc:how-bonsai-manages-snapshots) and [plugins](doc:plugins) are not manageable by users to avoid collisions and regressions. And usage is metered about how you'd expect for a free/low-cost SaaS.\n\nClusters on the multitenant class can often be identified by their plan name. \"Hobby\", \"Staging\", \"Production\", and \"Shared\" are all terms used by plans running on a multitenant architecture.\n[block:api-header]\n{\n  \"title\": \"Single Tenant Class\"\n}\n[/block]\nBonsai's single tenant class has a fairly standard configuration. The cluster is simply one or more nodes (three by default), each running Elasticsearch. These nodes are physically isolated and on a different network than those running multitenant clusters. This means that all available IO on the nodes is always 100% allocated to your cluster.\n\nThis approach offers all of the same benefits as the multitenant class: you get the same industry standard SSL/TLS and HTTP Basic authentication (see [Security](doc:security) for details), and the [Bonsai dashboard](doc:managing-your-cluster). In addition, the isolated environment is suitable for encryption at rest and [VPC Peering](doc:heroku-private-spaces-vpc-peering) (for applications with stringent security requirements).\n\nFurthermore, this class offer extremely flexible deployments and scaling. Need it in a region we don't support on the multitenant class? No problem! Have a plugin or script that is vital to your operation? We can package it into our deployment! [Let us know](mailto: support:::at:::bonsai.io) what you need, and we can provide a quote.\n\nAlso, because this class is highly secure and customizable, we are also able to support amendments to our terms of service and privacy policy, custom SLAs and more. [Contact us](mailto:support@bonsai.io) for questions and quotes.\n[block:api-header]\n{\n  \"title\": \"Trade Offs\"\n}\n[/block]\nThis article details the differences between the two architectures we offer. There are a number of trade offs between these classes, summarized below:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Class\",\n    \"h-1\": \"Pros\",\n    \"h-2\": \"Cons\",\n    \"0-0\": \"Multitenant\",\n    \"1-0\": \"Single Tenant\",\n    \"0-1\": \"- Extremely cost effective\\n- Great performance for the money\\n- Can scale up or down on demand\",\n    \"1-2\": \"- More expensive to operate\\n- Scaling can be more difficult\",\n    \"0-2\": \"- Limits on usage (disk, memory, connections, etc)\\n- Can not install and run arbitrary plugins\\n- Noisy neighbors*\\n- VPC pairing and at-rest encryption not available\\n- Subject to general terms of service and privacy policy\",\n    \"1-1\": \"- Extremely powerful\\n- No metering on usage\\n- Can deploy arbitrary plugins\\n- No noisy neighbors*\\n- Can have at-rest encryption\\n- VPC Pairing\\n- Custom terms, SLAs, etc\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]\n\\* The Noisy Neighbor Problem is a well-known issue that occurs in multitenant architectures. In this context, one or more clusters may inadvertently monopolize IO resources (CPU, network, memory, etc), which can adversely affect other users on the same nodes. Bonsai actively monitors and addresses these situations when they come up, although the issue is frequently transient and resolves itself within a few minutes. Single tenant architectures do not suffer from this issue.\n[block:api-header]\n{\n  \"title\": \"Why Not Containers / VMs?\"\n}\n[/block]\nA frequent question that comes up when talking about our various service architectures is why we don't use container or virtualization technologies. A service that incorporates these technologies would offer some nice benefits, like allowing users to install their [own plugins](doc:plugins) and manage their [own snapshots](doc:how-bonsai-manages-snapshots).\n\nThe simple answer is \"overhead.\" Running containers -- and especially VMs -- requires system resources via some orchestration daemon or hypervisor. And simply running multiple instances of Elasticsearch on a node would require multiple JREs, which wastes resources through duplication. \n\nAny resources that are allocated towards management of environments are therefore unavailable for Elasticsearch to use. In comparison to an architecture that doesn't have this overhead, the provider must either offer less performance for the money, or charge more money for the same performance.\n\nThere is also a practical aspect to Bonsai eschewing containers and virtual machines. It is impossible to provide _both_ great support _and_ absolute customization. For example, users who install their own plugins can introduce a variety of regressions into Elasticsearch's performance and behavior. When they open a support ticket, the agent must either spend time bug squashing or decline assistance altogether. Being opinionated allows our team to focus on depth of knowledge rather than breadth, which leads to faster, higher quality resolutions.\n\nFinally, there is a philosophical motivation for how we built the service. We want to make Elasticsearch accessible to people at all stages of development; from the hobbyists and students, all the way up to the billion dollar unicorns. And we want to make sure that it's the best possible experience. This means being opinionated about certain features, and taking a more active role in managing the infrastructure.","excerpt":"","slug":"architecture-classes","type":"basic","title":"Bonsai's Architectures"}

Bonsai's Architectures


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 securely sandboxed from one another. This allows us to provide unparalleled performance per dollar at smaller scales. All Hobby and Standard plans use multitenant architecture. 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, security and customization. All Business and Enterprise plans use dedicated architecture. [block:api-header] { "title": "Multi Tenant Class" } [/block] Bonsai's multitenant class utilizes some sandboxing features built into Elasticsearch. This allows the service to run multiple clusters on a single instance of Elasticsearch per node. This approach saves substantial hardware and network resources, and allows for radical cost savings especially for students, hobbyists, startups, projects in development, small businesses, and so on. A great benefit of this approach is that Bonsai is able to provide some really nice features out of the box, for no additional cost: all multitenant clusters -- even the free ones -- are running on 3 nodes. They also get industry standard SSL/TLS and HTTP Basic authentication (see [Security](doc:security) for more information), which keeps your data safe. Plus, the [Bonsai dashboard](doc:managing-your-cluster) offers plenty of tools for monitoring, managing, and engaging with your cluster. Because these clusters are running on a shared Elasticsearch instance, there are also a few limitations. For one, certain [API endpoints](doc:bonsai-unsupported-actions) and actions are unavailable for security and performance reasons. [Snapshots](doc:how-bonsai-manages-snapshots) and [plugins](doc:plugins) are not manageable by users to avoid collisions and regressions. And usage is metered about how you'd expect for a free/low-cost SaaS. Clusters on the multitenant class can often be identified by their plan name. "Hobby", "Staging", "Production", and "Shared" are all terms used by plans running on a multitenant architecture. [block:api-header] { "title": "Single Tenant Class" } [/block] Bonsai's single tenant class has a fairly standard configuration. The cluster is simply one or more nodes (three by default), each running Elasticsearch. These nodes are physically isolated and on a different network than those running multitenant clusters. This means that all available IO on the nodes is always 100% allocated to your cluster. This approach offers all of the same benefits as the multitenant class: you get the same industry standard SSL/TLS and HTTP Basic authentication (see [Security](doc:security) for details), and the [Bonsai dashboard](doc:managing-your-cluster). In addition, the isolated environment is suitable for encryption at rest and [VPC Peering](doc:heroku-private-spaces-vpc-peering) (for applications with stringent security requirements). Furthermore, this class offer extremely flexible deployments and scaling. Need it in a region we don't support on the multitenant class? No problem! Have a plugin or script that is vital to your operation? We can package it into our deployment! [Let us know](mailto: support@bonsai.io) what you need, and we can provide a quote. Also, because this class is highly secure and customizable, we are also able to support amendments to our terms of service and privacy policy, custom SLAs and more. [Contact us](mailto:support@bonsai.io) for questions and quotes. [block:api-header] { "title": "Trade Offs" } [/block] This article details the differences between the two architectures we offer. There are a number of trade offs between these classes, summarized below: [block:parameters] { "data": { "h-0": "Class", "h-1": "Pros", "h-2": "Cons", "0-0": "Multitenant", "1-0": "Single Tenant", "0-1": "- Extremely cost effective\n- Great performance for the money\n- Can scale up or down on demand", "1-2": "- More expensive to operate\n- Scaling can be more difficult", "0-2": "- Limits on usage (disk, memory, connections, etc)\n- Can not install and run arbitrary plugins\n- Noisy neighbors*\n- VPC pairing and at-rest encryption not available\n- Subject to general terms of service and privacy policy", "1-1": "- Extremely powerful\n- No metering on usage\n- Can deploy arbitrary plugins\n- No noisy neighbors*\n- Can have at-rest encryption\n- VPC Pairing\n- Custom terms, SLAs, etc" }, "cols": 3, "rows": 2 } [/block] \* The Noisy Neighbor Problem is a well-known issue that occurs in multitenant architectures. In this context, one or more clusters may inadvertently monopolize IO resources (CPU, network, memory, etc), which can adversely affect other users on the same nodes. Bonsai actively monitors and addresses these situations when they come up, although the issue is frequently transient and resolves itself within a few minutes. Single tenant architectures do not suffer from this issue. [block:api-header] { "title": "Why Not Containers / VMs?" } [/block] A frequent question that comes up when talking about our various service architectures is why we don't use container or virtualization technologies. A service that incorporates these technologies would offer some nice benefits, like allowing users to install their [own plugins](doc:plugins) and manage their [own snapshots](doc:how-bonsai-manages-snapshots). The simple answer is "overhead." Running containers -- and especially VMs -- requires system resources via some orchestration daemon or hypervisor. And simply running multiple instances of Elasticsearch on a node would require multiple JREs, which wastes resources through duplication. Any resources that are allocated towards management of environments are therefore unavailable for Elasticsearch to use. In comparison to an architecture that doesn't have this overhead, the provider must either offer less performance for the money, or charge more money for the same performance. There is also a practical aspect to Bonsai eschewing containers and virtual machines. It is impossible to provide _both_ great support _and_ absolute customization. For example, users who install their own plugins can introduce a variety of regressions into Elasticsearch's performance and behavior. When they open a support ticket, the agent must either spend time bug squashing or decline assistance altogether. Being opinionated allows our team to focus on depth of knowledge rather than breadth, which leads to faster, higher quality resolutions. Finally, there is a philosophical motivation for how we built the service. We want to make Elasticsearch accessible to people at all stages of development; from the hobbyists and students, all the way up to the billion dollar unicorns. And we want to make sure that it's the best possible experience. This means being opinionated about certain features, and taking a more active role in managing the infrastructure.