PHP Sessions in Redis

If your php application requires sessions and it’s hosted on a scaled high available infrastructure, it’s required to have these sessions stored on a decentralised and HA platform as well, in order to avoid to rely on session persistent options on the load balancer or another Cloud Server.
Redis as a Service is a nice fit for this purpose.

Here an example using Rackspace Object Rocket

To achieve this it’s required to install the right package.

In Centos/RHEL, there is the IUS package available:

After that, the php.ini should be changed like this:

To increase performance and reduce the “noise” for repetitive DNS queries (especially in case of SaaS which uses FQDN instead of an IP) it is also recommended to install nscd to cache the DNS queries.