Routing Workloads for Immediate Placement

Routing Workloads for Immediate Placement

#340140

This use case determines the optimal host and datastore placement of one or more Workloads for immediate deployment in the cloud infrastructure.

A common scenario for this use case is initiated when a user makes a request to a cloud provisioning portal to provision one or more virtual machines. The cloud provisioning system, in turn, queries Densify for the best placements for the incoming Workload demand. Based on the results of the query to Densify, the cloud provisioning system is able to start the guests on the appropriate hosts in the cloud infrastructure.

To perform this process through the Densify API, follow the sections below:

  1. Describing Workloads to Place
  2. Submitting Routing Request
  3. Polling for Routing Results
  4. Placing the VMs

Describing Workloads to Place

Use the /workloads resource to create one or more Workload definitions which describe the capacity requirements for new instances that will be started. The descriptions include the name, a reference system that acts like a clone to copy, resource allocations, and attributes for each Workload to be placed.

The following example request creates 2 workloads named vm1 and vm2. They both resemble the Reference System of a "lin-small-2gb" machine, having a single disk defined by default. The other elements describe the resource allocations.

If the request to create the Workload is successful, the response includes a Workload object with an ID, Name and Self Reference (id, name, href) that can be used to build a subsequent request to route the Workloads. For more information about the format of the Workload response, see Workloads.

Submitting Routing Request

Use the /routing-requests resource to submit a request to route the Workloads to the optimal environment, hosting venue, hosts and datastores according to resource requirements, current utilization patterns, business constraints, and other policy considerations.

The Routing Request is evaluated against all available hosting venues and datastores according to cost, capacity and Fit-for-Purpose validation, as described later in Routing Requests–Available Capacity Query. The Workloads are routed to a hosting venue where the aggregate utilization of all Workloads fit and the policy constraints are satisfied. The Workloads may be routed and placed on different hosts and datastores within the hosting venue.

The Routing Request can optionally include a subset of hosting venues to consider. This limits the scope of the routing algorithm to only the specified hosting venues. See the Routing Requests: Examples on how to define the scopes element.

Once the Routing Request has been created, the Routing Request object contains an ID, Name and Self Reference (id, name, href) that can be used to query for status. For more information about the format of the Routing Request response, see Routing Requests.

Polling for Routing Results

Creating the Routing Request is asynchronous, allowing API callers to handle lost connections and subsequently reconnect to obtain the results of the Routing Request.

When the Routing Request for immediate placement is fully processed, the state of the Routing Request is set from ANALYZING to one of:

  • PLACEDDensify has routed, reserved space, and found a host/sensor placement for all the Workloads specified in the Routing Request. All Workloads are updated to PLACED.
  • REJECTEDDensify could not route, reserve space, or find a host/sensor for at least one Workload specified in the Routing Request.

Placing the VMs

If the Workloads were successfully routed and optimal host/datastore placement determined, the caller can query each Workload for its routing details, including the target environment, hosting venue, and host/sensor placement. The Workload (guest) can then be started on the specified host.