Re[2]: [PHP] Re: 1 web site, 3 servers, 3 countries - best practises?

2005-04-22 Thread Richard Davey
Hello Drewcore / Jochem,

Friday, April 22, 2005, 4:45:37 AM, you wrote:

D are you talking about having one server in south america that acts
D as your database server, one server in asia that's your web server,
D and then another server in north america that servers some other
D task?

Not really - the scenario is more like this:

There is a primary set of servers in the US (one web, one DB, one file
server) - this handles all the master content (in English) as well
as the user logins, shop, etc. Content is translated to several
languages which the user can pick from, the site handles this just
fine. This all exists now.

But a vast majority of our customers live in Europe, and smaller but
no less significant sets in Russia and Japan, so duplicating this
content across a set of servers physically located there would be
extremely beneficial for them (speed-wise) where they don't all live
on the end of ADSL/cable connections.

The question originally was the best way to ensure these slaves
provide the exact same content as the master does.

For example one approach could be to sync the content on a file level,
perhaps another is that when the master CMS is updated these changes
are then propagated to the slaves in sequence (i.e. something done
from the PHP code itself rather than on a system level). It's really a
form of load balancing I guess, but application design for this kind
of environment is inherently different to the all sits on one box
that most people only have to deal with.

Further digging around has revealed this book on the subject:

Multi-Tier Application Planning with Php: Practical Guide for Programmers

(which I've ordered). I also found slides by Theo Schlossnagle from his
Scalable Internet Architecture talk at ApacheCon this year. Both these
things are addressing the design issues I'm now faced with, I'm just
extremely surprised no-one here has encountered them before.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 I do not fear computers. I fear the lack of them. - Isaac Asimov

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re[2]: [PHP] Re: 1 web site, 3 servers, 3 countries - best practises?

2005-04-22 Thread Richard Davey
Hello Jochem,

Friday, April 22, 2005, 8:13:15 AM, you wrote:

JM in a round about way he seems to be asking 'why'? which is not
JM totally invalid.

To be honest when I ask people why? I actually use that word (or at
least something closely related to it).

JM do you want/need a master/slave configuration
JM or true decentralisation and/or two way syncing?

See my reply to Drewcore for far more detail which answers the above.

JM sounds like a costly undertaking, not to be taken lightly... I'm
JM interested to understand the requirement that dictates such server
JM redundancy. Given the implied cost, planning/implementation should
JM probably left to a company who already knows the answers to your
JM questions :-/?

This isn't about redundancy, it's about enhancing the experience for
customers physically located thousands of miles away from the server
they are trying to access. So, bring the content closer to them and
drop their wait times massively. It's easy for those of us sat on the
end of cable connections to become complacent about this IMHO (i.e.
the Internet is fast enough now that you don't need to do this), but
in reality that's not really yet the case.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 I do not fear computers. I fear the lack of them. - Isaac Asimov

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re[2]: [PHP] Re: 1 web site, 3 servers, 3 countries - best practises?

2005-04-22 Thread Richard Lynch
On Fri, April 22, 2005 4:29 am, Richard Davey said:
 This isn't about redundancy, it's about enhancing the experience for
 customers physically located thousands of miles away from the server
 they are trying to access. So, bring the content closer to them and
 drop their wait times massively. It's easy for those of us sat on the
 end of cable connections to become complacent about this IMHO (i.e.
 the Internet is fast enough now that you don't need to do this), but
 in reality that's not really yet the case.

I believe, then, that you would best be served by focussing your search on
mirroring such as that done by, say, http://php.net

Seems to work well for them :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re[2]: [PHP] Re: 1 web site, 3 servers, 3 countries - best practises?

2005-04-22 Thread Christopher Fulton
  This isn't about redundancy, it's about enhancing the experience for
  customers physically located thousands of miles away from the server
  they are trying to access. So, bring the content closer to them and
  drop their wait times massively. It's easy for those of us sat on the
  end of cable connections to become complacent about this IMHO (i.e.
  the Internet is fast enough now that you don't need to do this), but
  in reality that's not really yet the case.

Here is something I have done in the past to speed up php/mysql pages
(should work with other databases though).  Basically, I noticed that
the majority of our database calls were read calls, rather than write
calls.  So, in all of the locations globally, I set up read-only
database servers, and also replicated the php code to all of the
sites, then still did all of the writes to the master server but,
all of the reads from each local read-only server.

Not sure if this is necessairily the best way to do things, but it
worked well for me, and sped things up quite a bit.  This does mean
you have 2 database connections always, 1 for reading, and 1 for
writing.

For mysql, look more at their website for how to set up replication
machines.  As far as the code goes, I just have a process that
straight copy's it from my master server.

-Chris

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php