Service Distribution Across Your Nodes

What Are Provisioning Attributes and Why Do I Need Them?

Let's consider the following situation. When you planned your cloud business, you probably distinguished your hardware abilities by purposes. For example, a part of your machines will host customer webspaces, and another part, for storing customer databases, and so on. Webspace generally refers to the amount of disk space on a web server that is allocated to website owners by providers. But how can we stick to the planned scheme, when the services are created and provisioned automatically at the moment the customer's payment is approved and a subscription is activated? This is where auto-provisioning comes into play.

How Does Auto-Provisioning Work in CloudBlue Commerce?

  1. A customer goes to an online store and buys a service plan.
  2. The customer's order is processed and approved.
  3. CloudBlue Commerce is tasked with providing the resources included in the service plan, that is, alloting disk space, creating a database, activating a mail service, filling in the DNS records, and so on.
  4. CloudBlue Commerce starts to scan the network for the hardware nodes or virtual servers that have all the necessary packages to provide a service there. Let's suppose that the task is to provide a webspace. The Webspace service needs a hardware node or a virtual server with the Apache web server installed and CloudBlue Commerce finds four such nodes.
  5. Each host should be marked as ready to provide the service, otherwise the system will not consider them for provisioning. Let's suppose that one of the nodes is not marked as ready to provide. So, only three are left.
  6. Now CloudBlue Commerce selects the least loaded of them and creates a webspace there.

But as you know, the Apache service is installed not only on servers intended for hosting customer webspaces. It is also installed on the UI server. So, theoretically, CloudBlue Commerce can place a webspace there, if this host is considered the least loaded at that moment.

The following figure illustrates how a webspace can be improperly provisioned if there are no provisioning attributes.

To avoid such situations when a service is provisioned "not in the right place", the provisioning attributes mechanism was developed. You "mark" the resource (more precisely, resource type) to be provided with a special label. The same label is marked on the hardware node or virtual server where this resource should be placed.

The second scheme shows how provisioning would work if we used the provisioning attributes mechanism.

The next reason why you would need attributes is for when you want to distinguish hosting services according to the quality of service.

Let's assume you have two groups of servers: the machines from the first group are very fast, reliable, capacious, and expensive. The second group is less powerful and less expensive. So, you decide to create two hosting plans: for example, "Gold Hosting Plan" and "Silver Hosting Plan." The "Gold Plan" will be provisioned in the first group, the "Silver Plan" in the second group.

How will you distinguish the servers according to your hosting plans? You can use the same attribute mechanism.

You can create two sets of resource types and two attributes: "gold" and "silver". Then, you can mark the resources of the first set as well as the servers from the first group with the "gold" attribute, and mark the resources of the second set and the machines of the second group, which is less powerful, – with the "silver" attribute. After that, create the "Gold" service template and include the resources marked with the "gold" attribute in it, and do the same for the "Silver" service template.

The scheme serves as an example of this scenario:

As you can see, the resources marked only with the "gold" attribute are included in the "Gold Hosting Plan". These resources will be provisioned on powerful servers because they are marked with the same attribute.

So, attributes serve to "link" resources with the hardware nodes or virtual servers on which these resources should be provisioned.

Important: The same mechanism is provided for databases. Suppose you have several database servers of the same type (MySQL or PostgreSQL) in the system. If a customer adds a new database, this database will be created on any of the servers so that the number of databases is equally distributed among the servers.