William Ottley wrote:
Hello all,
I have the daunting task of trying to understand what a programmer
needs as in hardware and implementation.
I have a general understanding of memcached, in that it speeds up the
"reads" from the database, since it goes into ram, and not go into the
database itself all the time.
What I'd like to know, is if we have several databases, and web
servers using memcached grabbing allocated memory and sharing this
memory across the servers, what happens to "writes"?

#1 can you have lets say 5 servers (2 web, and 3 databases) in 1
geographical location using memcached, and 5 other servers in another
geographical area connected via VPN using memcached, will this work?
#2 if web user A reads from a load balancer that sends him to a
database server in the US, and he writes something into the database,
HOW can a user B read this "written" data if the load balancer sends
him to a server located in China?

the reading I understand, its the writing that I'm having issues
understanding how on a global environment other users can
simultaneously see that write....

:$ hope I explained my question properly.


Hopefully I understand your question. The magic of memcached reading/writing is in the client. Each memcached client installation that has the same configuration will read and write to the same servers for the same keys. So, if you configure your memcached clients to have a server list that includes servers across the VPN, the clients will all read from the same pool. However, I am not completely clear with how your network is set up. Do web servers in the US talk to DB servers in China? Or is the entire request handed off to a pool of servers in one geographical location? If the latter, it would make more sense to have each geographical location use its own set of memcached servers rather than making memcached requests over the VPN. Even if you are making db requests over the VPN, you may see a perfomance gain by having memcached clients only use a local pool. But a lot of my comments are based on my imagining what your infrastructure is.

Hope that helps.  If not, keep posting and we will help more.

--

Brian Moon
Senior Developer
------------------------------
http://dealnews.com/
It's good to be cheap =)

Reply via email to