开发者

Can a website be hosted on 2 servers?

开发者 https://www.devze.com 2022-12-17 14:25 出处:网络
I was looking to change my hosting company, but then I thought开发者_如何学Go about hosting one of my sites on 2 servers, I know this Is possible but how can this be done?

I was looking to change my hosting company, but then I thought开发者_如何学Go about hosting one of my sites on 2 servers, I know this Is possible but how can this be done?

I need one of my sites to be hosted from 2 servers (2 different hosting companies)

Any way for this to happen without much hassles?


If you're developing with ASP.NET, it natively supports so called Web Farms and it's not difficult to set up. There are some caveats though. Local machine in-memory cache functionality does not work anymore obviously, and any session state would have to be configured to be managed by a state server and all values you put in session would have to be simple scalar ones or at least serializable.


For simplicity you would be best off hosting it in one datacenter.

If the problem is speed, start with optimizing your existing code. Since you running wordpress, look at the plugins your running. disable them all and turn them back on one by one. see how much of a difference the performance is. Use a caching plugin such as W3 Total Cache.

If that isn't enough consider a larger server. If your using shared hosting, get rid of that and move to a VPS. Slicehost and Linode are good options.

If you aren't comfortable running your own Server there are people out there who will run it for you. XenScale.com is one. (Full Discloser: I work for them)

If you traffic is such that you can't scale vertically (bigger hardware) you can scale horizontally (more servers) by setting up a cluster. This is pretty involved and not for the feint of heart but a good sysadmin can do this for you.


Looks like you are trying to load balance your site. I would suggest that you handle it as a DNS solution. You should have the same hostname set up for both the websites, and have your DNS with another server or a third party. If the primary website goes down, then make a change to your DNS to send it to the secondary website.

0

精彩评论

暂无评论...
验证码 换一张
取 消