Redis

Page last updated:

Integrating the Service With Your App

After the creation of the service and the binding of the service to the application, the environment variable VCAP_SERVICES is created. Information about the credentials are stored in this variable as shown here:

{
  "redis-2": [
    {
      "credentials": {
        "host": "kubernetes-service-node.service.consul",
        "master_port": 53574,
        "password": "Qo31B0f5FWTXywJX7ZMG3OOZNLCVg9",
        "port": 53574,
        "slave_ports": [
          42613,
          35581
        ]
      },
      "label": "redis-2",
      "name": "redis-example",
      "plan": "small",
      "tags": [
       "redis"
      ]
    }
  ]
}

Important: Please be aware that the number of concurrent connections to Redis is limited depending on the service plan you chose. You can manage this by using connection pooling.

Administrating your Redis instances

To connect to a running Redis instance with your local development tools, you can use the cf ssh feature of the cf CLI.

Sample Application

Swisscom: Redis Example

Limitations

Due to security reasons the following commands are disabled: CONFIG, CLUSTER, DEBUG, INFO, MIGRATE, ROLE, SLAVEOF

View the source for this page in GitHub