memcached: an in-depth discussion about caching.

Slides:



Advertisements
Similar presentations
MFA for Business Banking – Security Code Multifactor Authentication: Quick Tip Sheets Note to Financial Institutions: We are providing these QT sheets.
Advertisements

MEMCACHE FOR BIGINNERS
Fast Data at Massive Scale Lessons Learned at Facebook Bobby Johnson.
Client side performance in Web based Banking applications Divakar Prabhu Infosys Limited (NASDAQ: INFY)
By: Chris Hayes. Facebook Today, Facebook is the most commonly used social networking site for people to connect with one another online. People of all.
Building Wikipedia Scalable LAMP on a shoestring budget Brion VibberGatorJUG
Web Servers How do our requests for resources on the Internet get handled? Can they be located anywhere? Global?
Lecture 2 Web application architecture. Themes Architecture : The large scale structure of a system, especially a computer system Design choice: The need.
Multiple Tiers in Action
1 CS6320 – Why Servlets? L. Grewe 2 What is a Servlet? Servlets are Java programs that can be run dynamically from a Web Server Servlets are Java programs.
INTRO TO MAKING A WEBSITE Mark Zhang.  HTML  CSS  Javascript  PHP  MySQL  …That’s a lot of stuff!
Apache Jakarta Tomcat Suh, Junho. Road Map Tomcat Overview Tomcat Overview History History What is Tomcat? What is Tomcat? Servlet Container.
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
SYST Web Technologies SYST Web Technologies Installing a Web Server (XAMPP)
TOPIC 1 – SERVER SIDE APPLICATIONS IFS 234 – SERVER SIDE APPLICATION DEVELOPMENT.
Creating a Web Presence Introduction to WordPress Week 1.
What makes Facebook do what it does? By Gavin Mais.
WEB-ENHANCED INFORMATION MANAGEMENT (COMS E6125) SPRING 2008 (CVN) NAVID AZIMI (NA2258) Web Platforms, or: How I Learned To Stop Worrying And Love Facebook.
CIS 451: Servers, CGI and Log Files Dr. Ralph D. Westfall January, 2009.
L. Grewe LAMP, WAMP and... Motivaiton Basic Web Systems with Delivery of Static and Dynamic Web Pages html, css, media javascript (“dynamic” on client.
State Management. What is State management Why State management ViewState QueryString Cookies.
PHP With Oracle 11g XE By Shyam Gurram Eastern Illinois University.
Computer Measurement Group, India Optimal Design Principles for better Performance of Next generation Systems Balachandar Gurusamy,
Lecture 19 Web Application Frameworks Boriana Koleva Room: C54
National Center for Supercomputing Applications NCSA OPIE Presentation November 2000.
Syllabus Management System. The Problem There is need for a management system for syllabi that: Provides a simple and effective user interface Allows.
SQLRX – SQL Server Administration – Tips From the Trenches SQL Server Administration – Tips From the Trenches Troubleshooting Reports of Sudden Slowdowns.
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
By Shanna Epstein IS 257 September 16, Cnet.com Provides information, tools, and advice to help customers decide what to buy and how to get the.
The Metadata Tool Custom Metadata Tool Who this tool is for: This tool designed to be used a data management system. This tool is geared more for the.
RDF languages and storages part 1 - expressivness Maciej Janik Conrad Ibanez CSCI 8350, Fall 2004.
Google App Engine MemCache ae-09-session
Budgeting Tool Brandon Ganch Chris George Paul Perello Mike Schmidt.
Apache, MySQL and PHP Installation and Configuration Chapter 2 MySQL Installation and Configuration.
Node.Js 1. 2 Contents About Node.Js Web requirement latest trends Introduction Simple web server creation in Node.Js Dynamic Web pages Dynamic web page.
SPI NIGHTLIES Alex Hodgkins. SPI nightlies  Build and test various software projects each night  Provide a nightlies summary page that displays all.
 cfObjective(ANZ)– November 17-18, 2011  Mike Brunt – CFWhisperer.
Web Server Security: Protecting Your Pages NOAA OAR WebShop 2001 August 2 nd, 2001 Jeremy Warren.
Web Cache. What is Cache? Cache is the storing of data temporarily to improve performance. Cache exist in a variety of areas such as your CPU, Hard Disk.
MY SQL INTRODUCTION TO LOGIN BASIC COMMANDS OTHER COMMANDS.
Apache ZooKeeper CMSC 491 Hadoop-Based Distributed Computing Spring 2016 Adam Shook.
SDN controllers App Network elements has two components: OpenFlow client, forwarding hardware with flow tables. The SDN controller must implement the network.
Tips for using Java with Internet Explorer
Platform as a Service (PaaS)
Web Programming Language
Understanding and Improving Server Performance
Data Virtualization Demoette… Logging in CIS
Top 8 Best Programming Languages To Learn
Running a Forms Developer Application
Platform as a Service (PaaS)
PGT(CS) ,KV JHAGRAKHAND
Are You There, DBA? It’s Me, The App Developer.
Introduction and Principles
Existing Perl/Oracle Pipeline
Web Programming– UFCFB Lecture 8
Developing Web-Based Applications
PHP / MySQL Introduction
Software Architecture in Practice
LAMP, WAMP and.. L. Grewe.
Top 5 Issues of Mozilla Firefox Browser in Problem 1: Firefox Not Responding, Slow  Feb 2018 Firefox is not working properly. It is slow to load,
ISC440: Web Programming 2 Server-side Scripting PHP 3
Scaling and Performance
DataMart (Data Warehouse) Tool:
IntroductionToPHP Static vs. Dynamic websites
Magento 1 support will end in What next?. Magento development officials have announced that they will extend the support for Magento 1 sites till.
Web Programming– UFCFB Lecture 8
Technical Integration Guide
NAVIGATING THE MINEFIELD
Mark Quirk Head of Technology Developer & Platform Group
Web Application Development Using PHP
Presentation transcript:

memcached: an in-depth discussion about caching.

Who am I? Michael Tougeron Senior Software Engineer & Engineering Manager for CNET Entertainment “Games” (GameSpot.com, GameFaqs.com, SportsGamer.com, and GameRankings.com) I mumble, go off-topic, & skip around. Feel free to stop me.

What is memcached? A distributed memory caching system that runs on one or more Linux servers. Fast connections & data retrieval Clients exist for PHP, Perl, Python, Java, C#, C & Ruby; even has database extensions You could write your own client if you need to From a ‘pages served’ perspective, gamefaqs is the biggest, with gs a close second. Just goes to show that how to play the games is more interesting than news about the games. TV is a close third place follwed by mp3 and then the newer sites filmspot and sportsgamer. Very differnet audiences for each site - eg: for gamespot we can safely assume a 1027x768 resolution, where for tv 800 x 600 is the norm. Audience makes a huge difference. Also, the sites each have a HUGE amount of data. They are very broad topics, and each page that we show tends to aggregate a lot of information. Our pages tend to be very ‘heavy’ with data base calls. So how do we support it?

What can I use it for? GameSpot uses memcached for: Faux temporary session handler An alternative to MySQL memory tables (for non-critical data) A caching layer to limit the connections & queries that hit the databases It’s faster than MySQL query cache A trigger for per-www server events Your imagination here? From a ‘pages served’ perspective, gamefaqs is the biggest, with gs a close second. Just goes to show that how to play the games is more interesting than news about the games. TV is a close third place follwed by mp3 and then the newer sites filmspot and sportsgamer. Very differnet audiences for each site - eg: for gamespot we can safely assume a 1027x768 resolution, where for tv 800 x 600 is the norm. Audience makes a huge difference. Also, the sites each have a HUGE amount of data. They are very broad topics, and each page that we show tends to aggregate a lot of information. Our pages tend to be very ‘heavy’ with data base calls. So how do we support it?

PHP Client options PHP has built-in memcached functions Faster since it doesn’t need to compile at run-time Cannot customize functionality Not clear which versions support it A custom PHP class that uses sockets Slower, but do you really see a difference? Can customize interaction with memcached daemon

GameSpot uses a PHP class We’ve added functionality to track whether or not data has been returned from memcached Allows us to distinguish between ‘falsy’ values vs no data stored in memcached This is important for data elements where 0 or false values are appropriate data points to store

What’s this class look like? http://michael.5.dev.gamespot.com/memcached-client.code.php

Create a wrapper to the memcached client Allows you to add flags defining interaction Debug flag Clear cache elements for the page Load page not using cache Semaphore/Mutex Again, your imagination goes here.

What’s the wrapper class look like? http://michael.5.dev.gamespot.com/memcached_wrapper.code.php

Potential issues with memcached Need to track cache keys so that you can clear the cache when the data has been updated No wildcard matches. No, there probably won’t ever be. Yes, we’ve asked.  Need to create a tool to see values stored in memcached so that you can troubleshoot If all servers are not using the same pool of memcached servers, you can get weird data results If memcached servers are reset, the site will probably run slow until keys are recreated (takes GameSpot 10 to 15+ minutes)

Questions? Sources: Danga: http://www.danga.com/memcached/ PHP: http://us.php.net/memcached LiveJournal Plugin: Ryan T. Dean <rtdean@cytherianage.net> Various CNET developers: http://www.cnetnetworks.com/careers/ Contact me: Michael Tougeron (aka Mike or Touge) michael.tougeron@cnet.com