Hosting Tips for Startups- Review of Amazon Web Services

[Guest post by Deepak Vincchi, founder of nineMotion, a startup in service marketplace domain (read our review). In this post, Deepak shares his experience of running nineMotion on Amazon web services.]

Website availability and scalability are two critical requirements for a satisfying user experience for a typical Internet based company.

Traditionally, this is handled using operations heavy infrastructure like monitoring the website constantly for its availability as well as the peak and average loads. Data replication, mirroring and backups are also needed to ensure that the website survives server outages. Advance infrastructure planning also becomes important due to lead times to implement them. I

f you expect your traffic to double in a month, you need to be prepared in advance (sometimes weeks in advance) to setup additional hardware and bandwidth. Moreover, adding new servers are a “step change” in cost and most of the time there is a lot of unutilized space and computing power. This is an inefficient method to run operations. Planning and monitoring infrastructure today is cumbersome for startups and takes away the precious energy that could be better used to manage its growing business.

A better way:

nineMotion was looking for an infrastructure solution that can grow and scale seamlessly with its needs. It should be able to optimally suit any seasonal spurts, should be reliable and grow when needed, and should be cost-effective. In Amazon Web Services, it found the right solution.

Amazon Web Services:

Amazon Web Services (AWS) provides customers the opportunity to replace existing infrastructure and scale up or down based on resource demands. This flexibility allows you to run your business at “web-scale”–uninhibited by growth in the number of geographic markets. On average, businesses spend 70% of their time building

and maintaining and worrying about infrastructure, and 30% of their time focused on the ideas that will propel their business forward. Web-scale computing is helping to invert the 70/30 ratio, enabling you to spend your energy creating the difference that will make your business successful. (quoted from amazon website )

Using Amazon Webservice called EC2 (stands for Elastic Compute Cloud), websites can do scalable deployment of applications. They are able to create, launch and terminate server instances on demand, hence the term “elastic”. The best part is that you now have to only pay for what you use. You can get as many instances up any time and bring them down when needed. This allows you to use computing as an “utility” and save costs as well as ensure scalability.

For example, you start 10 new instances of your application to take care of your peak load, and then shut them down after 2 hours, you pay additional amount for only 10*2 which is 20 instance-hours and nothing more. Starting & shutting of instances can be done within minutes.

Similarly, another part of Amazon Webservice called S3 (stands for Simple Storage Service) allows you to use just as much storage space as you need. S3 provides unlimited storage through a simple web services interface, and this storage is much cheaper than other options. Data can be easily stored and retrieved at any time, from anywhere on the web. Amazon charges in proportion to the amount of data stored.

nineMotion reduced operations cost as well as hosting cost by 65% (earlier it was using dedicated servers). The icing on the cake is that these cost savings came along with greater reliability, scalability and availability of the website.

-

What has been your experience of AWS?

Read the earlier post “Hosting Tips for Startups – Shared or VPS? What’s the right choice?

 , , ,
  • Related Articles

    1. Hosting Tips for Startups – Shared or VPS? What’s the right choice?
    2. Guerrilla Marketing tips for Startups
    3. Amazon 0, Yahoo 9, Google 8, who is at 10?
    4. Sun Microsystem’s ‘Startup Essentials program’ for Indian Startups
    5. Provisional Patents and startups – Why should startups patent their ideas?
  • comment(s) on Hosting Tips for Startups- Review of Amazon Web Services

    10 Responses to Hosting Tips for Startups- Review of Amazon Web Services

    1. Sudhanshu says:

      The only thing I don’t like about articles like this is that they just forget to talk about the database. Amazon doesn’t provide anything at that end, and this becomes a major consideration for most websites.

      I’m sure Deepak too understands the issue, but still everybody talking about EC2 or S3 just decides to ignore this problem. At a place like pluggd.in, there will always be a lot of people who will hear about this stuff for the first time. And on reading your post, one gets the opinion that this thing is just godsent.

      Also, if you’re just starting out, people should know that shared hosting or even simpler VPS hosting can in cases turn out to be cheaper than using EC2 or S3. Its only when you’re moving from dedicated hosting that you this turns out to be a cheaper model. (For those who are unaware, decent dedicated hosting is > $400/month or about Rs 2 lakh a year)

      Deepak, you are using it firsthand, and I’m sure you can talk about the not so good aspects of the Amazon service too. I think a post like that would be really helpful, and something which is really required.

    2. Deepu says:

      it is sad you guys don’t know how to cover the emerging world of cloud computing. There is so much to write on this. pros and cons. the trade-offs. why and when does these trade-offs make sense ? it needs a series of 6-10 articles to have a good view of the cloud computing. without knowing the whole scenario you cannot make a good decision. The sad part is you come up with an article which doesn’t even explain 1% of the necessary info required to decide on whether to port your application to AWS or not.

      From reading the article it gives the impression that if i want to spend less time maintaining my servers and want to pay less then shift over to the AWS. That is not the case. if only that is the case why didn’t twitter shifted to AWS and thus solve all their scaling problems ? There is much more to it than that.

      This article is more of a customer feedback than review. if there is no one to cover the cloud computing arena and if you guys wish to, then mail me.

    3. Deepu says:

      @sudhanshu -

      AWS does have a database – simpleDB. it is not a relational database(like mysql) though. simpleDB is a document database. it is a fact that most of the times scaling bottlenecks are due to relational databases and many applications don’t need all the power of relational databases. document databases can be sufficient.

      so there are 2 options. either you can start with a powerful relational database and when the database becomes a bottleneck you have to apply complex techniques like sharding which are quiet complex and expensive. Else if you know your application will be big then you can change the architecture so that it uses a document database from the beginning and never worry about scaling issues.

      so in a way AWS makes you think about your architecture and change it so as to be scalable. i heard they are working on a persistant relational database service also. will be interesting if it is true.

    4. Sudhanshu says:

      @Deepu, SDB is terrific when you think about it, but I wouldn’t think about using simpleDB on my website till Amazon tells us how reliable it is going to be. ( eg. Hosting guys like Rackspace gives you an uptime guarantee, Amazon only tells you how much will they charge).

      The problem is simple – client pays you, clicks next to login to view the paid content, and BAM!! she can’t. SimpleDB doesnt assure after how long will it actually get written.

      Then, each cell is still limited to 1024 bytes. That’s short isn’t it :) Even built a website which didn’t use a db column bigger than 1024 bytes? I doubt.

      Besides each query will go all the way to the Amazon Datacenter, how much extra time would that take.

      Finally, you can test it on localhost. Now that is scary. How do you move out of the system after two years (and massive amounts of info in the db). Because you can’t even make a backup….

      All in all you need an sql db as the end of the day, and simpledb can’t quite replace it.

      Atleast not yet.

      By the way, what do you think about gigaspaces.com. Even though the bloggers don’t quite love it, or atleast not as much as they like Amazon, I think it’s way better than the Amazon services.

      When you are talking about scalability at these massive levels, I doubt if you would be worried about spending ten thousand dollars to get new servers….

    5. Deepu says:

      @sudhanshu -

      your first point about lack of service guarantees is a big concern and hope aws will come up with that soon as they did with s3.

      SDB assures that it takes max 20 sec for the writes to propogate. but then thats because you also want your data to be redundant and the database scalable. the 20 sec delay is the trade off for gaining redundancy and scalability. There are work arounds for this 20 sec problem. you can cache all writes for 20 secs and put cache between your app and SDB. problem solved.

      yup 1024 bytes is very small. But then thats the beauty of constraints. They make you think come up with some creative ways of doing things. so instead of storing say text in database(which you usually do in case of mysql etal) store all the big data(> 1024 bytes) in s3 and store its pointer(s3 url) in simpledb. so you are moving heavy data from SDB to S3. This saves you money(as s3 is much much cheaper than SDB) and also speeds up your data access as the data in the database is small.

      latency for to-and-fro visits to amazon datacenter is a concern. so it makes sense to use the whole aws eco system for your app so that latency will be minimum between AWS components.

      as for backups are concerned. SDB is a service having an api. you can make an api call to fetch all the data within the SDB and store it in s3. so with few lines of code you can write your own backup system. i dont think this will be an issue.

      yup mysql is a powerful database. if you need all that power you should also accept its limitations which is lack of scalability. or else you can try and fit your architecture using SDB and S3 which gives you limitless scalability. it is a trade-off that you have to make and trust me the problem about mysql scalability is not about lack of servers. once you come to a stage where you have to shard your existing RDBMS, it will be one hell of a work to do. There are not many such experts and they cost a bomb. sometimes you cannot do it without loosing existing data which is why players like google use document databases like BigTable which aren’t RDBMSs.

      i am still exploring gigaspaces.

      Cheers,
      Deepu.

    6. prabindh says:

      sudhanshu, Though Amazon does not have a relational DB offering by itself, what stops anyone from using it a Linux machine image ?

      http://biz.yahoo.com/bw/080505/20080505005598.html?.v=1

      The beauty of Amazon services is not in the price reduction (as you rightly mentioned, it does turn out to be cheaper only for specific use cases), but in the flexibility and on-demand scalability of the services. By flexibility, I mean – by itself, none of the AWS services are fully feature complete. For example, S3 is only a storage end point. No filesystem on top it, but is for you to write. EC2 offers you a scalable virtual platform, but not the applications you might want to run. But both of these are flexible enough to write any arbitrary application on top of it.

      By scalability, I mean, lets say, I want to download all the pages of pluggd.in, and all the links it links to, I can either sell my pants to buy all HDD’s in the market without knowing the size of the content, or use my credit card to store the stuff in S3, and pay just for what I stored. Conversely, for a startup that doesnt know the amount of hits it will receive, scalable on-demand storage is better than putting upfront money on hardware.

      Hope this throws a different light on this//

    7. I will try to reply to some of the comments I have seen so far as follows:
      - This post was not meant to be a review of AWS. I read an earlier post on
      hosting options for startups, and I thought that I can share my experience
      with AWS. For review of AWS, there are numerous resources on the web
      - In my opinion, AWS is not for a first release of your application. AWS is
      good when you have some initial traction & expect significant scaling that
      you can’t predict. Do you want to plan for 10x number of hits? 100x? How
      much can you invest in dedicated servers when you don’t know and can’t
      predict what your growth will be?
      - AWS is very complex. We took more than 1 month to migrate to AWS;
      mainly because we were learning, and the team that was helping us was
      also learning. We had to re-architect parts of our application
      - Having said that, a friend of mine in the US was able to migrate to AWS
      in 12 hours flat. It all depends on the nature of your application as well
      as your capabilities at systems level (which we didn’t have)
      - About database: Database can be just an instance on AWS, hence this is
      also equally scalable. Of course, you need to architect the whole thing
      carefully. The database can directly connect to S3 for persistence. We
      also have a replicated database instance for redundancy
      - I would like to re-state that cost savings can be significant especially if
      you are growing like crazy. Scalability & availability are superb

      In case you need any help, write to me directly at deepak.vinchhi@ninemotion.com,
      and I can try & connect you to some people. I request you to be discrete in using
      my email; please use it only for genuine specific request for help and not for
      comments & questions – for that the current forum is excellent.

    8. prabindh says:

      Deepak, it would be very useful to share with the forum the complexities of the movement to AWS. Do you have any comments on that ?

    9. Deepu says:

      @Deepak -

      the title suggests this post is a review of amazon web services. If that is not your intention i take my initial comments back.

      if you can please throw some light on maintaining db persistence using s3.