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

The p-redis service broker manages the shared-vm plan service instances.

The diagram below 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 diagram above shows the p-redis service broker pointing to a shared-VM plan instance, which was created by running cf create-service. For more information about this command, see Create a 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 bound to a shared-VM plan instance, shown above by an arrow labeled binding pointing from the app to a shared-VM plan instance. 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.

Persistence

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
  • Run the commands CONFIG, MONITOR, SAVE, BGSAVE, SHUTDOWN, BGREWRITEAOF, REPLICAOF, SLAVEOF, DEBUG, or SYNC
  • 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'.
The workflows in this image are described in detail below.

Installation

Operators do the following to install Redis for Tanzu Application Service:

  1. Configure:

    • VM size
    • Number of shared instances
    • Syslog forwarding
    • Backup destination
    • Metrics interval
    • Click Save
  2. Install Redis

    • Click Apply changes

After the operator clicks Apply Changes, Redis for Tanzu Application Service does the following:

  1. Create service broker VM
  2. Broker registers as available in marketplace
  3. Run smoke tests
  4. Service broker ready

Using Redis for Tanzu Application Service

After operators have installed Redis for Tanzu Application Service, developers can create service instances, bind and unbind the service instances to apps, and delete service instances. These operations are described below.

Create Service

When a developer runs the cf create-service command, for example:

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

Redis for Tanzu Application Service does the following:

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

Bind Service

When a developer runs the cf bind-service command, for example:

$ cf bind-service my-application mysharedinstance

Redis for Tanzu Application Service does the following:

  • 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

Unbind Service

When a developer runs the cf unbind-service command, for example:

$ cf unbind-service my-application mysharedinstance

Redis for Tanzu Application Service does the following:

  • Redis credentials are removed from the app’s VCAP_SERVICES environment variable

Delete Service

When a developer runs the cf delete-service command, for example:

$ cf delete-service mysharedinstance

Redis for Tanzu Application Service does the following:

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

Deletion

Operators do the following to delete Redis for Tanzu Application Service:

  1. Delete Redis
    • Click Apply Changes

After the operator clicks Apply Changes, Redis for Tanzu Application Service does the following:

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