pnxtech / hydra

A light-weight library for building distributed applications such as microservices
https://www.hydramicroservice.com
MIT License
645 stars 54 forks source link

How to view hydra key-value pairs in native redis cli ?? #141

Closed skalyanapu-mtuity closed 7 years ago

skalyanapu-mtuity commented 7 years ago

Firstly, thank you for awesome module.

I know using hydra-cli , I can get total list of nodes,routes etc . I'm curious how hydra really use redis to store this key-value pair.

Once everything up and running, I tried view hydra service related registries in redis server using redis-cli, but unable to see anything ?? Is there any best approach?

Regards, Sai.

cjus commented 7 years ago

@skalyanapu-mtuity Thank you for trying Hydra!

When you connect to redis make sure to select database 15 or which ever redis database you're using.

$ redis-cli
127.0.0.1:6379> select 15
OK
127.0.0.1:6379[15]> keys *
1) "hydra:service:auth-svcs:service"
2) "hydra:service:user-svcs:service:routes"
3) "hydra:service:nodes"
4) "hydra:service:auth-svcs:service:routes"
5) "hydra:service:hydra-router:service"
6) "hydra:service:user-svcs:service"
7) "hydra:service:hydra-router:159b06da336940ffa1cf0252d9d184c9:health:log"
8) "hydra:service:hydra-router:service:routes"
127.0.0.1:6379[15]> 

You should see keys there. Also I recommend trying Medis if you're using a mac: http://getmedis.com/

skalyanapu-mtuity commented 7 years ago

@cjus Yes! I missed it. Thank you !!

cjus commented 7 years ago

@skalyanapu-mtuity no worries - thanks again for trying Hydra!