[Cialug] multi-national web app decisions

Josh More MoreJ at alliancetechnologies.net
Fri Oct 22 16:37:29 CDT 2010


Which MySQL replication (or alternate) that I would use would depend on the app.  Odds are I would start with multi-master and change things if I had problems.

So far as location-based stuff goes, I'd write a short Javascript that loads that uses the following logic.

If $loc_cookie exists, exit
Else
   start clock, download a 1k file from source 1, end clock, store var 1
   start clock, download a 1k file from source 2, end clock, store var 2
Whichever var is lowest, set $loc_cookie with a 72h life.

You should probably randomize whether it starts from source 1 or 2, just to make sure you're not optimizing based on DNS alone.

Is it perfect?  No, of course not.

Is it easy and probably good enough, yep.


-Josh More, CISSP, GIAC-GSLC, GIAC-GCIH, RHCE, NCLP
morej at alliancetechnologies.net<mailto:morej at alliancetechnologies.net>
515-245-7701
________________________________
From: cialug-bounces at cialug.org [cialug-bounces at cialug.org] on behalf of Matthew Nuzum [newz at bearfruit.org]
Sent: Friday, October 22, 2010 14:45
To: Central Iowa Linux Users Group
Subject: Re: [Cialug] multi-national web app decisions

On Fri, Oct 22, 2010 at 12:39 PM, Matthew Nuzum <newz at bearfruit.org<mailto:newz at bearfruit.org>> wrote:
If you were building a web app from scratch and you wanted it to be fast world-wide, what architectural decisions would you make? Using Linux, of course. In my case I have access to inexpensive DC space in the US and Europe. When a user makes a preference change in EU it should be changed everywhere, but it does not need to be instantaneous. As a matter of fact, what I have in mind should favor perceived front-end performance. I mean I'd prefer not to use a tool that adds 20ms of latency while data is replicated to another location.

Let me be more specific, would you use MySQL multi-master replication, standard replication or would you use some other database technology?

Also, what would you do to direct people to a location near them, would you use a DNS service , would you run your own DNS servers and configure them to do geo based serving, or would you use something else?

--
Matthew Nuzum
newz2000 on freenode, skype, linkedin, identi.ca<http://identi.ca> and twitter

"An investment in knowledge pays the best interest." -Benjamin Franklin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cialug.org/pipermail/cialug/attachments/20101022/5c9f08dc/attachment-0001.htm 


More information about the Cialug mailing list