about repcache: asynchronous data repliacation. why my implementation works? i make load balance per user all write is always on only one server if server down all users get back to the stand alone master
i´m using linux server (archlinux) to sync i start repcache, wait it get in sync (i´m using a php script) and after start http 2011/4/5 Roberto Spadim <robe...@spadim.com.br>: > hum, repcache don´t have many information > it´s a older memcache version with a patch to make replication > > at comand line you talk to what IP to 'replicate' > when one server get down and get up again, it first sync information > from 'master' > any information changed in one server is send to another (i don´t > remember if it´s sync/async, i´m using per user load balance) > with http/php just select memcache as session handler > > > second solution, create a php session class (ok it´s not default for > most php solutions) there´s some php scripts that you can run in every > php http request, put your class there and change session handler > (with this you new class get the place of php session handler) > there´s some information here: > http://br2.php.net/manual/pt_BR/function.session-set-save-handler.php > > check that php only save / read once at start(read) and end(write) of > http request > > > 2011/4/5 Mohit Anchlia <mohitanch...@gmail.com>: >> Thanks! I am unable to find design doc or some kind of "how it works" >> doc on repcached. Do you have that info handy? >> >> Also, how do I integrate it with apache httpd. >> >> Thanks again for the link. >> >> On Tue, Apr 5, 2011 at 3:40 PM, Roberto Spadim <robe...@spadim.com.br> wrote: >>> hum, sync must be done before users are allowed to use service? >>> try this http://repcached.lab.klab.org/ >>> membase is a nosql (it can save information on disk), i don´t know if >>> it do replication like repcache but theres some 'cluster' in docs: >>> http://techzone.couchbase.com/wiki/display/membase/Membase+Servers%2C+Nodes+and+Clusters >>> >>> i´m using repcache in a slow connection, it works >>> >>> 2011/4/5 Mohit Anchlia <mohitanch...@gmail.com>: >>>> One important thing. User will be stuck on one site for one hour which >>>> will allow for data replication to occur. So a User should not be load >>>> balanced to other site until one hour is expired. >>>> >>>> On Tue, Apr 5, 2011 at 3:30 PM, Mohit Anchlia <mohitanch...@gmail.com> >>>> wrote: >>>>> Currently there is no memcache. I was thinking of using memcache to do >>>>> store user session per site info and redirect if user came to wrong >>>>> site, but memcached seems to be not meant to be master/master or >>>>> master/slave either. Generally industry practice is such use cases is >>>>> to use cookies but we can't even use that because most of our apps are >>>>> non-browser based app. Flow is something like this for eg: >>>>> >>>>> desktop client -> service X -> our service in either data center. >>>>> >>>>> So essentially client calls the server which then calls us. >>>>> >>>>> >>>>> >>>>> On Tue, Apr 5, 2011 at 3:24 PM, Roberto Spadim <robe...@spadim.com.br> >>>>> wrote: >>>>>> Problem here is that lot of traffic is generated internally by server >>>>>> hosted by other projects within same co. now this need to be load >>>>>> balanced. If we used geo then 70% of our traffic will be stuck on one >>>>>> site. If all our clients were browser based then it would have been >>>>>> easier. >>>>>> >>>>>> theres more than 1 app using the memcache? >>>>>> it´s a web host? what king of service/server? >>>>>> >>>>>> >>>>>> >>>>>> 2011/4/5 Mohit Anchlia <mohitanch...@gmail.com>: >>>>>>> BTW: Please do read my initial post again if you have time. >>>>>>> >>>>>>> On Tue, Apr 5, 2011 at 3:11 PM, Mohit Anchlia <mohitanch...@gmail.com> >>>>>>> wrote: >>>>>>>> I haven't seen any project that solves this use case. Do you know of >>>>>>>> any? >>>>>>>> >>>>>>>> On Tue, Apr 5, 2011 at 2:44 PM, Roberto Spadim <robe...@spadim.com.br> >>>>>>>> wrote: >>>>>>>>> hummm i think it´s not innovative, there´s some open projects that >>>>>>>>> solve this, you should check before developing the whell again >>>>>>>>> >>>>>>>>> 2011/4/5 Mohit Anchlia <mohitanch...@gmail.com>: >>>>>>>>>> Thanks everyone for replying. There is no easy solution for the >>>>>>>>>> requirements being imposed upon us. Even though we have Oc3 still >>>>>>>>>> this >>>>>>>>>> may not work sine memcached seems to be hash accross the servers >>>>>>>>>> architecture and not master/master type architecture. >>>>>>>>>> >>>>>>>>>> I will have to come up with some other innovative idea to solve this >>>>>>>>>> particular complex requirement. >>>>>>>>>> >>>>>>>>>> On Mon, Apr 4, 2011 at 11:23 PM, Dustin <dsalli...@gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>> On Apr 4, 9:28 pm, Roberto Spadim <robe...@spadim.com.br> wrote: >>>>>>>>>>> >>>>>>>>>>>> i'm using repcache without problem, if one server die the other >>>>>>>>>>>> have >>>>>>>>>>>> the same information, when other server is up it's automatic sync >>>>>>>>>>>> with >>>>>>>>>>>> the 'master' >>>>>>>>>>>> it works well with php memcache session handler >>>>>>>>>>>> but a good session handler could be a nosql database (membase) >>>>>>>>>>>> since >>>>>>>>>>>> it's not a cache, it's a database... >>>>>>>>>>> >>>>>>>>>>> Membase doesn't currently have cross datacenter master/master >>>>>>>>>>> replication that can compensate for inconsistencies introduced by >>>>>>>>>>> network outages or latency when a user is jumping back and forth >>>>>>>>>>> between two data centers. Anything that *can* is going to be much >>>>>>>>>>> slower. >>>>>>>>>>> >>>>>>>>>>> I think Brian's got it there. Your best bet is to keep the users >>>>>>>>>>> contained where networks are fast. RTT between SF and VA is >>>>>>>>>>> something >>>>>>>>>>> like 20ms. Replication doesn't help the situation. You might as >>>>>>>>>>> well >>>>>>>>>>> pin the data for the user in one data center and just fetch it >>>>>>>>>>> across >>>>>>>>>>> the country every time (which is effectively what AP systems will >>>>>>>>>>> do). >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Roberto Spadim >>>>>>>>> Spadim Technology / SPAEmpresarial >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Roberto Spadim >>>>>> Spadim Technology / SPAEmpresarial >>>>>> >>>>> >>>> >>> >>> >>> >>> -- >>> Roberto Spadim >>> Spadim Technology / SPAEmpresarial >>> >> > > > > -- > Roberto Spadim > Spadim Technology / SPAEmpresarial > -- Roberto Spadim Spadim Technology / SPAEmpresarial