Friday, 2 November 2018

Should I use the IP of the load balancer when trying to talk to MySQL behind a load balancer?

Sorry if this is a stupid question.Currently I connect directly to MySQL like this:var mysql = require('mysql'); var con = mysql.createConnection({ host: "MYSQL_IP", port: "MYSQL_PORT", database: "DATABASE", user: "USER", password: "PASSWORD", charset : "CHARSET" }); con.connect(function(err) { ... I want to replicate the MySQL server and put the instances behind a load balancer.In this scenario, should I just change MYSQL_IP to LOAD_BALANCER_IP?Thank you.

Submitted November 02, 2018 at 07:15AM by just_tech_stuff

No comments:

Post a Comment