Shared-VM Service Offering
Page last updated:
Redis for Pivotal Cloud Foundry (PCF) 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.
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.
This diagram shows the architecture of the service broker and shared-VM plans and how the user’s app binds to a Redis instance.
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:
Redis is configured with a
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.
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
until the next BOSH action occurs. For example:
$ CONFIG SET maxclients 9000You cannot set
maxclientsabove 10,000 and you cannot configure shared plans to permanently use a custom limit.
Replication and event notification are not configured.
This plan deploys a Redis instance in 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
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 Shared-VM Plan Settings.
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 Pivotal recommends disabling Lua scripting unless developers need it enabled. For more information, see Shared-VM Plan Settings.
Warning: The Steeltoe connector for Redis requires Redis for PCF to support Lua scripting. Check if any of your apps require Lua scripting. By default, Lua scripting is disabled for Redis for PCF, but a PCF operator can change the setting to enable it by selecting the Lua Scripting checkbox in the Shared-VM Plan configuration pane.
The shared-vm plan cannot:
- Scale beyond a single VM
- Run the commands
- Constrain CPU or disk usage
- Manage “noisy neighbor” problems, which makes it unsuitable for production apps
Below is the lifecycle of Redis for PCF, from an operator installing the tile, to an app developer using the service, to an operator deleting the tile.