Shared-VM Service Offering

Note: Pivotal Platform is now part of VMware Tanzu. In v2.4 and later, Redis for Pivotal Platform is named Redis for VMware Tanzu Application Service.

Page last updated:

Redis for VMware Tanzu Application Service offers on-demand and shared-VM service plans. This section describes the architecture, lifecycle, and configurations of the shared-VM plan. For similar information for the on-demand service plan, see On-Demand Service Offering.

About the Shared-VM Plan

The shared-VM plan is a pre-provisioned service plan for development and testing purposes only. An instance of this plan provisions a single Redis process on a single shared VM. This plan is suitable for workloads that do not require dedicated hardware. This plan is not suitable for production purposes.

Architecture Diagram for Shared Plans

This diagram shows the architecture of the service broker and shared-VM plans and how the user’s app binds to a Redis instance.

The service broker is shown with six shared-VM plan instances. A user's app points to one of the shared VM plan instances. See below for a detailed image description.

The Redis service broker points to a shared-VM plan instance, which was created by running cf create-service. For more information about this command, see Create a Redis for Tanzu Application Service Service Instance in Using Redis for VMware Tanzu Application Service.

The service broker VM contains the shared-VM plan instances. Six shared-VM plan instances are shown. These are provisioned when created by the app developer. The maximum number is specified by the operator.

Each shared instance has its own Redis server, with credentials stored in the VCAP_SERVICES environment variable.

The user’s app is shown pointing to a shared-VM plan instance with an arrow labeled binding. For information about binding, see Bind a Service Instance to Your App in Using Redis for VMware Tanzu Application Service.

Settings for Shared-VM Service Plans

You cannot change the default Redis settings for shared-VM plans. Because of this, you cannot run cf update-service with the -c flag to set config parameters, as described in the Cloud Foundry documentation.

The default Redis settings are as follows:

Memory Policy

Redis is configured with a maxmemory-policy of no-eviction. This policy means that when the memory is full, the service does not evict any keys or perform any write operations until memory becomes available.


Shared-VM Redis supports both Redis Database Backup (RDB) and Append-Only File (AOF) persistence options. Redis writes to the AOF log every second. For more information, see Redis Persistence in the Redis documentation.

Maximum Number of Connections

The maximum number of connections, maxclients, is set at 10,000 by default. Redis might reduce this number when run on a system with a low maximum number of file descriptors. You can retrieve the actual setting on your Redis service instances with the Redis command CONFIG GET maxclients.

You can run the Redis command CONFIG SET maxclients NUMBER in your service instance to reduce maxclients until the next BOSH action occurs. For example:

$ CONFIG SET maxclients 9000
You cannot set maxclients above 10,000 and you cannot configure shared plans to permanently use a custom limit.

Replication and Event Notification

Replication and event notification are not configured.

Change the Service Instances Limit

This plan deploys a Redis instance on a shared VM and a single service broker VM. To prevent this, set the Max instances limit on the Shared-VM Plan tab in Ops Manager to 0.

You can increase the maximum number of service instances that can run on a shared VM from the default five to 250. There is a hard maximum of 250 shared instances.

If you increase the number of instances that can be run on a VM, consider increasing the resources allocated to the VM, especially RAM and CPU. Failure to do so might lead to a degradation of performance.

You can also increase the maximum amount of RAM allocated to each service instance that is running on this VM.

If you decrease the service instance limit, any instances that are now running beyond the limit are not automatically terminated. You cannot create any new instances until the total falls below the new limit.
For example, if you use 10 service instances, and you then reduce the limit to 8, the two instances outside the limit continue to run until you terminate them.

The number of shared-VM instances available to developers is set by the operator.
The maximum number of shared-VM instances is relative to the memory allocated to each shared-VM instance and the total memory of the Redis service broker.
For more information, see Configure Shared-VM Plan Settings.

Lua Scripting

You can enable or disable Lua scripting. Changes to this configuration apply to all existing shared-VM instances. Lua scripting can adversely affect the performance of other service instances on the VM, so VMware recommends disabling Lua scripting unless developers need it enabled. For more information, see Configure Shared-VM Plan Settings.

Warning: The Steeltoe connector for Redis requires Redis for Tanzu Application Service to support Lua scripting. Check if any of your apps require Lua scripting. By default, Lua scripting is disabled for Redis for Tanzu Application Service, but an operator can change the setting to enable it by selecting the Lua Scripting checkbox in the Shared-VM Plan configuration pane.

Known Limitations of the Shared-VM Plan

The shared-vm plan cannot:

  • Scale beyond a single VM
  • Constrain CPU or disk usage
  • Manage “noisy neighbor” problems, which makes it unsuitable for production apps

Lifecycle for Shared-VM Service Plan

Below is the lifecycle of Redis for Tanzu Application Service, from an operator installing the tile, to an app developer using the service, to an operator deleting the tile.

Three columns are shown, labeled 'Operator', 'Redis', and 'App Developer'. See below for a detailed image description.

The following workflow is in the Operator column:

  • Configure:
    • VM size
    • Number of shared instances
    • syslog forwarding
    • Backup destination
    • Metrics interval
    • Click Save

The following workflow is in the Redis column:

  • Install Redis
    • Create service broker VM
    • Broker registers as available in marketplace
    • Run smoke tests
    • Service broker ready

The App Developer runs the following command:

$ cf create-service p-redis shared-vm mysharedinstance

In the Redis column:

  • If the maximum number of instances has not been reached, memory is allocated and a shared-VM Redis instance is created

The App Developer runs the following command:

$ cf bind-service my-application mysharedinstance

In the Redis column:

  • Redis credentials are stored in the app’s VCAP_SERVICES environment variable and the app can talk directly to the Redis server inside the service instance

The App Developer runs the following command:

$ cf delete-service mysharedinstance

In the Redis column:

  • The service instance is deprovisioned and the memory in the service broker is freed

In the Operator column:

  • Delete Redis
    • Click Apply Changes

In the Redis column:

  • Service broker and all provisioned instances are deleted
  • Broker deregistrar errand runs cf purge-service