tcp health check failing to get a response from redis server

824 views
Skip to first unread message

Eric Abbott

unread,
Dec 12, 2017, 12:22:09 PM12/12/17
to gce-discussion
I'm attempting to create a tcp health check to be used in an internal tcp load balancer.

Using "echo PING | nc -q 1 localhost 6379" I can see with tcpflow that the response +PONG
is being sent.

However with the request: PING and response: +PONG set in a tcp health check,
After setting up the firewall rules correctly, I can see the PING show up from the heath
check IPs but I do not see a response being sent by the redis server. I assume that
either a) the connection is being closed by the client before the response is sent or
b) the redis server sees the request as bad and closes the connection.

Perhaps the request needs an actual hard return? Sending PING\n also failed.

Has anyone had success creating a tcp health check against a redis backend?
Any suggestions?

Thanks

Karthick (Cloud Platform Support)

unread,
Dec 12, 2017, 4:45:15 PM12/12/17
to gce-discussion
Hello Eric,

Could you give some more information about the use case of health check to Redis and how is your health check looks like?  Meanwhile, I would also suggest you to check at stackoverflow for additional insight. 


Eric Abbott

unread,
Dec 13, 2017, 7:11:50 AM12/13/17
to gce-discussion
Hi Karthick, thanks for the response.

For the use case, I'm setting up an SSL tunnel to RedisLabs. Rather than having a SPOF
I'm attempting to set up a pair of SSL tunnel instances fronted by a load balancer. I'm attempting
to set up the tcp health check to hit the redis instance on the far side of the SSL tunnels rather than
just detect if the SSL tunnel hosts are accepting tcp connections.

The stackoverflow question linked was indeed attempting to match a substring, however
my use case is attempting a full string match. In addition, as mentioned, I'm utilizing tcpflow
on a redis host and am not seeing any output at all being returned to the health check requests.

My assumption is that the health check is sending the --request string PING and waiting, however
the redis server is waiting for perhaps a \n before it will process the incoming string as a request.
Then the health check times out and closes the connection and thus never gets a response to
process.

is there a way to have the tcp checker send a \n (CR) or \r\n (LFCR) in it's --request string?

Karthick (Cloud Platform Support)

unread,
Dec 19, 2017, 12:53:23 PM12/19/17
to gce-discussion
Hello Eric,

I see that you have opened Feature Request under Public Issue Tracker for including strings (CR+LF) in the request Flag. I believe that that this could be one of the issues that the engineering is working on. However, future discussions will be held there
Reply all
Reply to author
Forward
0 new messages