Scenario
- Two servers: ApplicationServer1 and MySQLServer1
- MySQL remote database server is connected to ApplicationServer1 through an SSH tunnel (kept alive using autossh)
The problem
Since I separated the database from the application, the latter slowed down a lot. SSH tunnel is used in the server stack to increase security. Setting up a VPN (such as Tinc) is an alternative, but it seems to slow down much more than the SSH tunnel.
So...
How can I speed up the connection between ApplicationServer1 and MySQLServer1?
Could Redis or Memcached, installed on ApplicationServer1, be a solution?
Thank you all.