[Chainquery] Upgrade from mysql TCP connections to direct .socket connection. #63

Closed
opened 2019-04-28 21:46:40 +02:00 by Leopere · 4 comments
Leopere commented 2019-04-28 21:46:40 +02:00 (Migrated from github.com)

Share socket from the mariadb container with the chainquery container via volumes then connect directly.

@nikooo777 mentioned in a slack message that we should be using mysql.socket via mysqldsn="lbry:PASSWORD@unix(/var/run/mysqld/mysqld.sock)/chainquery" in the Chainquery configurator start.sh

Using a direct socket connection will require testing but should vastly improve query speeds and security.

Share socket from the mariadb container with the chainquery container via volumes then connect directly. @nikooo777 mentioned in a slack message that we should be using `mysql.socket` via `mysqldsn="lbry:PASSWORD@unix(/var/run/mysqld/mysqld.sock)/chainquery"` in the [Chainquery configurator start.sh](https://github.com/lbryio/lbry-docker/blob/master/chainquery/stuff/start.sh#L8) Using a direct socket connection will require testing but should vastly improve query speeds and security.
EnigmaCurry commented 2019-04-28 22:47:15 +02:00 (Migrated from github.com)

It should support socket and TCP, as socket cannot be used in multi-host setups.

It should support socket and TCP, as socket cannot be used in multi-host setups.
nikooo777 commented 2019-04-29 12:08:56 +02:00 (Migrated from github.com)

Why MariaDB btw? In production we use perconaDB.

Any considerable improvements?

Also if it's not easy to achieve we can stick to TCP, the speed improvements are minimal.

Why MariaDB btw? In production we use perconaDB. Any considerable improvements? Also if it's not easy to achieve we can stick to TCP, the speed improvements are minimal.
EnigmaCurry commented 2019-04-29 14:20:22 +02:00 (Migrated from github.com)

@nikooo777 I've been testing with MySQL 5.7 (not MariaDB)

https://github.com/lbryio/lbry-docker/blame/master/contrib/systemd-cloud-init.md#L97

I can test with perconaDB, is there a specific version I should use?

@nikooo777 I've been testing with MySQL 5.7 (not MariaDB) https://github.com/lbryio/lbry-docker/blame/master/contrib/systemd-cloud-init.md#L97 I can test with perconaDB, is there a specific version I should use?
Leopere commented 2019-04-30 17:12:47 +02:00 (Migrated from github.com)

Why MariaDB btw? In production we use perconaDB.

Thanks for the reminder @nikooo777 I've opened a PR for a Percona swap. #69

> Why MariaDB btw? In production we use perconaDB. Thanks for the reminder @nikooo777 I've opened a PR for a Percona swap. #69
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-docker#63
No description provided.