Blogs

Todd Hoff's picture

Welcome to High Scalability

We started High Scalability to help you build successful scalable websites. This site tries to bring together all the lore, art, science, practice, and experience of building scalable websites into one place so you can learn how to build your system with confidence. Hopefully this site will move you further and faster along the learning curve of success. Please Start Here.

The Art of Capacity Planning: Scaling Web Resources

Update 3: The book was released! Find it on Amazon at The Art of Capacity Planning.
Update 2: Maybe the iPhone can use a little capacity planning? What's Behind the iPhone 3G Glitches: One source says Apple programmed the Infineon chip to demand a more powerful 3G signal than the iPhone really requires. So if too many people try to make a call or go on the Internet in a given area, some of the devices will decide there's insufficient power and switch to the slower network—even if there is enough 3G bandwidth available.
Update: To get a taste of what will be served, mySQL DBA has a nice post titled Capacity Planning, Architecture, Scaling, Response time, Throughput. You learn how to figure out when your application will break by building a 3rd order polynomial. Cool stuff!

John Allspaw who is the Operations Engineering Manager at Flickr is about to publish a book with O'Reilly.

There are not much details so far but it seems interesting and relevant to High Scalability.

Allspaw combines personal anecdotes from many phases of Flickr's growth with insights from his colleagues in many other industries to give you solid guidelines for measuring your growth, predicting trends, and making cost-effective preparations.

Topics include:

  • Evaluating tools for measurement and deployment
  • Capacity analysis and prediction for storage, database, and application servers
  • Designing architectures to easily add and measure capacity
  • Handling sudden spikes
  • Predicting exponential and explosive growth
  • How cloud services such as EC2 can fit into a capacity strategy

The Art of Capacity Planning: Scaling Web Resources is available for pre-order on amazon.com

Second Life Architecture - The Grid

Second Life is a 3-D virtual world created by its Residents. Virtual Worlds are expected to be more and more popular on the internet so their architecture might be of interest. Especially important is the appearance of open virtual worlds or metaverses.
What happens when video games meet Web 2.0? What happens is the metaverse.

Information Sources

Platform

What's Inside?

The Stats

  • ~1M active users
  • ~95M user hours per quarter
  • ~70K peak concurrent users (40% annual growth)
  • ~12Gbit/sec aggregate bandwidth (in 2007)

The Pattern Bible for Distributed Computing

Software design patterns are an emerging tool for guiding and documenting system design. Patterns usually describe software abstractions used by advanced designers and programmers in their software. Patterns can provide guidance for designing highly scalable distributed systems. Let's see how!

Patterns are in essence solutions to problems. Most of them are expressed in a format called
Alexandrian form which draws on constructs used by Christopher Alexander. There are variants but most look like this:

  • The pattern name
  • The problem the pattern is trying to solve
  • Context
  • Solution
  • Examples
  • Design rationale: This tells where the pattern came from, why it works, and why experts use it

Patterns rarely stand alone. Each pattern works on a context, and transforms the system in that context to produce a new system in a new context. New problems arise in the new system and context, and the next ‘‘layer’’ of patterns can be applied. A pattern language is a structured collection of such patterns that build on each other to transform needs and constraints into an architecture.

The latest POSA book Pattern-Oriented Software Architecture Volume 4: A Pattern Language for Distributed Computing will guide the readers through the best practices and introduce them to key areas of building distributed software systems using patterns.

Event: CloudCamp Silicon Valley Unconference on 30th September

CloudCamp is an interesting unconference where early adapters of Cloud Computing technologies exchange ideas. With the rapid change occurring in the industry, we need a place we can meet to share our experiences, challenges and solutions. At CloudCamp, you are encouraged you to share your thoughts in several open discussions, as we strive for the advancement of Cloud Computing. End users, IT professionals and vendors are all encouraged to participate.

CloudCamp Silicon Valley 08 is scheduled for Tuesday, September 30, 2008 from 06:00 PM - 10:00 PM in Sun Microsystems' EBC Briefing Center
15 Network Circle
Menlo Park, CA 94025

CloudCamp follows an interactive, unscripted unconference format. You can propose your own session or you can attend a session proposed by someone else. Either way, you are encouraged to engage in the discussion and “Vote with your feet”, which means … “find another session if you don’t find the session helpful”. Pick and choose from the conversations; rant and rave, or sit back and watch.

At CloudCamp, we tend to discuss the following topics:

* Infrastructure as a service (Joyent, Amazon Ec2, Nirvanix, etc)
* Platform as a service (BungeeLabs, AppEngine, etc)
* Software as a service (salesforce.com)
* Application / Data / Storage (development in the cloud)

Guerrilla Capacity Planning and the Law of Universal Scalability

In the era of Web 2.0 traditional approaches to capacity planning are often difficult to implement. Guerrilla Capacity Planning facilitates rapid forecasting of capacity requirements based on the opportunistic use of whatever performance data and tools are available.

One unique Guerrilla tool is Virtual Load Testing, based on Dr. Gunther's "Universal Law of Computational Scaling", which provides a highly cost-effective method for assessing application scalability. Neil Gunther, M.Sc., Ph.D. is an internationally recognized computer system performance consultant who founded Performance Dynamics Company in 1994.

Some reasons why you should understand this law:

1. A lot of people use the term "scalability" without clearly defining it, let alone defining it quantitatively. Computer system scalability must be quantified. If you can't quantify it, you can't guarantee it. The universal law of computational scaling provides that quantification.

2. One the greatest impediments to applying queueing theory models (whether analytic or simulation) is the inscrutibility of service times within an application. Every queueing facility in a performance model requires a service time as an input parameter. No service time, no queue. Without the appropriate queues in the model, system performance metrics like throughtput and response time, cannot be predicted. The universal law of computational scaling leapfrogs this entire problem by NOT requiring ANY low-level service time measurements as inputs.

Wuala - P2P Online Storage Cloud

How do you design a reliable distributed file system when the expected availability of the individual nodes are only ~1/5? That is the case for P2P systems. Dominik Grolimund, the founder of a Swiss startup Caleido will show you how! They have launched Wuala, the social online storage service which scales as new nodes join the P2P network.

The goal of Wua.la is to provide distributed online storage that is:

  • large
  • scalable
  • reliable
  • secure

by harnessing the idle resources of participating computers.

This challenge is an old dream of computer science. In fact as Andrew Tanenbaum wrote in 1995:
"The design of a world-wide, fully transparent distributed filesystem fot simultaneous use by millions of mobile and frequently disconnected users is left as an exercise for the reader"

After three years of research and development at at ETH Zurich, the Swiss Federal Institute of Technology on a distributed storage system, Caleido is ready to unveil the result: Wuala. Wuala is a new way of storing, sharing, and publishing files on the internet. It enables its users to trade parts of their local storage for online storage and it allows us to provide a better service for free. In this Google Tech Talk, Dominik will explain what Wuala is and how it works, and he will also show a demo.

Product: Terracotta - Open Source Network-Attached Memory

Terracotta is Network Attached Memory (NAM) for Java VMs. It provides up to a terabyte of virtual heap for Java applications that spans hundreds of connected JVMs.

NAM is best suited for storing what they call scratch data. Scratch data is defined as object oriented data that is critical to the execution of a series of Java operations inside the JVM, but may not be critical once a business transaction is complete.

The Terracotta Architecture has three components:

  1. Client Nodes - Each client node corresponds to a client node in the cluster which runs on a standard JVM
  2. Server Cluster - java process that provides the clustering intelligence. The current Terracotta implementation operates in an Active/Passive mode
  3. Storage used as
    • Virtual Heap storage - as objects are paged out of the client nodes, into the server, if the server heap fills up, objects are paged onto disk
    • Lock Arbiter - To ensure that there is no possibility of the classic "split-brain" problem, Terracotta relies on the disk infrastructure to provide a lock.
    • Shared Storage - to transmit the object state from the active to passive, objects are persisted to disk, which then shares the state to the passive server(s).

JVM-level clustering can turn single-node, multi-threaded apps into distributed, multi-node apps, often with no code changes. This is possible by plugging in to the Java Memory Model in order to maintain key Java semantics of pass-by-reference, thread coordination and garbage collection across the cluster. Terracotta enables this using only declarative configuration with minimal impact to existing code and provides fine-grained field-level replication which means your objects no longer need to implement Java serialization.

Ari Zilka, the founder and CTO of Terracotta had a
video session
organized by Skills Matter. He will show you how it works and how you can start clustering your POJO-based Web applications (based on Spring, Struts, Wicket, RIFE, EHCache, Quartz, Lucene, DWR, Tomcat, JBoss, Jetty or Geronimo etc.).

Marcelb's picture

Distributed Computing & Google Infrastructure

A couple of videos about distributed computing with direct reference on Google infrastructure.
You will get acquainted with:

--MapReduce the software framework implemented by Google to support parallel computations over large (greater than 100 terabyte) data sets on commodity hardware
--GFS and the way it stores it's data into 64mb chunks
--Bigtable which is the simple implementation of a non-relational database at Google

Cluster Computing and MapReduce Lectures 1-5.

Pyshards aspires to build sharding toolkit for Python

I've been interested in sharding concepts since first hearing the term "shard" a few years back. My interest had been piqued earlier, the first time I read about Google's original approach to distributed search. It was described as a hashtable-like system in which independent physical machines play the role of the buckets. More recently, I needed the capacity and performance of a Sharded system, but did not find helpful libraries or toolkits which would assist with the configuration for my language of preference these days, which is Python. And, since I had a few weeks on my hands, I decided I would begin the work of creating these tools.

The result of my initial work the Pyshards project, a still-incomplete python and MySQL based horizontal partitioning and sharding toolkit. HighScalability.com readers will already know that horizontal partitioning is a data segmenting pattern in which distinct groups of physical row-based datasets are distributed across multiple partitions. When the partitions exist as independent databases and when they exist within a shared-nothing architecture they are known as shards. (Google apparently coined the term shard for such database partitions, and pyshards has adopted it.) The goal is to provide big opportunities for database scalability while maintaining good performance. Sharded datasets can be queried individually (one shard) or collectively (aggregate of all shards). In the spirit of The Zen of Python, Pyshards focuses on one obvious way to accomplish horizontal partitioning, and that is by using a hash/modulo based algorithm.

Pyshards provides the ability to reasonably add polynomial capacity (number of original shards squared) without re-balancing (re-sharding). Pyshards is designed with re-sharding in mind (because the time will come when you must re-balance) and provides re-sharding algorithms and tools. Finally, Pyshards aspires to provide a web-based shard monitoring tool so that you can keep an eye on resource capacity.

So why publish an incomplete open source project? I'd really prefer to work with others who are interested in this topic instead of working in a vacuum. If you are curious, or think you might want to get involved, come visit the project page, join a mailing list, or add a comment on the WIKI.

http://code.google.com/p/pyshards/wiki/Pyshards

Devin

Webinar: Designing and Implementing Scalable Applications with Memcached and MySQL

The following technical Webinar could be of interest to the community.

WHO:

  • Farhan "Frank" Mashraqi, Director of Business Operations and Technical Strategy, Fotolog Inc
  • Monty Taylor, Senior Consultant, Sun Microsystems
  • Jimmy Guerrero, Sr Product Marketing Manager, Sun Microsystems - Database Group

WHAT:

  • Designing and Implementing Scalable Applications with Memcached and MySQL web presentation.

WHEN:

  • Thursday, May 29, 2008, 10:00 am PST, 1:00 pm EST, 18:00 GMT
  • The presentation will be approximately 45 minutes long followed by Q&A.

Check out the details here!

Marcelb's picture

DB2 Express-C

Searching around the HS website I noticed that there are no articles regarding db2, which has an express edition, free of charge and from what I know there aren't any restrictions.
Being a powerful database system I thought it could make be an alternative to MySQL, PostgreSQL databases.

Here is the IBM statement:
"DB2 Express Edition for Community (DB2 Express-C) is a no charge data server for use in development and deployment. DB2 Express-C supports a full range of APIs, drivers, and interfaces for application development including PHP, C/C++, and .NET. In addition, DB2 Express-C V9 contains advanced XML features. DB2 Express-C provides ISVs an ideal starting database server for Web, enterprise, and eBusiness applications.

This IBM Redbook provides fundamentals of DB2 application development with DB2 Express-C. It covers the DB2 Express-C installation and configuration for application development and skills and techniques for building DB2 applications with XML, PHP, C/C++, Java, and .NET. Code examples are used to demonstrate how to develop a DB2 application in a different language. By following the examples provided, you will be able to learn DB2 application development with XML, PHP, C/C++, Java, and .NET in a short time."

Download the redbook about db2 express-c.

Marcelb's picture

WebSphere Commerce High Availability and Performance Configurations

Nobody came up with an example of a website powered by a Websphere product (which has a community edition) and backed up by a DB2 database.

I guess you all know about usopen.org so here's the story:

Behind The Scenes of Google Scalability

The recent Data-Intensive Computing Symposium brought together experts in system design, programming, parallel algorithms, data management, scientific applications, and information-based applications to better understand existing capabilities in the development and application of large-scale computing systems, and to explore future opportunities.

Google Fellow Jeff Dean had a very interesting presentation on Handling Large Datasets at Google: Current Systems and Future Directions. He discussed:

• Hardware infrastructure
• Distributed systems infrastructure:
–Scheduling system
–GFS
–BigTable
–MapReduce
• Challenges and Future Directions
–Infrastructure that spans all datacenters
–More automation

It is really like a "How does Google work" presentation in ~60 slides?

Check out the slides and the video!

Scalr - Open Source Auto-scaling Hosting on Amazon EC2

Scalr is a fully redundant, self-curing and self-scaling hosting environment utilizing Amazon's EC2. It has been recently open sourced on Google Code.

Scalr allows you to create server farms through a web-based interface using prebuilt AMI's for load balancers (pound or nginx), app servers (apache, others), databases (mysql master-slave, others), and a generic AMI to build on top of.
Scalr promises automatic high-availability and scaling for developers by health and load monitoring.

The health of the farm is continuously monitored and maintained. When the Load Average on a type of node goes above a configurable threshold a new node is inserted into the farm to spread the load and the cluster is reconfigured. When a node crashes a new machine of that type is inserted into the farm to replace it.

Best Practices for Speeding Up Your Web Site

The Exceptional Performance group at Yahoo! has identified 14 best practices for making web pages faster. These best practices have proven to reduce response times of Yahoo! properties by 25-50%. They focus on the front-end, for example, why it's bad to use "@import" for including stylesheets and why ETags disable browser caching.

This google tech talk features these best practices and demonstrate YSlow.

Relevant links:
14 Rules for Exceptional Web Performance: http://developer.yahoo.com/performance/rules.html
YSlow: http://developer.yahoo.com/yslow/

Check out the book for details: High Performance Web Sites: Essential Knowledge for Front-End Engineers

praveenkumarks's picture

Howto setup GFS/GNBD

Before you proceed make sure you have physical volume(something like /dev/sda1, /dev/sda4, etc) with no data. This is going to be the gfs volume which you will export to other nodes. It should be on the node which is going to be your gnbd server. If you dont have such volume create one using fdisk.

I used mounted gfs volume as a DOCUMENT ROOT for my Apache server nodes(Load Balanced).

I tried it on FC4 64-bit. If you plan to try it on any other distribution or 32-bit arch.. still the procedure remains same. Since I built it from source but not RPMs, you may have to simply supply config options with a different CFLAGS.

Full details at http://linuxsutra.chakravaka.com/redhat-cluster/2006/11/01/howto-gfs-gnbd

atif.ghaffar's picture

Moving old to new. Do not be afraid of the re-write -- but take some help

Recently I had to help users on one of my opensource project ISPMan. http://ispman.net
This project started in 2001 as I was too unwilling to take care of the DNS and VitualHosting stuff as it was a side-thing to the company I worked for (so i wrote a software that took care of all these little details)

Summary: A large project that needs a rewrite can be done in a matter of day.
I will not give you a full case study about a project that went through a re-write but a case study about how easy it is to re-write something.

OpenSpaces.org community site launched - framework for building scale-out applications

GigaSpaces launched OpenSpaces.org, a community web site for developers who wish to utilize and contribute to the open source OpenSpaces development framework.

OpenSpaces extends the Spring Framework for enterprise Java development, and leverages the GigaSpaces eXtreme Application Platform (XAP) for data caching, messaging and as the container for application business logic. It is designed for building highly-available, scale-out applications in distributed environments, such as SOA, cloud computing, grids and commodity servers. OpenSpaces is widely used in a variety of industries, including financial services, telecommunications, manufacturing and retail -- and across the web in e-commerce, Web 2.0 applications such as social networking sites, search and more.

Google Reveals New MapReduce Stats

The Google Operating System blog has an interesting post on Google's scale based on an updated version of Google's paper about MapReduce.

The input data for some of the MapReduce jobs run in September 2007 was 403,152 TB (terabytes), the average number of machines allocated for a MapReduce job was 394, while the average completion time was 6 minutes and a half. The paper mentions that Google's indexing system processes more than 20 TB of raw data.

Scalability Developer Competition Launched by GigaSpaces - $25k in prizes

Today GigaSpaceslaunched the OpenSpaces Developer Challenge, which will award $25,000 in prizes to developers who build the most unique and innovative applications or plug-ins for the OpenSpaces Framework. OpenSpaces is an open source development solution from GigaSpaces for building linearly scalable software applications. It is widely used in a variety of industries, such as Wall Street trading applications, telecommunications platforms and online gaming.

The Challenge is designed to encourage innovation around OpenSpaces and support the developer community. Prizes ranging from $1,000 to $10,000 will be awarded to those who submit the most promising applications that were built using OpenSpaces, or plug-ins, and other components that extend OpenSpaces in pioneering ways.

The OpenSpaces development framework is designed to simply and dynamically scale out a software application across many computers -- also referred to as "cloud computing." It is unique in that it addresses applications that have been traditionally difficult to distribute in this manner, including high-throughput applications that are stateful, transactional or data-intensive. OpenSpaces leverages GigaSpaces' eXtreme Application Platform (XAP) as the middleware implementation, and is based on the popular Spring Framework developed by SpringSource .

Submissions for the OpenSpaces Developer Challenge will be accepted between December 10, 2007 and April 2, 2008. All applications will be reviewed and judged by a panel of industry experts, and the winners will be announced on the OpenSpaces.org Web site on April 22, 2008. The awards -- including the $10,000 first prize -- will be presented to the winners at a gala in San Francisco during the JavaOne 2008 conference in May. Winners will also be recognized in a worldwide press announcement.

The OpenSpaces Developer Challenge marks the latest initiative by GigaSpaces to encourage development and innovation in the developer community. The Company provides developers with easy access to GigaSpaces' products and solutions through its Start-Up Program, which provides qualified companies and individuals with full, free and perpetual use of the Company's flagship product, GigaSpaces XAP. In addition, the Company provides a free Community Edition of its product and contributes to several open source initiatives, including the Spring Framework and the Mule ESB.

To encourage "early bird" applications for the OpenSpaces Developer Challenge, ten $1,000 prizes will be drawn among those applicants who submitted an application concept (not actual code, just the concept of the proposed submission) by January 29, 2008.

Interested developers should:

  1. Go to the OpenSpaces Developer Challenge Web site
  2. Read the Challenge guidelines and FAQs
  3. Develop a killer application or plug-in based on OpenSpaces
  4. OPTIONAL: Submit their application concept by January 29 to be eligible for the ten $1,000 "early bird" prizes
  5. Submit their actual application (including code) by April 2, 2008

Additional information on the Challenge is available here