We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Using non-localhost (remote) mysql to power Oxwall | Forum

Sal
Sal Jan 17 '17
Hi,


So in an effort to speed up Oxwall/Skadate (other than a modified .htaccess file of course) , serving images from Amazon S3, etc. one mod I thought would be great is to mysql itself, and I don't see it anywhere even being discussed in blogs about how everyone speeds up Oxwall. 


I am new to Oxwall and it is seems its Achilles Heel is all the dbase calls it makes to load friend, news, mail, etc. Personally, not the way I'd write the code but moving on... why are we webmasters not just offloading the issues? It's mysql. You want it to fly, why not just tweak config.php??


Think about it, its stuck using localhost, which for many is a shared host (just a bad idea to begin with) or a VPS (getting better but get ready to go dedicated once you hit the wall as an 8 gig quad core VPS doesnt have the same "balls" as a dedicated box with the same resources IMO. I digress... why not run a dedicated box as a web server and offload the SQL calls to a dedicated database server? Seems obvious to me as I run sites (not Oxwall) on all API calls and beat up a 24 core, 144 gig dedicated database server .


So to me it seems everyone is overlooking the most obvious way of making the Oxwall installs run like greased lightning:


define(‘OW_DB_HOST’, ‘localhost’); **IP or URL of your remote database server**

define(‘OW_DB_PORT’, null); **its port** 

define(‘OW_DB_USER’, ‘db_user’); **admin or SA or whatever  **

define(‘OW_DB_PASSWORD’, ‘password’); **duh **

define(‘OW_DB_NAME’, ‘db_name’); **you get the idea **


Now assuming you did a direct copy of the localhost to the database server, changed these settings in config.php, and blew out your cache...shouldnt it be now calling to a monster remote database server to populate what your webserver is calling up? And need more webserver power... load balance to another one or do a poor mans load balance and round-robin IP's (entirely do-able if you login's are done with SSL with minor mods.


But correct me if I am wrong, but that config.php trick, assuming you had a dedicated remote host database server to offload to (Amazon offers this as a service too incidentally ), would work yes??? 

 



The Forum post is edited by Sal Jan 17 '17
IntrigU
IntrigU Jan 25 '17
This should work, but you are introducing inherent network latency into the solution by placing the db on a remote server. If you know that your network latency is low and within mysql acceptable guidelines than go for it.
The Forum post is edited by IntrigU Jan 25 '17
Sal
Sal Jan 30 '17
Yes, very good point. You definitely need to be on a fast pipe to make it work effectively. Preferable a local network if possible for sure to limit latency.