Using Redis storage in oxd#
Overview#
Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes with radius queries and streams. oxd can be configured to use Redis
as storage to maintain a copy of client details registered in OpenID Connect provider
. There are some easy steps to use Redis
in standalone and cluster mode with oxd which will be covered in detail in this section.
Redis in Standalone
mode#
When Redis is configured in Standalone
mode, oxd stores client details in single Redis server. To configure Redis in Standalone
mode we need to follow below steps:
-
Install Gluu Server bundled with oxd.
-
Download and install Redis on local server.
-
Start Redis server using command:
redis-server
-
In
/opt/oxd-server/conf/oxd-server.yml
(of Gluu Server chroot) set followingstorage_configuration
.storage: redis storage_configuration: servers: "localhost:6379" redisProviderType: STANDALONE
-
Start oxd server and execute client registration command. This will store client information in Redis storage.
Redis in Cluster
mode#
In Cluster
mode oxd stores client details in multiple running Redis server. To configure Redis in Cluster
mode we need to follow below steps:
-
Install Gluu Server bundled with oxd.
-
Download and install Redis on different virtual machines (VMs).
-
Start Redis server on different VMs using below command:
redis-server
-
In
/opt/oxd-server/conf/oxd-server.yml
(of Gluu Server chroot) set followingstorage_configuration
.storage: redis storage_configuration: servers: "redis-host1-IP:6379,redis-host2-IP:6380,redis-host3-IP:6381,redis-host4-IP:6382" redisProviderType: CLUSTER
-
Start oxd server and execute client registration command. This will store client information in any one of the Redis server instance.