Ask Your Question
1

How to use DNS in Redis URI

asked 2019-03-05 15:36:51 -0500

Ray Hsiao gravatar image

The use format of the Redis URI (Redis Lookup Processor) is redis://${RedisEndpoint}. I need to change the Redis endpoint at runtime when the Redis server changes. Is it possible to use a DNS name (AWS Route53) so that lookup can be directed to a different Redis server by updating the value of the DNS name?

Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-03-05 15:58:45 -0500

metadaddy gravatar image

updated 2019-03-05 16:02:57 -0500

Unfortunately, it is not possible to change the Redis endpoint while the pipeline is running. The configured URI is evaluated at pipeline start, and a persistent connection to Redis is established, so you need to restart the pipeline for any change to take effect.

If you want to just use the same DNS name in the Redis URI, and change that in DNS to point to a different server, then that might be possible. I'm guessing that the underlying Jedis library that we use will resolve the DNS name each time it makes a connection.

edit flag offensive delete link more

Comments

Thank you so much for the information. DNS name was resolved correctly. However, it seemed to persist the connection when the pipeline was restarted. It did not use the new server upon restart. I had to restart the container to have it reevaluate the DNS name. Is this the expected behavior?

Ray Hsiao gravatar imageRay Hsiao ( 2019-03-06 14:03:11 -0500 )edit

Sounds like you may need to look into how DNS results are cached in the container. Not sure we can do much about this in Data Collector.

metadaddy gravatar imagemetadaddy ( 2019-03-06 17:35:38 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-03-05 15:36:51 -0500

Seen: 190 times

Last updated: Mar 05