Category: operations

Total 11 Posts

MariaDB – old passwords

I have been evaluating swapping out MySQL with MariaDB. As advertised, so far it has been a pretty plug and play replacement. With one exception…

For some reason, our MySQL configuration file had the system variable old_passwords set to 1. No issues showed up when using the command line client.

However, when I tried to attach Tomcat to the database it failed. A quick web search showed that this is a well know issue and all that had to be done was upgrade the passwords.

References:
"Unable to load authentication plugin." when trying to connect to MariaDB
Upgrading passwords from old_passwords to "new passwords"

Video Notes – Bret Piatt interviewed at Velocity 2010

Marc Slocum interviews Bret Piatt
Bret Piatt, Technical Alliances, Rackspace Hosting
2010 O’REILLY Velocity – Web Performance and Operations Conference
June 22 – 24, 2010
5 min, 17 sec
http://www.youtube.com/watch?v=_d1YJs74rRM

My Notes:

  • Cassandra differs
    • No relational schema
    • Create columns and column families
  • Good for
    • Large scale sites with lots of similar data
  • If don’t have enough data for 8 node cluster (25 GB per cluster), not looking to grow to TB, probably better sticking with traditional database infrastructure
  • Cloud Computing
  • Why are open standards important? Enterprises are hesitant to repeat work – especially in a new environment.

 

 

Video Notes – Ismail Elshareef interviewed at Velocity 2010

Marc Slocum interviews Ismail Elshareef
Ismail Elshareef, VP of Tech., Razorgator, Inc
2010 O’REILLY Velocity – Web Performance and Operations Conference
June 22 – 24, 2010
3 min, 43 sec
http://www.youtube.com/watch?v=yZuNYwsHvQI

My Notes:

  • Biggest issues with ads and site performance
    • Network latency – no control over various assets retrieved
  • Expectation
  • No fair to expect site with advertising to perform as well as no advertising
  • Unless ad is served in an iframe
  • What can be done
    • Develop plan to minimize impact of 3rd party code on site
    • Work with CMS
    • Order items are loaded on the page
  • Single thing to improve ads and site performance
  • Get rid of document.write in javascript ad – allow site developer to have control of when to call loading of assets
  • Optimum ad slots: 2 should be enough

 

 

Simple Java Program to Verify SSL Certificate

I was recently install some certificates into my local store and wanted to verify that they were working correctly. I put together a simple Java program that verifies the target sites can be loaded.


/**
* SSL Test -- tests that JVM is configured correctly to load an SSL certificate
*/
package com.meesqa.sample;

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpMethod;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.methods.GetMethod;

public class SSLTest
{

public static final String test1URL = "https://www.google.com/";
public static final String test2URL = "https://login.live.com/";

public static void testURL( String url )
{
HttpClient client = new HttpClient();
HttpMethod method = new GetMethod( url );

try
{
client.executeMethod( method );

if( method.getStatusCode() == HttpStatus.SC_OK )
{
System.out.println( url + " access OK." );
}
else
{
System.out.println( url + " access FAILED." );
}
}
catch( Exception e )
{
System.out.println( url + " access FAILED with an exception: " + e.getMessage() );
}
}

public static void main( String[] args )
{
SSLTest.testURL( test1URL );
SSLTest.testURL( test2URL );
}

}

Running the program tests the 2 urls specified:

java com.meesqa.sample.SSLTest
https://www.google.com/ access OK.
https://login.live.com/ access OK.

 

Video Notes – Joshua Bixby interviewed at Velocity 2010

Marc Slocum Interviews Joshua Bixby
Joshua Bixby, President, Strangeloop Networks
2010 O’REILLY Velocity – Web Performance and Operations Conference
June 22 – 24, 2010
6 min, 43 sec
http://www.youtube.com/watch?v=0cJmNsKmTsQ

My Notes:

  • User expectations of mobile in terms of optimization
    • Very little data to answer scientifically
    • Long term need desktop and mobile site performance to come together
  • Need to collect the data before setting benchmarks
  • Acceleration and Business Benefits Research
    • Huge payback for performance improvement
  • Initial thing that a company should do
    • Set benchmarch and understand how user sees the site
    • Keep alives on
    • Compression on
  • Workshop
    • Analyzed Velocity home page
    • Made worse than reality and brought it to current then improved

 

 

Video Notes – Nicholas Zakas interviewed at Velocity 2010

Nicholas Zakas interviewed at Velocity 2010
Nicholas Zakas, Principal Front End Engineer, Yahoo!
2010 O’REILLY Velocity – Web Performance and Operations Conference
June 22 – 24, 2010
6 min, 26 sec
http://www.youtube.com/watch?v=2ERgBl6LKb8

My Notes:

  • Yahoo home page reorg in 2009
    • Moved from static to interactive / customizable
  • Time to interactivity metric
    • Time between hitting enter on URL and can complete an interaction on a page
    • Sometimes even before the page has finished loading
    • Aim to minimize this time
  • Metrics we should avoid
    • Most are useful
    • Should not focus in on any one item
    • Focus will depend on the usage pattern of the page
  • Yahoo home page as an application framework
    • People think of it as a single page
    • Same framework is running home page around the world
    • Difference between building an application and an application framework

 

 

Video Notes – Robert Johnson interviewed at Velocity 2010

Robert Johnson interviewed at Velocity 2010
Robert Johnson, Director of Engineering, Facebook
2010 O’REILLY Velocity – Web Performance and Operations Conference
June 22 – 24, 2010
7 min, 4 sec
http://www.youtube.com/watch?v=wXTCPnuDGbg

My Notes:

  • User expectations of mobile in terms of optimization
    • Very little data to answer scientifically
    • Long term need desktop and mobile site performance to come together
  • Need to collect the data before setting benchmarks
  • Acceleration and Business Benefits Research
    • Huge payback for performance improvement
  • Initial thing that a company should do
    • Set benchmarch and understand how user sees the site
    • Keep alives on
    • Compression on
  • Workshop
    • Analyzed Velocity home page
    • Made worse than reality and brought it to current then improved

 

 

Velocity 2010: Tom Cook, “A Day in the Life of Facebook Operations”

Here are my notes from the the Velocity 2010 lecture "A Day in the Life of Facebook Operations"

A Day in the Life of Facebook Operations
Tom Cook, Facebook
Velocity 2010
June 22-24, 2010
(40 minutes, 48 seconds)

  • Description of the size of Facebook in terms of minutes on site, pieces of new content, etc.
  • User growth curve
  • Server footprint growth curve
  • Bay area and Virginia (and soon Oregon)

The stack:
Load Balancer -> (assigns a web server)
Web Server -> (assembles data)
Services (fast, complicated), Memcashed(fast, simple), Databases (slow, persistent)

Web server (HipHop for PHP)

  • source code transformer
  • converts PHP to C++, compiled with gcc

Memcached

  • 300+ TB live data in RAM

MySQL

  • persistent store
  • lots of sharding
  • facebook.com/MySQLatFacebook

Services

  • news feed, search, chat, ads, media, etc.

Operations is supplying a platform for the Facebook developers to deploy
So, below the stack, we have:

Deployment, Monitoring
Systems Management
Core Operating System

Operating System

  • Linux
  • CentOS 5 variant with custom kernel

Systems Management

  • Configuration management
    • Facebook uses CFengine
    • Update every 15 minutes, about 30 sec run on each machine
  • On demand tools
    • No open source solution that meets Facebook needs (used to use DHS)
    • Wrote their own internal tool

Deployments

  • Push for frontend code (web push)
    • At least once a day, frequently multiple times a day (bug fixes, etc.)
    • New features at least once a week
    • Built on top of on-demand control tools
    • Code distributed by BitTorrent (1 minute to push code to all servers)
  • Backend deployments
    • Formal QA process removed, QA is responsibility of engineers
    • Engineers deploy their own code
    • No ‘commit and quit’ mentality
    • Ops ’embedded’ into engineering teams
    • Change logging (every change, who, start time and end time)

Monitoring

  • Ganglia (systems focus, graphing), (http://ganglia.sourceforge.net/)
  • ODS (application focus), written by Facebook
  • Nagios (ping, ssh, server up, etc.), alerting feeds into internal tools
  • Aggregate alarms, drilldown capabilities

What Facebook operations deals with…

  • Constant Growth
  • Constant Failures

Look at network as logical units and dependencies

  • Servers
  • Racks
  • Clusters (some thousand # of hosts)
  • Data centers

Constant Communications

  • IRC
  • Internal news updates
  • Banners on top of lots of tools with alerts as to current status
  • Change logs / feeds
  • Small teams

Recap

  • Version control everything
  • Optimize early
  • Automate
  • Use configuration mangement
  • Plan to fail
  • Instrument everything

 

 

Velocity 2010: Nicole Sullivan, “The Top 5 Mistakes of Massive CSS”

The following are my notes from this presentation at the Velocity 2010 conference:

The Top 5 Mistakes of Massive CSS
Nicole Sullivan, Consultant
Stoyan Stefanov, Google
2010 O’REILLY Velocity – Web Performance and Operations Conference
June 22 – 24, 2010

(Length 37 minutes, 54 seconds)

(Some demo isssues the first couple of minutes of the video…)

Why optimize CSS?

  • It blocks progressive rendering
  • Does not minimize as well as javascript

Top 1000 Alexa Sites Study

  • 42% don’t gzip CSS
  • 44% more than 1 CSS file
  • 56% serve CSS with cookie
  • 62% don’t minify
  • 21% have > 100K of CSS

Object oriented CSS is a way to make CSS smaller.

  • Concentrate on the selector
  • Example: Grids projects, 574 butes, 14 lines

Granularity Fail + Stale Rules + Unpredicatbility + Duplication + Specificity Wars = Massive CSS

#5 Granularity Fail

  • should not match underlying programming object model
  • compare to legos – use CSS similarly
  • How to determine if correct
  • 1) Perform a visual inventory
    • Take a site object
    • Break it down into component CSS objects
    • Look for repeating patterns, for example headings
  • 2) Develop library of component parts

#4 State Fails

2 types of stale:

  • Truly stale – no longer in use
  • Rules used after user action or on subsequent pages

  • Try dust-me selectors
  • Track over time

#3 Unpredictability

  • Elements should be consistent across site (like lego bricks that don’t change behavior depending on where they are used…)
  • How to test? Search for repeating definitions of same item (for example grep h[1-6]

#2 Specificity Wars

  • Programmers making items more specific in order to prevent others from overriding their settings

How to simplify:

  • Use hacks sparingly
  • Avoid styling ids
  • Avoid !important

What to do

  • Style classes rather than elements
  • Give rules the same strength

#1 Duplication

  • Grep is your friend
  • grep for margin set to zero – too many, may need a reset stylesheet
  • grep for float – too many, may need grid system
  • grep for font-size – may be heading disguised as something else
  • Example from Facebook

 

 

Remote Desktop Keyboard Shortcuts

I often use Microsoft’s remote desktop software to connect to various machines. My hands also use shortcuts for various actions via pure muscle memory. However, when using remote desktop, the operating system interprets many keystrokes as destined for the host operating system. This makes perfect sense but usually sends me scrambling to find the keyboard equivalent for the remote session.

The shortcuts are documented on various websites and in Microsoft’s own documentation. I will add yet another page on the web with this information purely for my own convenience.

Display Windows Security dialog CTRL+ALT+DEL CTRL+ALT+END
Start Menu CTRL-ESC ALT+HOME
Windows Menu N/A ALT+DELETE
Action Host Remote
Switch between programs ALT+TAB ALT+PAGE UP
ALT+SHIFT+TAB ALT+PAGE DOWN
ALT+ESC ALT+INSERT
Copy snapshot of active window to clipboard PRINT SCREEN CTRL+ALT+MINUS (on keypad)
Copy snapshot of full session to clipboard ALT+PRINT SCREEN CTRL+ALT+PLUS (on keypad)