Jump to content

Community

Add support for MYSQLI_CLIENT_COMPRESS


Recommended Posts

This is not something that is going to be relevant to 98% of clients, but for certain enterprise configurations this can be helpful.

On load balanced setups, the database server can saturate a 1Gbps connection line on larger more active communities far before it's actually CPU constrained.

Though I'm currently looking at getting this client set up with an upgraded 10Gbps network cable to accommodate for this as our NIC supports it, simply enabling network compression for TCP based database connections can significantly reduce the bandwidth overhead as long as you can afford expending a bit of extra CPU cycles for the compression/decompression.

I looked into making a plugin for this, but as you're calling parent::real_connect() in \IPS\Db, we can't overload it to apply the flags this way, so the only solution is to apply a manual patch. Which isn't a huge deal for this alone, but it'd still be a small QoL improvement to have an official flag for it.

Link to post
Share on other sites

Another feedback topic recently mentioned supporting SSL for the MySQL database server.

What if we did something like

			/* Connect */
			parent::real_connect(
				$sqlCredentials['host'],
				$sqlCredentials['username'],
				$sqlCredentials['password'],
				$sqlCredentials['database'],
				$sqlCredentials['port'],
				$sqlCredentials['socket'],
				$this->_getFlags()
			);

 

and then the _getFlags() method returned nothing by default, but a plugin could add a hook to set other flags?

Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy