lbryio / lbry-docker

This repository will be for Dockerfiles for the various LBRY packages.
https://hub.docker.com/u/lbry/
MIT License
11 stars 7 forks source link

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

Closed Leopere closed 5 years ago

Leopere commented 5 years ago

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.

EnigmaCurry commented 5 years ago

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

nikooo777 commented 5 years ago

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 5 years ago

@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 5 years ago

Why MariaDB btw? In production we use perconaDB.

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