There are a number of ways to separate your site over multiple servers, the type of site you have will determine which one you choose.
o Separate the functionality. If your site is database intensive or has lots of media you could have a server handling just the database or just the media. This will free up some of the resources for preparing and serving the HTML.
Having one db server removes the job of keeping multiple dbs in sync.
o Have a server which redirects requests to other servers. Each of the other servers can be a single server of a group of servers separated as above.
What kind of site is it and what is starting to cause problems?
You can split your application up over multiple servers using load balancing. You have a load balancer take all of your incoming web requests and divide them up over a cluster of web servers. Those web servers then connect to a database server (or cluster of database servers).
Like Mike said, you can also divide up the responsibilities of the server before you move into load balancing. For example, you could put all of your images onto their own server. Moving the database off your main server onto its own server is usually the best first step.
There are many approaches to this and many techniques. To start you will want to plan it in 2 seperate ways,
Frontend - Web servers
Backend - Database servers
Primarily you will have to weigh up what your willing to pay to achieve it. Such as do you just want to have simple methods of failovers and can suffer a few minutes here and there or if you need high availablity at all times which would mean multiple locations, clustering both the front and back end.
Ultimately it would depend on what your willing to pay and what you absoustely need, simple methods such as round robin dns are always an option rather than load balancers.
Thks for all.
So then, i’m having the some trouble:
o Separate the functionality. If your site is database intensive or has lots of media you could have a server handling just the database or just the media. This will free up some of the resources for preparing and serving the HTML.
Having one db server removes the job of keeping multiple dbs in sync.
o Have a server which redirects requests to other servers. Each of the other servers can be a single server of a group of servers separated as above.
So how can i do with one domain, and some servers ?
i think, i’ll use one DB server and some other web servers.
So how can i redirect request to other servers when server overload is too high ?
i’m using PHP / Apache / MySql.
You can host your site on multiple servers with one domain by providing different ‘Name Servers’ e.g. ns1.domainname.com, ns2.domainname.com, ns1.diffdomainname.com and so on in your website hosting panel. This will serve your issue if your site is down from one server, it easily picks the site from other server.
If you are a webmaster, you must know it. Else, please contact your site webmaster to edit your domain name servers.
Kindly reply if this was useful tip for you and visit our website to know more tips and tricks.
This is something your host will be able to help you with. You/they will set up a load balancing server or router. This will have the external ip address of your website and all requests for your website will come to this machine. This machine then passes the request to other servers on a local network. These other servers have no direct access to the internet.
With the db server, you “just” point the database connection of the other servers to the db server, usually on a local network. Again, the db server doesn’t need direct access to the internet.
And what is “dbs in sync” with mysql :-?
If you have more than one database server and you add a record to a table in one of the databases, somehow you need to add the same data to all the other databases. Your application will determine how often you need to syncrhonise the data between the databases. Having only one database server means you don’t have to worry about this problem.
As has been said, the first step is often setting up a second server as a database server.
with some site, this is image link .
So, when during article editing, how editor can make this file ?
one article / one folder host image file ?!
and upload it to other server ?
If you have more than one database server and you add a record to a table in one of the databases, somehow you need to add the same data to all the other databases. Your application will determine how often you need to syncrhonise the data between the databases. Having only one database server means you don’t have to worry about this problem.
As has been said, the first step is often setting up a second server as a database server.
How can i do it with mysql?
so then, if i have 2 DB servers, i need two query to insert into DB ?