This topic tells you how operators can set resource quotas for VMware Tanzu RabbitMQ for Tanzu Application Service services.

On-Demand provisioning is intended to accelerate app development by eliminating the need for development teams to request and wait for operators to create a service instance. However, to control costs, operations teams and administrators must ensure responsible use of resources.

There are many ways to control the provisioning of on-demand service instances by setting various quotas at these levels:

After you set quotas, you can:

Create Global-Level Quotas

Each on-demand service has a separate service broker. A global quota at the service level sets the maximum number of service instances that can be created by a given service broker. If a service has more than one plan, then the number of service instances for all plans combined cannot exceed the global quota for the service.

You set a global quota for each service tile independently. For example, if you have two service tiles, you must set a separate global service quota for each of them.

When the global quota is reached for a service, no more instances of that service can be created unless the quota is increased, or some instances of that service are deleted.

Create Plan-Level Quotas

A service might offer one or more plans. You can set a separate quota per plan so that instances of that plan cannot exceed the plan quota. For a service with multiple plans, the total number of instances created for all plans combined cannot exceed the global quota for the service.

When the plan quota is reached, no more instances of that plan can be created unless the plan quota is increased or some instances of that plan are deleted.

Create and Set Org-Level Quotas

An org-level quota applies to all on-demand services and sets the maximum number of service instances an organization can create within their foundation. For example, if you set your org-level quota to 100, developers can create up to 100 service instances in that org using any combination of on-demand services.

When this quota is met, no more service instances of any kind can be created in the org unless the quota is increased or some service instances are deleted.

To create and set an org-level quota:

  1. Run this command to create a quota for service instances at the org level:

    cf create-org-quota QUOTA-NAME -m TOTAL-MEMORY -i INSTANCE-MEMORY -r ROUTES -s SERVICE-INSTANCES --allow-paid-service-plans
    

    Where:

    • QUOTA-NAME—A name for this quota
    • TOTAL-MEMORY—Maximum memory used by all service instances combined
    • INSTANCE-MEMORY—Maximum memory used by any single service instance
    • ROUTES—Maximum number of routes allowed for all service instances combined
    • SERVICE-INSTANCES—Maximum number of service instances allowed for the org

    For example:

    $ cf create-org-quota myquota -m 1024mb -i 16gb -r 30 -s 50 --allow-paid-service-plans
  2. Associate the quota that you created with a specific org by running:

    cf set-org-quota ORG-NAME QUOTA-NAME
    

    For example:

    $ cf set-org-quota dev_org myquota

For more information about managing org-level quotas, see Creating and modifying quota plans.

Create and Set Space-Level Quotas

A space-level service quota applies to all on-demand services and sets the maximum number of service instances that can be created within a given space in a foundation. For example, if you set your space-level quota to 100, developers can create up to 100 service instances in that space using any combination of on-demand services.

When this quota is met, no more service instances of any kind can be created in the space unless the quota is updated or some service instances are deleted.

To create and set a space-level quota:

  1. Run the following command to create the quota:

    cf create-space-quota QUOTA-NAME -m TOTAL-MEMORY -i INSTANCE-MEMORY -r ROUTES -s SERVICE-INSTANCES --allow-paid-service-plans
    

    Where:

    • QUOTA-NAME—A name for this quota
    • TOTAL-MEMORY—Maximum memory used by all service instances combined
    • INSTANCE-MEMORY—Maximum memory used by any single service instance
    • ROUTES—Maximum number of routes allowed for all service instances combined
    • SERVICE-INSTANCES—Maximum number of service instances allowed for the org

    For example:

    $ cf create-space-quota myspacequota -m 1024mb -i 16gb -r 30 -s 50 --allow-paid-service-plans
  2. Associate the quota you created with a specific space by run:

    cf set-space-quota SPACE-NAME QUOTA-NAME
    

    For example:

    $ cf set-space-quota myspace myspacequota

For more information about managing space-level quotas, see Creating and modifying quota plans.

View Current Org and Space-Level Quotas

To view org quotas, run:

cf org ORG-NAME

To view space quotas, run:

cf space SPACE-NAME

For more information about managing org and space-level quotas, see the Creating and modifying quota plans.

Monitor Quota Use and Service Instance Count

Service-level and plan-level quota use, and total number of service instances, are available through the on-demand broker metrics emitted to Loggregator.

These are the listed metrics:

Metric Name Description
on-demand-broker/SERVICE-NAME/quota_remaining Quota remaining for all instances across all plans
on-demand-broker/SERVICE-NAME/PLAN-NAME/
quota_remaining
Quota remaining for a specific plan
on-demand-broker/SERVICE-NAME/total_instances Total instances created across all plans
on-demand-broker/SERVICE-NAME/PLAN-NAME/
total_instances
Total instances created for a specific plan

Important Quota metrics are not emitted if no quota was set.

You can also view service instance use information in Apps Manager. For more information, see Reporting instance usage with Apps Manager.

Calculate Resource Costs for On-Demand Plans

On-Demand plans use dedicated VMs, disks, and various other resources from an IaaS, such as AWS. To calculate maximum resource cost for plans individually or combined, you multiply the quota by the cost of the resources selected in the plan configurations. The costs depend on your IaaS.

To view configurations for your Tanzu RabbitMQ for Tanzu Application Service on-demand plan:

  1. Go to Ops Manager Installation Dashboard > VMware Tanzu RabbitMQ for Tanzu Application Service > Settings.

The following image shows an example that includes the VM type and persistent disk selected for the server VMs, and the quota for this plan.

Although operators can limit on-demand instances with plan quotas and a global quota, as described earlier, IaaS resource use varies based on the number of on-demand instances provisioned.

Calculate Maximum Resource Cost per On-Demand Plan

To calculate the maximum cost of VMs and persistent disk for each plan, do the calculation as shown here:

plan quota x cost of selected resources

For example, if you selected the options shown in the image, you selected a VM type micro and a persistent disk type 20 GB, and the plan quota is 15. The VM and persistent disk types have an associated cost for the IaaS you are using. Therefore, to calculate the maximum cost of resources for this plan, multiply the cost of the resources selected by the plan quota:

(15 x cost of micro VM type) + (15 x cost of 20 GB persistent disk) = max cost per plan

Calculate Maximum Resource Cost for All On-Demand Plans

To calculate the maximum cost for all plans combined, add together the maximum costs for each plan. Ensure that the sum of your individual plan quotas is less than the global quota.

For example:

(plan1 quota x plan1 resource cost) + ( plan2 quota x plan2 resource cost) = max cost for all plans

Calculate Actual Resource Cost of All On-Demand Plans

To calculate the current actual resource cost across all your on-demand plans:

  1. Find the number of instances provisioned for each active plan by looking at the total_instance metric for that plan.

  2. Multiply the total_instance count for each plan by that plan’s resource costs. Record the costs for each plan.

  3. Add up the costs noted in Step 2 to get your total current resource costs.

For example:

(plan1 total_instances x plan1 resource cost) + (plan2 total_instances x plan2 resource cost) = current cost for all plans

check-circle-line exclamation-circle-line close-line
Scroll to top icon