Mobile app version of vmapp.org
Login or Join
Vandalay111

: What are the advantages and disadvantages of site mirroring The user Jason Towne advised me to put this question here, rather than on SO. So here goes: Question 1: When sites are mirrored,

@Vandalay111

Posted in: #Mirror #Server

The user Jason Towne advised me to put this question here, rather than on SO. So here goes:

Question 1:

When sites are mirrored, the content of their respective servers is synchronized (possibly automatically (live mirrors) or manually). Is this true? Are all servers 'equal', or does a main server exists? which then sends it changes to other 'children servers'? So all changes have to happen on the main server, and children servers are not allowed changes?

Question 2:

Expected advantages:


Global advantage: when a site that is originally hosted in the US is mirrored to a server in London, Europeans will benefit from this. They will have a better response time and because the amount of downloaders is cut down into two pieces (American and European servers) their download speeds can be higher.
Security: When one server crashes or is hacked, the other server can continue to operate normally.


Expected disadvantages:


If live mirroring is not used, some users will have to wait for renewed content.
More servers equals higher upkeep costs.


What other items can be added to these lists?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Vandalay111

2 Comments

Sorted by latest first Latest Oldest Best

 

@Sims2060225

There are a lot of different ways to mirror a site (and for different purposes, such as backups/high availablity, or for load balancing/distribution). You can use scheduled data transfers or two-way synchronization, or you can have changes pushed to the mirrors as they come in via the application, or you can set up database replication, which itself can be configured in different ways, such as a master-slave setup with multiple slaves to read from but writing only to the master database, or you can set up two-way replication with 2 or more co-masters, where you write to any of the database mirrors.

Depending on the setup, you could have different storage, performance, and bandwidth overhead. Depending on the application and setup, you can also have data consistency challenges. For some applications, you may need to take advantage of table locks to ensure the atomicity of transactions. And the more mirrors you need to keep synchronized, the greater the challenge becomes. This is one of the reasons why people often choose one-way master-slave replication so they don't need to deal with this problem. Of course, if you do that, then all changes need to be written to one server, regardless of the geographical location of the end user, and you only get the benefits of geographical proximity when reading from the slave databases. But if your application is heavy on reads and light on writes, then this might be a fair tradeoff.

In many cases, webmasters and developers just aren't equipped to deal with all of these complexities. If your intention is simply to back up your data, there are easier ways of going about it (heck, your web host probably already offers a stock solution). If your goal is to provide data redundancy and support application failover, cloud computing platforms and some VPSes can provide this without you needing to get your hands dirty. Or at the very least, they provide standard, well thought out and tried and tested solutions that you can employ simply by using their hosting platform and following their development guidelines.

CDNs are another low maintenance option. They're usually targeted at static data, but they can also be used to host dynamic data or provide application acceleration. The latter would require you to code to their CDN architecture and use their API, but it's still less work and provides higher availability and redundancy than if you set up database replication or some manual mirroring solution using multiple VPS or dedicated servers.

10% popularity Vote Up Vote Down


 

@Jessie594

To answer your first question the most common method of creation mirrors between servers is using a program called rsync on Linux/Unix systems. The basics on how to do this can be read here kb.liquidweb.com/using-rsync-to-transfer-and-synchronize-local-and-remote-systems/
The apache foundation also has a tutorial for creating mirror sites that also uses rsync so it's the common command for backups and mirrors.

A website hosted in London may not always be faster than a website hosted in the US. Which website would run faster one hosted on a single server with an OC-48+ connection and no other domains on the server in the US vs a website hosted on a home computer with broadband? Next comes CDN's which website uses CDN's while location plays a role in CDN's if your server is on a slow upstream it's going to affect your websites speed and the location means nothing.

In regards to security what you mean is by having redundant servers and load balancing. For that I suggest Scalr code.google.com/p/scalr/ it will monitor your servers and if one goes down bring another up.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme