FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Multiple Servers





imagefree
What may be the drawbacks of putting the same data on different servers in different databases in parts, so that (suppose)


Records from ID 000000001 to ID 000010000 are on server 1
Records from ID 000010001 to ID 000020000 are on server 2
Records from ID 000020001 to ID 000030000 are on server 3
Records from ID 000030001 to ID 000040000 are on server 4
Records from ID 000040001 to ID 000050000 are on server 5

and so on.

It will be just on the back end, and the users will never know about it. The data entered like page.php?id=000000009 will go to script and script will determine on which server the id is and then will redirect to the appropriate server like following

Code:
http://sv001.mysite.com/the_desired_page.php?id=000000009

and now the script on the svr 001 will automatically do its task.
(I want to do this to spread the pressure from 1 server to many)
(Database used will be MYSQL)

I just want to ask what may be the possible barriers in this type or resource sharing?
What may be the security risks?

Please share whatever you can do in this regard.

(I am not an expert programmer, i have just started php so cant use or understand appropriate technical words).
kv
This approach has lot of drawbacks. One of them (probably biggest from implementation point of view) is that you have to track in your script which database has what data - and even if you are able to do it, it is not a good design. The second is that it may not still solve the problem at hand if several users query the records which are in the same database - it is not necessary that load is distributed because data is distributed.

I think a more practical solution is load balancing. This way, all the data is in the same place (or replicated at multiple places -depends on your design) and there will be several servers running the same database - essentially catering the same data. You can use hardware or software for load balancing, but essentially it will distribute the load to different servers automatically. Your script need not even be aware that there are multiple servers and there is a load balancing happening.

one more advantage of load balancing is that even if one (or few) of your servers go down, your application runs without any issue catering all the data, except that there may be a degradation in performance during high load due to non availability of few servers.

You can find a nice article about mysql loadbalancing here
http://www.ludicorp.com/flickr/zend-talk.ppt#306,41,Hardware
Related topics
Best FTP Client on EARTH
PHP CLI
Petit problème de DNS ...
FFXI - Final Fantasy 11
DNS qui rend neuneu
Gunz Online
Guild Wars 2
Eve-online
FileSave.info - Free File and Image Hosting site 250 MB
Transfer data between pages on different servers?
Virtual Machine software
multiple servers on WAMP or EasyPHP
OGame
MySQL memory management
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.