Why do we need Redis for running CKAN? - redis

I was wondering why do we need Redis server for running CKAN.
If needed, why? And How do I configure it with CKAN?
p.s
I am running my ckan instance in RHEL7.

Update: Redis has been a requirement since CKAN 2.7, when a new system for asynchronous background jobs was introduced which relies on Redis. You can configure the Redis connection using the ckan.redis.url option.
Redis is not required for the current version of CKAN (2.6.2 at the time of this writing), it's not even mentioned in the CKAN 2.6.2 documentation.
However, the upcoming 2.7 release will require Redis for its new system of asynchronous background jobs. Redis will be configured using the new ckan.redis.url option.

Related

How to install RedisJSON on existing RedisLabs instance

I have a (paid) redis-labs instance. how can I use redis-json features on top of it?
Also, can I use normal redis-commands in a redis which has redis-json module installed?
It depends if you are using Redis Enterprise or Redis Enterprise Cloud
Redis Enterprise Cloud: https://docs.redislabs.com/latest/rc/databases/create-database/
Redis Enterprise: https://docs.redislabs.com/latest/modules/add-module-to-database/
or follow this quickstart: https://docs.redislabs.com/latest/modules/redisjson/redisjson-quickstart/
Also, can I use normal redis-commands in a redis which has redis-json
module installed?
Yes, all Redis commands will be available (RedisJSON extends Redis)

Is there a way to change AWS ElastiCache Redis Version to 6.2?

My ElastiCache Redis version is on 6.0.5. But I want to use 6.2. According to AWS you can't specify the exact v6.x version.
I want to know if it's possible to upgrade it manually or something.
I’ve looked into this and was unable to find a way to use ElastiCache with Redis 6.2. Instead, I have deployed Redis in docker with ECS and Fargate in a Redis 6.2 dockerfile. Not as turnkey as ElastiCache though, I’m afraid.

How can you use Spring Sessions with Redis Service in Bluemix? Is IBM Session Cache an alternative?

The current app (with a competitor) is using Spring-Boot and Spring-Sessions to save session data independent from the instance in Redis.
How can we replicate this in Bluemix?
Is there a way to add on Spring-Sessions to the Redis service?
The other option would be the IBM Session Cache. Does that work with Spring-Boot and Spring-Session? Does the Session Cache service work without Tomcat? (Jetty for example?)
I haven't played with Spring-Sessions yet, but I might be able to point you in the right direction.
There is a general Redis service available on Bluemix. The open source Java buildpack (Tomcat) promises auto configuration of Redis. I would try this first. To use this buildpack:
cf push <appname> -b java_buildpack
If that doesn't work, you could read the credentials from VCAP_SERVICES and configure JedisConnectionFactory programmatically connect to it.
If you use the IBM Session Cache service with a Liberty application on Bluemix, the configuration is auto generated such that standard JEE HTTPSession objects are persisted to the service. It might work with other java runtimes, but configuration would be more manual.
Hope this helps.
Does the session cache work without Tomcat (Jetty for example)?
In general, the session cache should work with any webserver/servletcontainer, when Bluemix supports Jetty runtime for example, the session cache should support.
Session cache is based on IBM WebSphere eXtreme Scale caching technology, and the base product had been tested against WebSphere, Liberty and Tomcat runtime for the HTTP session use cases, but not tested under Jetty.

Redis Cluster Support in Redis 2.8.19

I just started evaluating Redis. I am using Redis 2.8.19 which the most latest stable release. Redis 2.9 is still unstable and Redis 3.0 is just available for developer's preview (not recommended for production). I was tryin to setus a cluster of Redis and when I changed my redis.conf and appended
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
and started my Redis server by
src/redis-server ./redis.conf
it gave me an error as follows
* FATAL CONFIG FILE ERROR *
Reading the configuration file, at line 2
'cluster-enabled yes'
Bad directive or wrong number of arguments
I googled the error and got to know that my version (2.8.19) does not support cluster. I was still unable to fine any such specification in Redis Docs. My question is simple. Does Redis 2.8.19 supports redis cluster configuration? Or I have to upgrade to Redis 2.9 or Redis 3.0. I am evaluating Redis because I need to deploy it in production. Please guide.
Redis Cluster support is only for versions >= 3.0.0. Redis 3.0.0 will be released as a stable version in a matter of days, it's a good idea to use it if you want to use Cluster. The cluster support is considered to be stable, however for it to be considered mature we want to see adoption. Btw there is already at least a very large site using it in production. Currently the most sane thing to do if you need Redis Cluster is to test it for your use case, and if it looks great, use it.
Redis cluster is supported only in Redis 3.0+ (which is now stable). I have written a simple API called "Simple Redis Cluster Client" which can be used in redis's sub 3.0 versions for running in a cluster like mode (Not precisely a cluster, it just distributes keys among redis nodes based on the key's hashcode, You can have a look # https://github.com/prash-mi/simple-redis-cluster-client
Cluster support for Redis is only from v3 - v2.8.19 doesn't do clustering.

Which option is better for Redis? SHUTDOWN or service stop?

I have Redis server running on CentOS as a service. I can stop the server using service redis stop or redis-cli SHUTDOWN.
What is the difference between the two options and which one I should be using in Production environment?
You should check your init script since it may precisely perform a shutdown on stop and not a killproc, e.g:
ExecStop=/usr/bin/redis-cli shutdown
(from Fedora package: redis-server.service)
Using shutdown is the recommended way to stop Redis if persistence matters as stated by the documentation:
If persistence is enabled this commands makes sure that Redis is switched off without the lost of any data.