Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mysql service connectivity check #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

liangg
Copy link

@liangg liangg commented Jan 8, 2016

The mysql service connectivity check is similar to haproxy option mysql-check, and is used for local
mysql service check. A simple mysql-check uses a user with minimal USAGE privilege and the user may or may not have a password. In our company production, we use haproxy option mysql-check for synapse side service health check, however it does not work with a new db proxy service that we build, and the nerve tcp port health check on the local server is not sufficient. The simple mysql service check borrows the idea of haproxy option mysql-check but it uses mysql client and therefore works with the new proxy. It had been verified in our production test environment.

@igor47

It's similar to haproxy option mysql-check, and is used for local
mysql service check. A simple mysql-check uses a user with minimal
USAGE privilege and the user may or may not have a password.

begin
log.debug "nerve: mysql connect #{@host}:#{@port} as #{@user}"
conn = Mysql2::Client.new(:host => @host, :username => @user, :password => @pass, :port => @port)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think timeouts are integral to the notion of a health check. is there a way to specify a connection timeout for Mysql2 ? i don't think we should merge without it.

@igor47
Copy link
Collaborator

igor47 commented Jan 9, 2016

can you investigate the spec failure?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants