AiCache – Keeps Your Servers Alive

We’ve been trialling aiCache, a software caching solution, for nearly two months now. AiCache sits in front of our load balancer and caches all our static files and pages limiting the amount of traffic to our app servers and more importantly, calls to our database.

We’ve had a few teething problems while setting up and adjusting for the various foibles of our sites, but now it’s tuned up it’s really handling things well. Last week we made a link on the home page of IMDB which sent us a huge amount of traffic over a 24 hour period. AiCache handled everything that was thrown at it without batting an eye lid.

If you’ve been running out of options, trying to keep your site up, then this is a recommended solution to your problems.

Amazon AWS and EC2 Explained

1. How AWS Works

Amazon Web Services (AWS) is a cloud based service offering on demand web servers, storage, databases and other web services on Amazon’s secure and stable infrastructure. AWS can be managed using the Amazon’s browser based dashboard, via SSH or with third party browser plugins and web apps.
Using AWS allows you to avoid investment in your own infrastructure or costly contracted servers, as you only have to pay for the computing power, storage and bandwidth that you actually use. AWS gives developers access to the kind of computing power that would only be available to large corporations at a cost of what is less than your cup of coffee every day.

The AWS platform is a mature platform and extremely secure. All interactions are via key pairs and server instances can be managed using various security groups which can be limited to only the ports that are required for the app.

2. Scalable Servers

The Amazon Elastic Compute Cloud (EC2) is the scalable server part of the service that provides on demand virtualised server instances. Instances can be based on many different server setups in either Linux or Windows flavors as well as the option to use snapshots from various vendors or the community. You can also customise a base image and store that for future use. These snapshots are called AMIs (Amazon Machine Images) and are integral for launching load balanced app servers as quickly as possible.

Instances can be located in 3 locations to reduce latency for users, currently these locations are US West Coast, US East Coast and EU West which is based in Ireland.

3. Load Balancing

Amazon has a built in load balancing solution Elastic Load Balancing which can distribute incoming traffic across your EC2 instances, automatically scaling in response to incoming traffic.

4. Storage

Instances are semi-permanent and can be rebooted without losing any data or settings although you can turn off instances that are no longer required you will lose data stored on that instance unless it is stored on Amazon’s Elastic Block Store (EBS).

EBS offers persistent storage for Amazon EC2 instances. EBS volumes provide off-instance storage that persists independently from the life of an instance. Volumes are highly available, highly reliable volumes that can be leveraged as an Amazon EC2 instance’s boot partition or attached to a running Amazon EC2 instance as a standard block device. When used as a boot partition, Amazon EC2 instances can be stopped and subsequently restarted, enabling you to only pay for the storage resources used while maintaining your instance’s state.

Amazon also provides a basic storage for static files called Simple Storage Service (S3). There are several benefits to S3:
  • Scalable: Amazon S3 can scale in terms of storage, request rate, and users to support an unlimited number of web-scale applications.
  • Reliable: Store data with up to 99.999999999% durability, with 99.99% availability.
  • Fast: Amazon S3 is fast enough to support high-performance applications.
  • Inexpensive: 15¢ per GB per month for first 50TB.
  • Simple: Uploads can be made using a simple browser plugin or various APIs.

5. Content Delivery Network

S3 can also be partnered with CloudFront which is a content delivery network with low latency and high data transfer speeds. CloudFront caches files at a location nearest to the user. When a user requests a file they are routed to the nearest edge location reducing delivery times for the content. This can have a significant impact on image and video heavy sites.

6. Managing Cost Effectively

Pricing is extremely cost effective as you only need to pay for what you use. Pricing is based on hourly use of instances, bandwidth and amount of storage. The smallest Linux instance costs as little as 8.5¢.
AWS instances can be managed using third party scaling applications that monitor incoming traffic to your app server and based on polling times or CPU load can launch new app instances within a few minutes to cope with traffic demands. This ensures that you use only the computing power that you need and when the capacity is no longer required app instances are scaled down. Management of MySQL Masters and Slaves can also be managed in the same manner.

Typical Cloud Web App Set Up With Scalr


SCALR

1. Scalr

Scalr is a fully redundant, self-curing and self-scaling hosting environment utilizing Amazon’s EC2.  Scalr helps you create and manage scalable infrastructure, providing pre-built images of load balancers, database servers, application and caching servers which can be customised to a developers needs and arranged into logical groups as farms.

Although Scalr has been released as an open source download, the SaaS version developed and maintained by Intridea is a stable, secure and cost effective way to manage your EC2 instances online.

Scalr monitors traffic to your app and brings up new instances to cope with it by polling each instance for a response. 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.

Databases are managed by maintaining a master database, that when put under heavy loads Scalr will bring up clones of the database as slaves. The app will read from the slaves freeing up resources on the master, which is often cpu bound, and allows you to make intensive queries without killing overall performance. Besides the intelligent and auto provisioning features of Scalr, it also offers a disaster recovery feature.  If a database server or web service master is lost, Scalr can promote a slave server to the master service in order to provide a fault tolerant solution.

2. Alternatives

An alternative to Scalr is Rightscale, an enterprise solution which better suits corporate entities  as it is cost inhibitive. Accounts start at $500 a month compared to $99 for Scalr. However Rightscale offers an extended range of support options in comparison to Scalr’s basic package, although Scalr offers much more support in its Mission Critical Editiion for $399 which competes with Rightscale. However in my experience, the support provided by Scalr’s basic package has been competent enough.

Hi I’m A Consultant

Today I scored my first consultant job on odesk. In some ways it’s a return to the mentoring for startups I did in Liverpool a few years ago (I actually have a mentoring certificate on the office pin board), except that I will probably have to work harder and for less money. However, I’m looking forward to the challenge of advising other companies about putting their sites into the cloud.

This first job is for a company in Virginia USA who are looking to put their new high demand web app onto Amazon, with Scalr managing the scaling element. I have quite a bit of experience using both these tools with our set up at Giant Digital, so I will hopefully be able to offer some help to my first client.

I think the biggest hill I have to climb is making myself clear when explaining things, as it’s always difficult to second guess where someone else’s knowledge is, and then you don’t want to come across as patronising either. Also, I have a weakness of not being able to build arguments, as I tend to go for a scatter gun approach. So I’m helping that doing consulting work is going to help me tighten up my presentation skills. The other challenge I’m facing is to judge where the line is between professional and being too casual with people.

Anyway, I hope this to be the first of many projects that I can work on with clients who are looking to move onto AWS and Scalr.

Free, Cheap And Money Saving Tools For Online Entrepreneurs

There are many tools available to entrepreneuers for free or very cheap that you should know about if you want to make your day more productive or improve your business. Here are a few tools that I use daily or have used to improve my online businesses.

Google Apps

Google have provided a whole suite of tools for business users that include group calendars, document editing and email hosting. This is a must have for any business on a budget. On setting up a domain for use with Google Apps you have a suite of online tools for your staff. The most central to this is your own company email on the Gmail platform, once you have that you can easily set up groups and mailing lists for your staff to use internally. The email server can also be used outside of the browser with Thunderbird or Outlook as well as your Blackberry or whatever. There is also a very useful group calendar available and the ability to set up a group wiki with a few clicks. While setting up your domain initially might be a little tricky for the technophobe, everything else is straight forward to use.

Amazon Web Services and Scalr.net

Not free this one, but an extremely cheap way to get dedicated hosting. If you have a busy web site and have been paying through the nose for your hosting then this could be one way of saving a lot of your monthly budget. Also known as cloud computing, hosting on Amazon’s servers will make your websites (with a little bit of work) scalable. This will mean that when your traffic grows so can your sites. If you’re not afraid to get your hands dirty with your website but you’re not a computer scientist you can pair up AWS with Scalr.net which will handle all the technical side of scaling your sites.

Open Office

Open Office is an open source productivity suite that you can install directly on your computer. If you’re not comfortable with leaving everything in Google’s hands then this could be a viable alternative to purchasing a usuable copy of Microsoft’s Office. Open Office has everything you would expect from Office with wordprocessing, spreadsheet, databases, graphics and presentation packages included in the package. You can’t really get a much better software product for free.

wordle

Me In 200 Words

Go to Wordle.net and get your own! :) Andy Day in 200 words

How To Become A Guitar Legend In 10 Easy Steps

Kurt Cobain (front) and Krist Novoselic (left)...
Image via Wikipedia

Throughout the decades that rock ‘n’ roll has ruled the earth the guitar has been the ultimate in phallic symbols. Wielded by many of the most famous men to stride the planet in the twentieth and twenty-first century, the guitar and the legendary status it can bestow upon those that have masterfully brandished it, is the ultimate weapon in the battle to pull the opposite sex.

Although many consider guitarists to play “second fiddle” to the lead singer, groupies that don’t fancy the singer will always head straight for the lead guitarist. So if you wanna tap into a bit of that ol’ sex appeal for yourself, either chick or chico, then follow these ten easy steps to “Becoming A Guitar Legend”.

1. First of all you’ll need a plank to beat. So head down your music shop and buy the cheapest one you can get. Don’t listen to guitar fetishist who’ll try and blind you with science, fuck the humbucker pickups and lowered action, what you need is something in a fetching shape and colour that you can strap round your neck. Remember to leave enough change for a cool guitar strap; ones with white lightening bolts down them are always de-rigueur shoulder belts.

2. You should now begin to practice. Don’t worry about being able to play anything just yet, it’s more important to rehearse your stance. Find a brightly lit room with a full-length mirror and hang your weapon of choice from your neck. Adjust the strap length so that your guitar nearly covers your kneecaps. IMPORTANT: do not use your guitar to cover your nipples. It may be easier to play guitar this way, but it is only necessary if you’re short-sighted or a complete gimp.

3. Once you’ve got your stance sorted, you then need to practice throwing some shapes. This should be done somewhere with a lot of space. Rehearse various pose combos until you get that “legendary” feel. You should at least be able to strum the strings with your strumming hand from a starting position above your head. The action should be circular and not angular. If you’re having problems with your technique, then you may require some extra reading. Bill & Ted’s Excellent Adventure is a good reference guide.

4. Now you’ve got the basics sorted you’ll need to learn a few chords. Although somewhat tedious, this will be necessary to join even the shittest band. The easiest chord to learn is Em (E minor), so at least learn this one. The whole Grunge genre was based on this simple chord, so its significance – despite its simplicity – should not be overlooked. Another easy chord is A, although a nerve shattering three fingers need to be coordinated to achieve this chord, the importance of doubling your repertoire cannot be emphasised enough.

5. You may have noticed at this stage that there is a certain amount of difficulty in holding down all the strings at once so that the chord rings out. Do not fret; no extra time needs to be spent perfecting the chiming chord, because step 5 is: Buy Yourself A Distortion Pedal. Distortion pedals can mask years of inexperience. Plug together your guitar, peddle and amp (if don’t have an amp you can also use hifis with phono-in sockets. If it’s your parents’ hifi, do not ask to use it first, because the answer will be “no”). Turn your pedal up to full distort and strum your full chord repertoire. By now you should at least be able to play a C chord. C is the most popular chord in pop.

6. You’re now ready to join a band. Put up “Singer, Bass Player and Drummer wanted” adverts in all your local record and musical instrument shops. Or even put one here in the Gigwise forum.

7. Once you have a full line up it’s time to hit the rehearsal rooms. Make sure you take plenty of booze, fags, pasties and fizzy drinks with you. This step is by far the most tiresome. It is also during the rehearsal that you can spot ways in which you can upstage the lead singer with rock ‘n’ roll antics. Make sure you keep a good record of his/her shortcomings; your groupie to guitarist ratio will depend on your ability to look cooler than the frontman.

8. You’re now ready to take your one-man show on the road (yeah I know you’re in a band now, but remember who’s the daddy). You need to make a recording of your band’s performance. Don’t worry about this being of too high a quality, promoters and venue owners rarely listen to them anyway, they just look at your Myspace page and see how many “fans” you have, and if they do listen to your demo, fear not, you will not be booked on the merits of your demo’s sound quality. In fact, to really jump the queue, stick a chocolate bar in the post to your favourite promoter with a link to you website sellotaped to it.

9. OK you’ve got the gig. Time to perfect your image. Root through your parent’s record collection and find something with a picture of a group on the cover. Make sure it speaks to you as an artiste. Faking things at this point could make you look daft. The perfect image is a mixture of current cool and retro classic. DO NOT wear trackies and training shoes to a gig, (unless there’s been a Madchester revivial), EVER, and do not wear your Sunday best. To be a legend you need to look the part, at this point you may wish to watch Pirates Of The Carribean for Johnny Depp‘s portrait of a rock musician. Purchase as much of your clobber second hand, this also helps you to look like you’ve been dressing this cool for ages.

10. On the big night make sure you’re fully prepared for every eventuality, remember that fucking lead singer will try and be the sexiest and the coolest onstage. Once the gig is in full swing and you’ve thrown a few rock ‘n’ roll shapes you can now smash up your guitar in an unnecessary fit, dowse it in lighter fluid and burn the bastard. Don’t worry about widdly-widdly lead breaks and playing nice tunes, no one likes those bits anyway. You’re now well on your way to becoming a legend. The groupies are now yours. You’ll need to repeat step 10 a number of times until you attain widespread acclaim, and once this is achieved you can then unleash the guitar legend stock tools of the trade; alcoholism, heroin addiction and suicide/drug overdose. If you’re still alive after five years then either quit music (you’re obviously not up to the job) or return to step 1 and repeat the process.

Reblog this post [with Zemanta]

A Bird In The Bush Is Worth Two In The Hand

Have you noticed how often our culture, particularly in the UK, is to encourage people to stick with what they’ve got instead of pushing yourself to do more? How often have you heard the old adage that birds in the hand are worth more than birds in the bush? What’s this message supposed to be telling us?

Stick with what you’ve got.

Boring.

The truth is that what you’re looking at in the bush, is worth twice as much as what you’ve got now. The safe option is to stick with what you’ve got, but meanwhile opportunity is tweeting away right in front of you.