LATEST VERSION: 1.9 - CHANGELOG
Redis for PCF v1.8

Redis for PCF Recommended Usage and Limitations

Redis for PCF can be used as a cache or as a datastore. On-Demand plans, introduced in Redis for PCF v1.8, are designed for cache use cases. Dedicated-VM and Shared-VM plans are designed for datastore use cases.

Redis can be used in many different ways, including:

  • Key/value store for strings and more complex data structures including Hashes, Lists, Sets, Sorted Sets
  • Session cache - persistence enables preservation of state
  • Full page cache - persistence enables preservation of state
  • Database cache - cache queries
  • Data ingestion - because Redis is in memory it can ingest data very quickly
  • Message Queues - list and set operations. PUSH, POP, and blocking queue commands.
  • Leaderboards/Counting - increments and decrements of sets and sorted sets using ZRANGE, ZADD, ZREVRANGE, ZRANK, INCRBY, GETSET
  • Pub/Sub - built in publish and subscribe operations - PUBLISH, SUBSCRIBE, UNSUBSCRIBE

On-Demand Plans

  • Each on-demand plan instance is deployed to its own VM and is suitable for production workloads.
  • The maximum-number of on-demand plan instances available to developers is set by the operator and enforced on both a global and per-plan level quota. This quota cannot exceed 50.
  • Select Redis configurations can be changed from default.
  • The default maxmemory-policy is allkeys-lru and can be updated for other cache policies.
  • Operators can update the plan settings, including the VM size, disk size and Redis configuration settings, after the plans have been created. Operators should not downsize the VMs or disk size as this can cause data loss in pre-existing instances.

Resource Usage Planning for On-Demand plans

Redis On-Demand plans use dedicated VMs and disks, which will consume IaaS resources. Operators can limit resource usage with Plan Quotas and a Global Quota, but resource usage will vary based on number of On-Demand instances provisioned.

If the number of on-demand instances is greater than or equal to the Global Quota set on the ‘On Demand Service Settings’ page, no new instances can be provisioned.

To calculate the maximum cost/ usage for each plan:

max_plan_resources = plan_quota x plan_resources

To calculate the maximum cost across plans, add together the cost/ usage for each plan, while the quotas sum to less than the global quota.

While (plan_1_quota + plan_2_quota) ≤ global_quota:
max_resources = (plan_1_quota x plan_1_resources) + ( plan_2_quota x plan_2_resources)

To calculate the current IaaS cost/ usage across On-Demand plans:

  1. Current instances provisioned for all plans can be found by referencing the total_instance metric as documented here
  2. Multiple the total_instance for each plan by that plan’s resources. Sum all plans that are active to get your total current usage
current_usage = (plan_1_total_instances x plan_1_resources) + (plan_2_total_instances x plan_2_resources)

Dedicated-VM Plan

  • Dedicated-VM plans are configured with maxmemory-policy = no-eviction and with RDB and AOF persistence.
  • Each dedicated VM plan instances is deployed to its own VM and is suitable for production workloads.
  • The number of Dedicated-VM plan instances available to developers is set by the operator. Configurations of up to 100 Dedicated-VM plan instances have been tested.
  • No ability to change the Redis configuration. The CONFIG command is disabled.
  • Cannot scale down the number of VMs on the plan once deployed.
  • Cannot scale down the size of VMs on the plan once deployed (this protects against data loss).
  • The default maximum number of connections, maxclients, is set at 10000 but this number is adjusted by Redis according to the number of file handles available.

Shared-VM Plan

  • Shared-VM plans are configured with maxmemory-policy = no-eviction and with RDB and AOF persistence.
  • The Shared-VM plan does not manage 'noisy neighbor’ problems so it is not recommended for production apps.
  • 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. Please see Configuring Service Plans for more detail.
  • It cannot be scaled beyond a single virtual machine.
  • The following commands are disabled: CONFIG, MONITOR, SAVE, BGSAVE, SHUTDOWN, BGREWRITEAOF, SLAVEOF, DEBUG, and SYNC.
  • Constraining CPU and/or disk usage is not supported.
  • The default maximum number of connections, maxclients, is set at 10000 but this number is adjusted by Redis according to the number of file handles available.

Availability Using Multiple AZs

Redis for PCF 1.8 supports configuring multiple availability zones but this configuration does not provide high availability.

Downtime During Redeploys

Redeploying PCF Redis for configuration changes or upgrades will result in Redis being inaccessible to apps for a brief period of time.

Redis Key Count and Memory Size

Redis can handle up to 232 keys, and was tested in practice to handle at least 250 million keys per instance. Every hash, list, set, and sorted set, can hold 232 elements. VM memory is more likely to be a limiting factor than number of keys that can be handled.

Create a pull request or raise an issue on the source for this page in GitHub