Service to connect to Redis and retrieve data in GCP

183 Views Asked by At

I want a service to be built in GCP which can perform below operations:

  1. Connect to Redis instance (MemoryStore) every 10 mins and read the data.
  2. Dump the data present in that timeframe to Bigtable (key:value pair)
  3. Once done with dumping all the data, flush the data in Redis.

Can you suggest GCP service which will be able to perform all this task.

I had Dataflow in mind but I tried connecting to Redis from Dataflow but it is giving me below exception:

redis.clients.jedis.exceptions.JedisConnectionException: Failed to connect to any host resolved for DNS name.

Code base:

try{
    Jedis jedis = new Jedis("10.171.134.132", 6379); 

    LOG.info("Connection to server sucessfully"); 
  //check whether server is running or not 
    LOG.info("Server is running: "+jedis.ping()); 
}           
catch (Exception e) {
    LOG.info("Exception Occured: "+e.getMessage());
    e.printStackTrace();
}
0

There are 0 best solutions below