Handles the various database connections, and whether they are read-only or write connections. Retrives the necessary db connection information from redis when necessary.
get_connection(string $type = 'read')
Check database connection
Get database connection.
Checks to see whether we're connected to the mySQL database, and if so, if we're connected with the correct mySQL user depending on if it's a read / write connection.
The type of connection we need (read or write).