Monday, September 21, 2009

Building a Scalable Website

SecondTeacher is a website which will have very definate peaks in loads that are easy to predict. This is a great advantage in building the website but it also poses some challenges.
First we want to run the site efficently and on a budget that doesn't comprimise quality and user experience. We know the site will be busiest between 3pm and 9pm when the majority of students do their homework. In planning for peak load of say 20,000 concurrent users we can evaluate how much each machine can comfortably manage, imagine it's 1,000. We will then need 20 machines load balanced to operate the site. Correct ....?
Well no, we can do alot better than that and we also have a few concerns in relation to bandwidth usage. 20,000 people watching a 500kps video concurrently will need a hell of a lot of bandwidth if our 1,000 users per machine are all watching video then we would be pushing 500mps. Most hosters will only give you a 100mps burst capable pipe at a reasonable price so suddenly at best our machine can only handle 200 users meaning we now need 100 machines to cope....this is getting expensive.
Well our solution was up in the clouds.
First off we pushed all images and video to Amazon cloudfront which allows us to put all these objects on the edge locations close to the customer and also they are served from there meaning they do now clog up our bandwidth. This means we are now only in effect serving html and the silverlight controls now bandwidth is no longer a limiting factor. Now we're back to 1,000 per machine if anyone is keeping count.
Next we implemented our servers in the Amazon EC2 cloud meaning we could using there elastic computing model expand and contract our resources as we wanted to and only pay for the resources we use. This means that at 4pm on a school day we can run 20 machines but at 2am we only need run 1 machine to keep the service available for the desperate or slow students doing they're homework at this time. Our peak hours are only 30 hours per week the rest of the time 1 machine is enough. This reduces our resource costs to an average of just over 3 machines compared to the 20 we'd need to run if we went the traditional route.
But this is not all about cost, there are big advantages too in using the the Amazon cloud 1) Amazon engineers working 24/7 to keep the cloud up 2) Multiple Redundant storage and backup built in 3) No more concerns about hardware issues, if a machine goes down just start a new one. 4) Fully scalable e.g. if all our Christmases come at once and 100,000 try to access SecondTeacher in the morning instead of a technical disaster I can just fire up another 100 instances and the user experience is the same as ever.
I'm banking on the cloud to become the way of the future and I'm not alone.
Check out Amazon webservices for yourself Amazon Web Sevices

62 comments:

  1. Hello,

    first of all, GREAT JOB...

    I would like to build an infrastructure similar to yours using ASP.Net, SimpleDB and i would like to make it scalable like yours, but i have a question. I have read a lot about the latency of SimpleDB, my question is: If a user registers in your web site how you solve the latency problem? I understood that you store the sessions in Simple DB, but if some reasons there is some latency how you manage it?

    Thanks

    --silvano

    October 16, 2009 7:46 AM

    ReplyDelete
    Replies
    1. The development of artificial intelligence (AI) has propelled more programming architects, information scientists, and different experts to investigate the plausibility of a vocation in machine learning. Notwithstanding, a few newcomers will in general spotlight a lot on hypothesis and insufficient on commonsense application. machine learning projects for final year In case you will succeed, you have to begin building machine learning projects in the near future.

      Projects assist you with improving your applied ML skills rapidly while allowing you to investigate an intriguing point. Furthermore, you can include projects into your portfolio, making it simpler to get a vocation, discover cool profession openings, and Final Year Project Centers in Chennai even arrange a more significant compensation.

      Data analytics is the study of dissecting crude data so as to make decisions about that data. Data analytics advances and procedures are generally utilized in business ventures to empower associations to settle on progressively Python Training in Chennai educated business choices. In the present worldwide commercial center, it isn't sufficient to assemble data and do the math; you should realize how to apply that data to genuine situations such that will affect conduct. In the program you will initially gain proficiency with the specialized skills, including R and Python dialects most usually utilized in data analytics programming and usage; Python Training in Chennai at that point center around the commonsense application, in view of genuine business issues in a scope of industry segments, for example, wellbeing, promoting and account.

      The Nodejs Projects Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

      Delete
  2. Hi Silvano
    Thanks for the nice comments. Nearly all the interaction on SimpleDB is from our Web servers which are on EC2 so this has no real latency issues as they exist on the same network. We also cache all the main SimpleDB request on the server so SimpleDB is not even hit in these scenarios.
    Our Session state is held on SimpleDB too but again the interaction is between webserver and SimpleDB so again no problem.
    We use webservices to supply data to Silverlight controls on the client but we have no more latency issues then if we were running the DB server in a traditional way and of course we using caching extensively here too.
    On a side note I have used simpleDB for awhile now and I find it rock solid reliable and latency is not really an issue for me yet anyway.
    Thanks
    Robert

    ReplyDelete
  3. I have been evaluating EC2 for a while now. The question I have is in regards to run away costs. We build and maintain a content management system for websites. We have a few hundred customers. Some with very high traffic websites, others with small websites with minimal visitors. Quite a few with Videos that are streamed. What I'm concerned with is cost. Porting our system over only to find out that because of our usage, we are worse than we were before cost wise. In a month, if you were to consider your high usage periods when you have 20 servers provisioned, how much does that run you cost wise? Or how does that compare to the low usage periods?

    My problem is I just don't know enough about EC2. Even though I can read all of the white papers and pricing charts, I just don't know how to apply that to our situation and resource needs.

    When I saw your report, I got excited because now I've found a real person that has experience going through what we will need to go through and can help me understand the costs and how you performed your evaluation of need. I appreciate any help or insight you can provide.

    ReplyDelete
  4. Hi Robert,

    thank you very much for your explanation! You have been really very nice.

    Any idea of expanding in Italy? My father is a Math Professor at University of Engineering?

    Thanks Again

    --silvano

    ReplyDelete
  5. Hi Bilal
    First thing I'd say is EC2 is not a cheaper option. I have used The Planet (http://www.theplanet.com) to hire dedicated boxes for another project and they work brilliantly well.We have been running 4 boxes in the Planet for the last 3 years without a single issue. They are also very cheap so I would never complain about the service we get.
    Saying all that we are in the process of moving them to EC2 why? because of two main reasons 1) Peace of Mind. If a box on the planet goes pop we have a stessful time to rebuild and test etc to get it back up. In EC2 if a box goes pop we just launch it again. 2) Scalability, If we need to expand our resouces in the Planet it's a big undertaking that takes management and time, in EC2 we just launch up another instance and attached to the Load Balancer (which is great in AWS). Cost wise it's probably cheaper to go the Planet to tell you the truth.
    But we also push all our assets to CloudFront in AWS so I find it's much more reliable and quicker for our customers too. Why don't you try parts of AWS first like ther CloudFront and S3 to see how you get on.
    Hope this helps?

    ReplyDelete
  6. Hi Silvano
    Thanks for your comments. Italy is a way off I think my Italian is not good ;-)
    Ciao

    ReplyDelete
  7. Online home work help is a guide about working at home using the internet. Here you can find information, advice and help on online home work, work from home.


    http://www.homeworkhelponline.org/

    Akshay

    ReplyDelete
  8. Can you begin with a free trial - search for no less than a 30 day website trial before you begin so you can test the administrations completely. just click the following document

    ReplyDelete
  9. All things considered, there is nothing more regrettable than having a website however messaging your customers from a Gmail or Yahoo record to catch up on deals enquiries, for more information

    ReplyDelete
  10. It is significant for you to contract great and rumored website engineers who realize how to draw in the general population webdesign gurgaon to your website with fantastic formats and cause them to experience your substance instead of simply observe the designs that your site page contains.

    ReplyDelete
  11. It's the Ecommerce website design in USA that really can facilitate you to make the most of the internet based company techniques and process as well as it can permit you to conduct the internet based company in the most systematic method. web designer nuneaton

    ReplyDelete
  12. It's not about simply tossing thousands a connections around the web and sitting back hanging tight for the blast.Webdesign

    ReplyDelete
  13. Premium WordPress Templates, then again, are normally made by the more experienced and educated WordPress engineers/creators. premium wordpress blog themes

    ReplyDelete
  14. Nice tips for building a scalable website and how it has made build website easy.

    web design company jacksonville

    ReplyDelete
  15. Nice Information. Thanks for sharing this post. Are you looking for web design for your company or business? Please contact ProWeb365 to design your business website.

    ReplyDelete
  16. Gret Content & Thanks For Sharing, But Do you Want to know about How To Make Money With Hostgator Affiliate Program

    ReplyDelete
  17. Anyone who would come up with a website will definitely expect it to grow. Many thanks!
    ProWeb365 web design


    ReplyDelete
  18. cloudi5 the web design company in coimbatore. Cloudi5 is the best company in coimbatore to develop professional website

    ReplyDelete
  19. This comment has been removed by the author.

    ReplyDelete
  20. Great information!!! Thanks for your wonderful informative blog.
    Village Talkies a top-quality professional corporate video production company in Bangalore and also best explainer video company in Bangalore & animation video makers in Bangalore, Chennai, India & Maryland, Baltimore, USA provides Corporate & Brand films, Promotional, Marketing videos & Training videos, Product demo videos, Employee videos, Product video explainers, eLearning videos, 2d Animation, 3d Animation, Motion Graphics, Whiteboard Explainer videos Client Testimonial Videos, Video Presentation and more for all start-ups, industries, and corporate companies. From scripting to corporate video production services, explainer & 3d, 2d animation video production , our solutions are customized to your budget, timeline, and to meet the company goals and objectives.
    As a best video production company in Bangalore, we produce quality and creative videos to our clients.

    ReplyDelete
  21. The Chandigarh call girls are supposed to be the most charming selections in the whole area whom you would like to avail in for the instances of love.

    Visit Our Website:-
    Chandigarh call girls
    Chandigarh Independent Escorts

    ReplyDelete
  22. I have read all the comments and suggestions posted by the visitors for this article are very fine,We will wait for your next article so only.Thanks! Website Design Agency

    ReplyDelete
  23. VIP Escorts in Chandigarh are offering only the best and most pretty girls who are avid to show you they can exceed your expectation and that they are much than just a lovely face.

    Visit us now:_
    VIP Escorts in Chandigarh
    Escorts in Chandigarh

    ReplyDelete
  24. I have just read your post at the suggestion of my friend. Keep post.

    Digital Marketing | Online Marketing Course in Gurgaon

    ReplyDelete
  25. I think such posts are very interesting for reading.
    The information you have very true and useful, thank you have shared this post. Digitak Agency In India

    ReplyDelete
  26. Great info! I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have. nearest metro station to national museum

    ReplyDelete
  27. Hello, I am Surbhi Rana An bold Escorts in Chandigarh Have you seen my latest Pictures and Photographs here. Love you all.
    Chandigarh Escort Service |
    Mohali Escorts |

    ReplyDelete
  28. It's an excellent article!!! Such a piece of wonderful information and I was getting more concept to your blog. Thanks for your great explanations.
    AWS certification course in Chennai

    ReplyDelete
  29. I read this article. I think You have put a lot of effort to create this article. I appreciate your work.
    Thank you much more for sharing with us...!
    Reactjs Training in Chennai |
    Best Reactjs Training Institute in Chennai |
    Reactjs course in Chennai

    ReplyDelete
  30. Noida escort service
    Get the best Noida Escort service by independent Noida escorts or Noida call girls. Book call girls in Noida or escorts in Noida online visit https://www.pyaliescortservice.com/

    Get the best escort services in Panchkula by hot call girls in Panchkula, escorts in Panchkula or Panchkula escorts or Panchkula call girls visit
    https://www.mayaescortservice.com/panchkula-call-girls.html

    Delhi escort service
    Get the best Delhi Escort service by independent Delhi escorts or Delhi call girls. Book call girls in Delhi or escorts in Delhi online visit https://www.nancymittal.com/

    ReplyDelete
  31. It's fantastic that you are getting ideas from this post as well as from our discussion made here.
    Augurs Technologies Germany GmbH

    ReplyDelete
  32. toptan iç giyim tercih etmenizin sebebi kaliteyi ucuza satın alabilmektir. Ürünler yine orjinaldir ve size sorun yaşatmaz. Yine de bilinen tekstil markalarını tercih etmelisiniz.

    Digitürk başvuru güncel adresine hoşgeldiniz. Hemen başvuru yaparsanız anında kurulum yapmaktayız.

    tutku iç giyim Türkiye'nin önde gelen iç giyim markalarından birisi olmasının yanı sıra en çok satan markalardan birisidir. Ürünleri hem çok kalitelidir hem de pamuk kullanımı daha fazladır.

    nbb sütyen hem kaliteli hem de uygun fiyatlı sütyenler üretmektedir. Sütyene ek olarak sütyen takımı ve jartiyer gibi ürünleri de mevcuttur. Özellikle Avrupa ve Orta Doğu'da çokça tercih edilmektedir.

    yeni inci sütyen kaliteyi ucuz olarak sizlere ulaştırmaktadır. Çok çeşitli sütyen varyantları mevcuttur. iç giyime damga vuran markalardan biridir ve genellikle Avrupa'da ismi sıklıkla duyulur.

    iç giyim ürünlerine her zaman dikkat etmemiz gerekmektedir. Üretimde kullanılan malzemelerin kullanım oranları, kumaşın esnekliği, çekmezlik testi gibi birçok unsuru aynı anda değerlendirerek seçim yapmalıyız.

    iç giyim bayanların erkeklere göre daha dikkatli oldukları bir alandır. Erkeklere göre daha özenli ve daha seçici davranırlar. Biliyorlar ki iç giyimde kullandıkları şeyler kafalarındaki ve ruhlarındaki özellikleri dışa vururlar.

    ReplyDelete
  33. beğeni satın al
    instagram takipçi satın al
    ucuz takipçi
    takipçi satın al
    https://takipcikenti.com
    https://ucsatinal.org
    instagram takipçi satın al
    https://perdemodelleri.org
    https://yazanadam.com
    instagram takipçi satın al
    balon perdeler
    petek üstü perde
    mutfak tül modelleri
    kısa perde modelleri
    fon perde modelleri
    tül perde modelleri
    https://atakanmedya.com
    https://fatihmedya.com
    https://smmpaketleri.com
    https://takipcialdim.com
    https://yazanadam.com
    yasaklı sitelere giriş
    aşk kitapları
    yabancı şarkılar
    sigorta sorgula
    https://cozumlec.com
    word indir ücretsiz
    tiktok jeton hilesi

    ReplyDelete
  34. I know that now is very easy to build website, but I don't see any reason to do it when you have instagram. And when you can easy promote it buying likes and followers from here https://soclikes.com/

    ReplyDelete
  35. On the off chance that you are looking for independent Varanasi escort services we can help you by offering the most amazing in call and outcall independent Varanasi escorts oversaw by us. It is amazingly enticing to be with them. The kinky escorts in Varanasi of our agency realize how to keep their customers glad and internally happy with the ideal combination of true serenity, happiness, sexual delight,

    ReplyDelete
  36. I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much.

    Wow, wonderful blog layout! How long have you been blogging for? you made blogging look easyThe overall look of your web site is excellent, let alone the content!

    ReplyDelete