Best Practices for Operating Redis for PCF
This topic is for PCF operators. It introduces some best practices, but does not provide details about operation.
Pivotal recommends that operators do the following:
- Resource Allocation — Work with app developers to anticipate memory requirements and to configure VM sizes. Redis for PCF is configured by default with small VMs. For information about configuring VM sizes, see Configure Redis Service Plans.
- Logs — Configure a syslog output. Storing logs in an external service helps operators debug issues both current and historical.
- Monitoring — Set up a monitoring dashboard for metrics to track the health of the installation. On-Demand instances do not yet have instance-level metrics in v1.8+.
- Backing Up Data — When using Redis for persistence, configure automatic backups so that data can be restored in an emergency. Validate the backed-up data with a test restore. On-Demand instances are configured for cache-uses and are not intended for backups.
You can back up Redis for PCF instances in two ways for Dedicated-VM and Shared-VM instances:
- Configure automatic backups to be run for each instance, across both service plans. For information about setting up automatic backups, see Configure Backups.
- Create manual backups of individual instances. For information about how to make manual backups of instances, see Manual Backup and Restore of Redis for PCF.
Note that backups are not available for on demand instances.
Redis for PCF emits Redis metrics via the firehose. Details here Metrics are not currently available at the instance-level for On-Demand instances.
Syslog can be forwarded to an external log service.
Syslog for On-Demand instances conforms to RFC5424 standards. This format is as follows:
<$PRI>$VERSION $TIMESTAMP $HOST $APP_NAME $PROC_ID $MSG_ID [instance@47450 deployment="$DEPLOYMENT" group="$INSTANCE_GROUP" az="$AVAILABILITY_ZONE" id="$ID"] $MESSAGE`
<13>1 2017-03-28T15:20:31.490350+00:00 10.0.16.35 redis-server 4951 - [instance@47450 director="us-pws" deployment="service-instance_16c95f89-8d5a-4cb7-839d-79c5d026bd15" group="redis-instance" az="eu-west-1a" id="7f976f34-4105-4475-abbc-5df10e933cfa" ] User requested shutdown
The following example shows syslogs for Dedicated-VM and Shared-VM instances:
Nov 15 17:05:01 10.0.24.10 audispd: [job=dedicated-node index=4] node=7bfe8b1b-6c fd-4d33-b704-c9214ce6bb3e type=USER_ACCT msg=audit(1479229501.290:86): pid=6655 ui d=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting acct="root" exe="/usr/sbi n/cron" hostname=? addr=? terminal=cron res=success'
For information about how to set up syslog output, see Configure Syslog Output.
Redis for PCF has smoke tests that are run as a post-install errand by Ops Manager. Information on what they do is here. They can be run by the operator via
bosh run errand smoke-tests.