Previous | Next --- Slide 39 of 58
Back to Lecture Thumbnails
cube

Elasticache makes it easy to set up Memcached or Redis as a key-value store.

afa4

Whose memory does memcached reside in? Database Server's?

Edit: The next slide mentions that there are multiple memcached servers and I believe the memcached store reside in those servers' memory.

rokislt10

I know there is a difference, but I'm struggling to think of specifically how this is different from the proxy lab that we made in 15-213. It seems to have pretty much the same general idea.

russt17

@rokislt In proxy lab the proxy ran on the client machine and stood between the client and the server. Here, memcached is on the server side, and sits in between the web servers and the database, and caches the results of recent database queries since database queries can take a fair amount of time to process.

So in proxy lab the proxy cached to hide network latency, here memcached caches to hide database latency.

I think that's right, someone correct me if I've got it wrong.

abist

@russt17 I think you're right, agreed with your analysis.

Kapteyn

Using memcached reminds me of the .persist() function in Spark, which allows us to keep intermediate data around for future computations so that we don't have to access HDFS again.