The Internet used to be a relatively smaller place compared to today's Internet. Applications
were simpler, and most applications were getting a few hundred to thousands of requests
per day. But that didn't last for long, the internet growth exceeded all expectations and with
the boom of smart phones sales, servers started to choke, bottlenecks were congested
and application scalability was inevitable. Memcached was written to reduce the number of
database queries for the popular LiveJournal website, it was built as a general-purpose ultrafast memory-based caching service. Today, memcached is used by many other sites, including
Facebook, Youtube, Twitter, WordPress.com, Wikipedia, Digg, and the list keeps going. Many
others use memcached to speed up their applications at very large scale infrastructures.
Caching is not only for big websites. In today's world the load characteristics changed
dramatically, especially after the increasing number of mobile and tablet users accessing
native and web applications, the average load on a medium-sized website in today's world is
hundreds of thousands of requests per day. Serving pages as fast as possible is part of the
user experience you are delivering to your users, you need to put in a lot of effort, because
performance really matters!
Memcached is designed as a server-client service, this means that you connect to your
memcached server, using a client written in your programming language of choice, or you
will have to write a client yourself that speaks memcached protocol. Luckily, many clients
are already robust and stable and waiting for your next big thing to be a part of.
Memcached is open source and publicly available under the New BSD License, a modern
permissive license that allows you to do any kind of hacking and modifications if you want
to. You can find many forks of memcached available with many interesting ideas already
implemented in them, but even though, the original memcached code is still the most
popular and you can grab it from memcached.orgofficial website.
One of the interesting features of memcached is its ability to work in a highly scalable
manner; you can run memcached in a consistent-hashing-based cluster and your cache
will be partitioned across as many machines as you like, utilizing as much memory you
already have available on your servers, to speed up the page loads.
Jorge Arévalois a computer engineer from the Universidad Autónoma de Madrid, UAM.
He started developing Web applications with JS, PHP, and Python. In 2010, he began
collaborating with PostGIS and GDAL projects, after participating in GSoC 2009, creating the
PostGIS Raster GDAL driver. He currently works as a freelance Web/GIS developer and he
collaborates with geomati.cogroup i...