Programming for the Amazon EC2 cloud

Find Bottlenecks

Building software for cloud computing is largely about optimizing the application given the new tools available to you.

When you need to scale, your first question is: How? Do you have a lot of users, or just a lot of hits? Can users share some data, or is each user's data unique? What must happen when users hit the site, and what can you cache in advance?

If you compare how people have solved the problems of scaling common applications, such as WordPress, and online applications, such as Twitter, you'll see that there are very different problems.

Scaling on the cloud involves a lot of decoupling – making one thing work completely independently of another so that each process isn't held up by another. Sometimes, doing this will require re-working your application, but if you're lucky enough to be building from scratch, make sure you don't choose methods out of habit.

If you are scaling an existing application or building one from scratch, you will need to optimize. Optimization is one of the never-ending tasks – Google goes on about how they shave every millisecond off the page load time as possible, and if you've ever had to optimize, you'll understand this.

Make sure you have tools for optimizing and you know how to use them – each language has a host of tools for benchmarking and profiling the code. Optimization is important when you think about scaling, because if your code contains a bottleneck, the speed problem will multiply with the number of users. Plus, bottlenecks are good candidates for decoupling the application.

Building in Clouds

As soon as you worked out the quickest way to deliver a web page from your rack servers, along came cloud computing providers with thousands of servers and a whole new approach. Getting these cloud services into your toolset will save you from much of what Amazon calls the "heavy lifting."

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Do-it-Yourself YouTube Uses Open Source Project Panda and Amazon EC2

    Open source project Panda provides Software to create your own do-it-yourself video platforms -- provided you also pay for the Amazon Web Services.

  • Welcome

    By the time you read this, the world will already know whether Ubuntu has succeeded in raising US$ 32 million in a crowdfunding effort to build a new Ubuntu-based smartphone. The project has been the talk of open source circles since it started. As of now, it looks like they will be around US$ 22 million short, but that’s the glass-half-empty assessment. The other side is: They have already managed to raise nearly US$ 10 million dollars to create a new smartphone – no small feat for a little fish swimming with the sharks in the sea of mobility.

  • Google App Engine

    Web developers dream of getting their hands on the collective power of Google’s servers. Google App Engine offers a free corner of the Google universe.

  • ownCloud

    Own the Cloud: Set up your own personal cloud server with ownCloud.

  • Security Lessons

    Although you give up control of the underlying infrastructure when you use cloud computing, you can still maintain some control over security.

comments powered by Disqus

Direct Download

Read full article as PDF:

026-028_scale.pdf  (801.79 kB)

News

njobs Europe
What:
Where:
Country:
Njobs Netherlands Njobs Deutschland Njobs United Kingdom Njobs Italia Njobs France Njobs Espana Njobs Poland
Njobs Austria Njobs Denmark Njobs Belgium Njobs Czech Republic Njobs Mexico Njobs India Njobs Colombia