Coder Social home page Coder Social logo

Comments (9)

ipapapa avatar ipapapa commented on July 20, 2024

If Dynomite cannot send a request to Redis, it will report "ERR storage: connection refused". At the time of Redis disconnection, Dynomite reports it at the log file as well. Moreover, there are some health check stats printed out as a JSON file in port 22222 (you may see them from your browser http://node_ip:22222/info). Did you check them?

from dynomite.

mfouilleul avatar mfouilleul commented on July 20, 2024

"how can known backend redis status by dynomite"

By the command PING no?

Max

Le 25 août 2015 à 17:47, Ioannis Papapanagiotou [email protected] a écrit :

If Dynomite cannot send a request to Redis it should be reported in the log files. Moreover, there are some health check stats printed out as a JSON file in port 22222 (you see them from your browser http://node_ip:22222/info). Did you check them?


Reply to this email directly or view it on GitHub.

from dynomite.

xichehe avatar xichehe commented on July 20, 2024

ping or curl Dynomite node to check backend redis status,before every client set/get key request?

from dynomite.

ipapapa avatar ipapapa commented on July 20, 2024

Your application should have a failover strategy based on the exception. For example,
GET/SET with Redis down/Dynomite up ---> "(err) ERR Storage: Connection Refused".
GET/SET with Dynomite down ---> "Could not connect to Redis at ip_address:port_number: Connection refused"

from dynomite.

ipapapa avatar ipapapa commented on July 20, 2024

@xichehe has your issue been answered?

from dynomite.

xichehe avatar xichehe commented on July 20, 2024

when GET/SET with Redis down/Dynomite up, my code can't get some exception use phpredis extension~,need some server side config?
if Dynomite up,backend redis is down, why Dynomite route client request to bad redis service,why not Connection Refused?

from dynomite.

ipapapa avatar ipapapa commented on July 20, 2024

Dynomite returns two different error messages for each case. The reason that Dynomite does not return "connection refused" is because the client is able to establish a connection with Dynomite even if Redis is down. It is up to the client API to capture the error message ("(err) ERR Storage: Connection Refused" or "Connection refused") from Dynomite and throw the proper exception to the application. Most clients return the proper exceptions (e.g. redis-py, redis-cli etc.). phpredis seems to throw a RedisException only if the server is unreachable (overloaded, Dynomite is down, connectivity issues): https://github.com/phpredis/phpredis#class-redisexception
If Dynomite is reachable and Redis is down, phpredis may return FALSE (based on the documentation, I have not tested it).

from dynomite.

xichehe avatar xichehe commented on July 20, 2024

thx ipapapa!
I find some strange matter,if Dynomite up and redis down,redis-cli client can set/get some key,but ping cmd will capture the error message:ERR Storage: Connection Refused.

from dynomite.

ipapapa avatar ipapapa commented on July 20, 2024

This is not the case. For every command that is issued from the client towards Dynomite with Redis down the exception will appear on the cli: ERR Storage: Connection Refused. Did you start redis-cli with the dynomite port: i.e. -p 8102?

from dynomite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.