Archive for the Uncategorized Category

Amazon DynamoDB

Posted in Uncategorized on February 16, 2012 by swaminathans

I’m four weeks late to blog about this as I was busy with launching this service but wanted to cover this in my blog:

I’m super excited to tell folks that we launched Amazon DynamoDB, a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. We have lots of interesting materials and getting started guides. A few things I encourage to take a look at are:

Detail page: http://aws.amazon.com/dynamodb/

Introduction video: http://www.youtube.com/watch?v=oz-7wJJ9HZ0

Werner’s blog: http://www.allthingsdistributed.com/2012/01/amazon-dynamodb.html

Hadoop/EMR integration HOWTOs: http://aws.typepad.com/aws/2012/01/aws-howto-using-amazon-elastic-mapreduce-with-dynamodb.html

I don’t want to rehash things stated in these links but wanted to make sure I provide a simple link.

We are also talking about Amazon DynamoDB in a few events in the next couple of weeks:

1. NoSQL meetup in Seattle on Feb 22

2. Strata 2012.

Hope to see many of you in these venues!

 

 

Synchronous vs. Asynchronous replication strategy: Which one is better?

Posted in Uncategorized on September 22, 2011 by swaminathans

If you’re a developer who is looking to pick a highly available database or datastore for your application, you’ve to think of various parameters to make the right choice for your application. Some of the questions you need to hash out include “What query model do I want and what does the datastore offer?”, “What is its consistency guarantees?”, “What is its reliability and availability SLA?” and “What are its scaling dimensions?”. While the process of picking the right datastore warrants a post on its own, I wanted to focus on one specific parameter of this question for this post.

The focus of this post is: “How does a datastore replicate data? Is replication done lazily or synchronously?

One might ask: Why should an application developer (or any datastore consumer) care how a datastore replicates data? The reality is that how a system replicates data has great impact on the datastore’s durability and availability.

Traditionally there are two kinds of replication techniques: synchronous replication and asynchronous replication. A datastore using synchronous replication does not acknowledge a write call until it is acknowledged by its replicas (usually a majority of the replicas).  Examples of pratical datastore that does synchronous replication include Amazon Dynamo (and many of its variants like Cassandra, Voldermort and Riak), Amazon SimpleDB, Amazon RDS Multi-AZ MySQL and Google AppEngine’s High Replication Datastore. On the other hand, a datastore that replicates data asynchronously propagates data to its replica, i.e., when one of the replica gets a write call it will acknowledge to the client right away and in the background it will propagate the writes to its replicas. Examples of systems that use this model include MySQL replication, MongoDB and Google AppEngine’s Master-slave datastore.

Which one is better? Well, it really depends on what you’re planning to use it for. Datastores that synchronously replicates data ensures provides higher durability and availability. Why? Consider the failure scenario where the replica that acknowledged that even if the replica that took a write dies as soon as it acknowledged to the clients, the data is not lost. Clients can read their last acknowledged writes by accessing from the other available replicas. However, in an asynchronously replicated systems, it is not possible for clients to know if their writes were propagated to the other replicas before the failure of the replica that coordinated the writes. If the replica has failed permanently (due to a permanent node failure or so), then you can experience a data loss where you lost the latest updates (durability issue). If the replica has failed temporarily, then clients can still access an old version of the data from the other available replicas. However, they will not be able to perform any writes unless they are willing to deal with merging conflicting updates when the replica comes back online.

So, why would anyone run the risk of picking a lower durable datastore and pick an asynchronously replicated datastore? The reason is because asynchronously replicated datastore provides reduced write latency (since a write is acknowledged locally by a single before being written to other replicas, the write latency is lower) and better read scaling (as adding more replicas does not impact your latency like in the case of synchronously replicated systems).

So, in a nutshell, the rule of thumb I tend to use in picking between these two techniques is: If your application requires high durability and availability, pick a synchronously replicated datastore solution. If your application is OK with losing a small % of writes (e.g., a soft-state or caching system) due to a failed replica (usually the master replica), then you are OK with asynchronous replication system. A great example is how MySQL users use read replicas to do read scaling. Another great example for using asynchronous replication is to use your asynchronous replica as the backup copy (used for disaster recovery).

Filtering effects in cache hierarchies

Posted in Uncategorized on August 31, 2011 by swaminathans

A friend of mine was building a multi-tiered application with a cache fronting a database and was investigating why his database memory hit ratio was not as high as he expected it to be and how to optimize it. This matters only when you are paranoid about latency percentiles at TP99 or TP99.9s. One of the things, he found after a deeper investigation is what he called as “cherry picking” done by the caching tier that the next level did not see requests with high cache locality. A similar observation was made in Web cache research and was referred to filtering effects.

One of the important works done in this area is by Carey Williamson on “On Filter Effects in Web cache hierarchies”. This paper uses trace driven simulation to look into effects of what happens to workload locality when it travels through various cache hierarchies. Important results to call out:
- Proxy caches filter out the most popular documents from a workload. The filtering effect typically changes the Zipf-like document popularity profile of the input stream into a two-part piecewise-linear document popularity profile for the output stream. The upper leftmost part of the plot is significantly flattened.
- The percentage of unique documents referenced and the percentage of onetimer documents tend to increase as the request stream passes through a cache.
- Among the caches in a caching hierarchy, the first-level cache has the most pronounced filtering effect on the workload.

Even though this is a 10 year old work, highly recommended read for folks trying to understand the effects on caching on their systems.

Amazon ElastiCache

Posted in Uncategorized on August 23, 2011 by swaminathans

Last night, my sister team in AWS launced a service I’m very excited about: Amazon Elasticache. Historically, caching has been the one of the most widely used techniques to build scalable web applications where the caches store the most often accessed computation results which take longer (or is harder) to re-compute in the source. In-memory caches are normally used to front databases so that often accessed results can be retrieved from memory faster (see examples of how to use MySQL and memcache together, here). However, to ensure that in-memory cache do not become a scalability bottleneck themselves, distributed cache clusters use techniques like distributed hash tables (DHTs) to ensure that cache cluster can be “scaled out”. As the scale of caching system becomes harder, it is a challenge to manage them in a large scale environment.

Today, AWS has made the process of running a cache cluster easier with a new managed cache offering called Elasticache. A quote from the detail page sums it up well:

“Amazon ElastiCache is a web service that makes it easy to deploy, operate, and scale an in-memory cache in the cloud. Amazon ElastiCache is protocol-compliant with Memcached, a widely adopted memory object caching system, so code, applications, and popular tools that you use today with existing Memcached environments will work seamlessly with the service. Amazon ElastiCache simplifies and offloads the management, monitoring, and operation of in-memory cache environments, enabling you to focus on the differentiating parts of your applications.”

Congratulations team!

Growth of AWS

Posted in Uncategorized on March 4, 2011 by swaminathans

This week, BusinessWeek article posted a great article on Cloud computing and AWS. The one statement that really caught my eyes which highlights our growth is:

“Keeping up with the demand requires frantic expansion: Each day, Jassy’s operation (AWS) adds enough computing muscle to power one whole Amazon.com circa 2000, when it was a $2.8 billion business.

Please take a look at the article here.

Shameless hiring plug: Do you want to be part of the team that builds such disruptive technologies, email me: swami-removetheobvious@amazon.com?

Amazon CloudFront: Awards

Posted in Uncategorized on October 26, 2010 by swaminathans

Amazon CloudFront is a web service for content delivery that allows you to deliver static and streaming content using a network of edge locations.  Often, these systems are called Content Deliver Networks or CDNs (for more general survey of CDN techniques, see here).

I was fortunate to have had the opportunity to work with folks like Brad Marshall and David Richardson during the initial days of CloudFront, and even more excited to see what they have done in the past couple of years such as adding the support for streaming media and HTTPS support.

Last week, I was excited to see CloudFront winning couple of prestigious awards: Streaming Media – 2010 Editor’s Pick and European Readers Choice awards. I’m glad to see Cloudfront’s contributions being recognized and our customers find it extremely useful. Congratulations, CloudFront team!

On that note, CloudFront team is actively looking for extremely smart engineers who are passionate about large scale distributed systems and networks. If you’re interested, please contact David Richardson.

Follow

Get every new post delivered to your Inbox.