tags:

views:

29

answers:

2

Hi all, I was looking into the configuration options of the Elgg, the open source social networking site. There was an option which allowed splitting the database connectivity into read and write and even multiple connections for reads and writes.

I am not sure as why the splitting of read and write is needed.

If I am not clear , please do look into lines 53 and 54 http://reference.elgg.org/settings_8example_8php-source.html

thanks, karthick

A: 

I found the answer for this here. Hope it would be of help for someone in future.

Karthick
A: 

At my previous job we were running 2 MySQL servers for our system. One being the read, and the other being the write. These server's were mirrored. Reason for this is that when you are doing SELECT, INSERT etc it puts a lock on the table which will prevent access from other requests. In this configuration it will allow you to do larger SELECT statements while still being able to do INSERT's.

Possibly this is the same reason for this system?

Surim
exactly.. But do both the connections have the same priveleges in your case?
Karthick
no, the read server had only read rights (SELECT, etc) and the insert server had both (INSERT, UPDATE, DELETE, SELECT). Since it was only replicating from the write server to the read server, if any modifications would to have been made on the read server, they would not have been updated on the write server and therefore would be over written
Surim
http://stackoverflow.com/questions/3522142/same-host-and-username-with-multiple-acl-privileges-mysqlCan you please see you know the solution for the question in this link?
Karthick