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


  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?



    October 16, 2009 7:46 AM

    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

    2. Thanks but I think its not a modern way to build website. Try to search on youtube some videos about it, and you will understand what i am talking about. By the way remember, that if you want to quickly boost the number of your channel subscribers, you can simply use the help of to quickly cope with this task.

  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.

  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.

  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


  5. Hi Bilal
    First thing I'd say is EC2 is not a cheaper option. I have used The Planet ( 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?

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

  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.


  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

  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

  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.

  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

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

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

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

    web design company jacksonville

  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.

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

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

  18. This comment has been removed by the author.

  19. 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.

  20. 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

  21. 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

  22. 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

  23. 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

  24. 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

  25. 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 |

  26. 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

  27. 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

  28. 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

    Get the best escort services in Panchkula by hot call girls in Panchkula, escorts in Panchkula or Panchkula escorts or Panchkula call girls visit

    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

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

  30. 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.

  31. beğeni satın al
    instagram takipçi satın al
    ucuz takipçi
    takipçi satın al
    instagram takipçi satın al
    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
    yasaklı sitelere giriş
    aşk kitapları
    yabancı şarkılar
    sigorta sorgula
    word indir ücretsiz
    tiktok jeton hilesi

  32. 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

  33. 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,

  34. 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!


    Credit Saint is one of the best credit repair companies that fixes your credit by removing negative information from your report. They will work on both the FICO score and other scoring models, like VantageScore. The goal of their service is to help you get back on track with lowering debt balances

    Credit Saint has over 15 years of experience. They have been helping people fix their credit for decades and are still doing it to this day. Credit Saint is one of the few credit repair companies that has an A rating at Better Business Bureau.

  36. Today because of these positive developments in technology, more and more web enterprises are coming forward to promote websites related to their trades and business segments. bing-directory com

  37. If you are looking to hire a top-rated SEO company in Toronto, you have landed at the right place. We have over 10 years of experience in ranking websites from different industry verticals on top of the search results. Get in touch with us for more details.

  38. Nice Content, Thank you for sharing such a good content. I also sharing some information about Website Designing Company in Gurgaon
    . Dixinfotech in web-related services includes Website Designing, Web Development, E-commerce Website Development, etc. They provide affordable website designing services and their cost is very low They develop customized websites for the clients as per the requirement of the business. They provide the best services.

  39. 1Solutions is the top-rated WordPress development company providing end-to-end digital solutions that include conceptualization, design, development, and marketing. Our WordPress websites are easy to manage and create a lasting impression. Get in touch for more details.

  40. Marketing is vital for any business and a good website design serves as the cornerstone of online marketing. By leveraging the expertise of professional website designers you can improve your business, obtain more sales, and raise your company's profits. Website Design Company Dubai

  41. İnstagram takipçi satın al! İnstagram takipçi sitesi ile takipçi satın al sende sosyal medyada fenomen olmaya bir adım at. Sende hemen instagram takipçi satın almak istiyorsan tıkla:

    1- takipçi satın al

    2- takipçi satın al

    3- takipçi satın al

  42. Multilingua is the best foreign language institute in Delhi that offers the best in-its-class language Education, IELTS training & personalized guidance to students who wish to learn and are willing to try new and unfamiliar things. We are also one of the BEST language & IELTS coaching, IELTS Training Course, English Language Course, German Language Course, French Language Institute, Chinese Language Classes in Delhi, Language Translation services, provide training to a large number of students every year who are looking to work & study Abroad.

  43. Multilingua provides the best IELTS Coaching in Delhi that offers thebest in-its-class language Education, IELTS training & personalizedguidance to students who wish to learn and are willing to try new and unfamiliar things. We also provide the best English speaking courses,  Spanish language courses, Chinese language courses, French language
    courses, and Translation services in Delhi.


  44. Winaum Learning offers online vedic maths classes. or offline vedic maths classes, an educational platform for kids where they learn What is Vedic Math tricks. for developing their skills in Maths via (Curriculum program-Grow with Maths and Vedic Maths ), Handwriting class
    , and English Grammar. We offer kids online live classes and offline sessions through trained and expert teachers. The classes are conducted in 1:1 or small group sessions to ensure personal attention to every child. It organizes competitions also for maths-IMC and handwriting- IHC.So, dont delay and enrol for vedic maths course.

  45. Congratulations on your article, it was very helpful and successful. a1e2d8fdad9d064d3445982f0904ece7
    website kurma
    website kurma
    sms onay

  46. Thank you for your explanation, very good content. 2ee0629b8f6cd9ecb7dea02c02f2dcec
    altın dedektörü

  47. your article is valuable for me and for others. Thanks for sharing your information! disc prolapse treatment in gurgaon