{"id":6,"date":"2008-06-17T15:24:11","date_gmt":"2008-06-17T19:24:11","guid":{"rendered":"http:\/\/cd34.com\/blog\/?p=6"},"modified":"2008-06-17T15:24:11","modified_gmt":"2008-06-17T19:24:11","slug":"if-you-could-have-it-all","status":"publish","type":"post","link":"https:\/\/cd34.com\/blog\/framework\/if-you-could-have-it-all\/","title":{"rendered":"If you could have it all&#8230;."},"content":{"rendered":"<p>I&#8217;m a bit of a web performance nut.\u00a0 I like technology when it is used to solve real challenges and won&#8217;t use technology for technology&#8217;s sake.\u00a0 When you look at today&#8217;s scalability problems of all of the web 2.0 shops, one only needs to make one real generalization.<\/p>\n<p>What is the failing point of today&#8217;s sites?\u00a0 How many stories have you read in the media about some rising star that gets mentioned on yahoo or digg or slashdot?\u00a0 Generally, their site crashes under the crushing load (I&#8217;ve had sites slashdotted, its not as big a deal as they would have you believe).\u00a0 But, the problem we face is multifaceted.<\/p>\n<p>Developer learns php.\u00a0 Developer discovers MySQL.\u00a0 Developer stumbles across concept.\u00a0 Developer cobbles together code, buys hosting &#8212; sometimes on a virtual\/shared hosting environment, sometimes on a VPS, sometimes a dedicated server.\u00a0 But, the software that performs well for a few friends hitting the site and acting as beta testers is never really pushed.\u00a0 While the pages look nice, the engine behind them is usually poorly conceived, or worse, designed thinking that the single server or dual server web\/mysql combination is going to keep them alive.<\/p>\n<p>95% of the software designed and distributed under Open Source Licenses doesn&#8217;t understand the unique challenges behind a site that needs to handle 20 visitors versus 20000 visitors per hour.\u00a0 Tuning apache to handle high traffic, tuning mysql indexes and mysql&#8217;s configuration and writing applications designed for high traffic is not easy.\u00a0 Debugging and repairing those applications after they&#8217;ve been deployed is even harder.\u00a0 Repairing while maintaining backwards compatibility adds a whole new level of complexity.<\/p>\n<p>Design with scalability in mind.\u00a0 I saw a blog the other day where someone was replacing a 3 server setup behind a load balancer with a single machine because the complexity of 100% uptime made their job harder.\u00a0 Oh really?<\/p>\n<p>What happens when your traffic needs outgrow that one server?\u00a0 Whoops, I&#8217;m back to that load balanced solution that I just left.<\/p>\n<p>What are the phases that you need to look for?<\/p>\n<p>Is your platform ready for 100,000 users a day?\u00a0 If not, what do you need to do to make sure it is ready?\u00a0 Where are your bottlenecks? Where does your software break down?\u00a0 What is your expansion plan?\u00a0 When do you split your mysql writers and readers?\u00a0 Where does your appliction boundary start and end?\u00a0 What do you think breaks next?\u00a0 Where is our next bottleneck?<\/p>\n<p>What happens with a digg or slashdot that crushes a site?\u00a0 Usually, its a site that has all sorts of dynamic content with ill conceived mysql queries generated in realtime every pageload.\u00a0 I can remember a CMS framework that did 54 sql queries to display the front page.\u00a0\u00a0 That is just rediculous and I dumped that framework 5 minutes after seeing that.\u00a0 Pity, they did have a good concept.<\/p>\n<p>So, with scalability in mind, how does one engineer a solution?\u00a0 LAMP isn&#8217;t the answer.<\/p>\n<p>You pick a framework that doesn&#8217;t use the usual paradigms of an application.\u00a0 Why should you worry about a protocol, you should design the application divorced from the protocol.\u00a0 You develop an application that faces the web rather than talking direct to the web because other applications might talk to your application.\u00a0 When it comes time to scale, you add machines without having to worry about task distribution.\u00a0 Google does it, you should too.<\/p>\n<p><a title=\"Mantissa\" href=\"http:\/\/divmod.org\/trac\/wiki\/DivmodMantissa\" target=\"_blank\">Mantissa<\/a> solves that problem by being a framework that encompasses all of that.\u00a0 If some of these Web 2.0 sites thought about their deployment like google did &#8212; expansion wouldn&#8217;t create much turmoil.\u00a0 To grow, you just add more machines to the network.<\/p>\n<div style=\"float:left;\">\n<div id=\"fb-root\"><\/div>\n<fb:like href=\"https:\/\/cd34.com\/blog\/framework\/if-you-could-have-it-all\/\" width=\"250\" send=\"false\" show_faces=\"false\" layout=\"button_count\" action=\"recommend\"><\/fb:like>\n<\/div><div style=\"clear:both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>I&#8217;m a bit of a web performance nut.\u00a0 I like technology when it is used to solve real challenges and won&#8217;t use technology for technology&#8217;s sake.\u00a0 When you look at today&#8217;s scalability problems of all of the web 2.0 shops, one only needs to make one real generalization. What is the failing point of today&#8217;s [&hellip;]<\/p>\n<div style=\"float:left;\">\n<div id=\"fb-root\"><\/div>\n<fb:like href=\"https:\/\/cd34.com\/blog\/framework\/if-you-could-have-it-all\/\" width=\"250\" send=\"false\" show_faces=\"false\" layout=\"button_count\" action=\"recommend\"><\/fb:like>\n<\/div><div style=\"clear:both;\"><\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,7],"tags":[],"class_list":["post-6","post","type-post","status-publish","format-standard","hentry","category-framework","category-python"],"_links":{"self":[{"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/posts\/6","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/comments?post=6"}],"version-history":[{"count":0,"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/posts\/6\/revisions"}],"wp:attachment":[{"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/media?parent=6"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/categories?post=6"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cd34.com\/blog\/wp-json\/wp\/v2\/tags?post=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}