Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 14

Seminar on

Memcached

By

Jakir shaikh
SE comp

Content
1 Who all are using it. 2 History of Memcached. 3 Three Ws. 4 Where does memcached reside. 5 Why to use Memcached. 6 Pseudo implementation. 7 Why not use memcache? 8 Possible ways to secure memcached.

Who all are using it?

History of Memcached
Brad Fitzpatrick from Danga Interactive developed memcached. Memcached reduced the database load. better resource utilization. Facebook is the biggest user of memcached.

Three Ws
What is Memcached?
Memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

When can we use it?


Anywhere, if you have spare RAM Mostly used in wiki, social networking and book marking sites.

Why should we use it?


If you have a high-traffic site that is dynamically generated with a high database load that contains mostly read threads then memcached can help lighten the load on your database.

Where does memcached reside?


Memcache is not part of the database but sits outside it on the server(s). Over a pool of servers

Pseudo Implementation
http://localhost
2Gb RAM reserved for caching the resultset

Cache the serialized resultset in memory 1st time Query Checks cache and if not found extracts from database

PHP DB API

Database

Pseudo Implementation
http://localhost
2nd time Query Checks cache, resultset already found. Un-serialize and return the resultset

2Gb RAM reserved for caching the resultset

PHP DB API

Database

Why not use memcache?


You have objects larger than 1MB. You have keys larger than 250 chars. You're running in an un-secure environment. You want persistence. Or, a database.

Possible ways to secure memcached


It has no authentication system - so protection is important Run as a non-priveledged user to minimize potential damage Specify the ip address to listen on using -l
127.0.0.1, 192.168.0.1, specific ip address

Use a non-standard port Use a firewall

Conclusion
memcached is a high-performance, distributed memory object caching system, generic in nature. security should be taken.

Reffernce
www.google.com www.wikipedia.com www.memcached.org

ANY

Questions?

Thank You.

You might also like