{"id":16,"date":"2010-04-09T10:55:26","date_gmt":"2010-04-09T10:55:26","guid":{"rendered":"http:\/\/karlsblog.bigmight.com\/blog\/?p=16"},"modified":"2016-10-20T21:45:42","modified_gmt":"2016-10-20T21:45:42","slug":"high-performance-hosting-unfinished","status":"publish","type":"post","link":"https:\/\/karlsblog.bigmight.com\/blog\/2010\/04\/09\/high-performance-hosting-unfinished\/","title":{"rendered":"High Performance Hosting &#8211; Unfinished"},"content":{"rendered":"<h1>Introduction<\/h1>\n<p>Over the years I&#8217;ve been asked to produce a number of high reliability high throughout web hosting solutions. Although there are a number of off the shelf solutions that are expensive, the true high availability solutions can be realised using standard linux builds.<\/p>\n<p>In the following article I&#8217;ll outline aids to help you build low cost HA solutions using linux.<\/p>\n<h1>Load Balancing<\/h1>\n<p>For high throughput application it is often not possible to host on a single server. In addition the availability of a single host cannot be guaranteed, so a multi hosted solution is often better.<\/p>\n<p>Developing web applications that can run on multiple servers poses a number of problems, mainly around state maintenance and session management, but these will be covered elsewhere.<\/p>\n<h2>Commercial Load Balancers<\/h2>\n<p>Commercial hardware load balancers offer a range of features, but you must always consider the &#8220;Single Point of Failure&#8221; problem, even if the load balancer has dual power supplies etc it can fail, or require replacement. It is always better to buy two complete units that can work in parallel offering higher availability. Upgrading a single unit can be done without fear of loss off service.<\/p>\n<p>By using an external pair of round robin DNS entries it is possible to spread the load across balancers. In the event of a balancer failing you can move the failed IP address to the remaining balancer.<\/p>\n<p>Commercial load balancers are expensive!.<\/p>\n<h2>Linux Load Balancers<\/h2>\n<p>Using two linux servers and a <a title=\"High Availibility Linux Solutions\" href=\"http:\/\/www.linux-ha.org\/\">high availability heartbeat configuration<\/a> provides a far cheaper solution had has been used by <a title=\"Bigmite Webhosting Solutions\" href=\"http:\/\/karlsblog.bigmight.com\/\">Bigmite Hosting Solutions<\/a>. Using two linux servers in a HA configuration and running suitable load balancing software a high throughput can be achieved.<\/p>\n<p>A small server can saturate a 1Gb\/s network link, leaving the back end application servers to do the work. The choice of load balancing software depends on your requireements such as:-<\/p>\n<ol>\n<li>Session Management<\/li>\n<li>Keep Alives<\/li>\n<li>Monitoring<\/li>\n<li>Latency<\/li>\n<\/ol>\n<p>If no session management is required (such as a static site) then the kernel based ipvs (<a title=\"Linux Virtual Server - Load Balancing\" href=\"http:\/\/www.linuxvirtualserver.org\/\">Linux Virtual Server<\/a>) can be used, this is part of the standard linux distribution, and is simple to configure and very reliable.<\/p>\n<p>If sessions need to be maintained to a client then layer x based load balancing is required. Packages such as\u00a0 <a title=\"HA Proxy - Load Balancing\" href=\"http:\/\/haproxy.1wt.eu\/\">HAProxy<\/a> and <a title=\"balanceNG - Load Balancer\" href=\"http:\/\/www.inlab.de\/balanceng\/\">BalanceNG<\/a> (which is next generation of the <a title=\"Balance - Load Balancer\" href=\"http:\/\/www.inlab.de\/balance.html\">balance <\/a>software) offer these features.<\/p>\n<h1>Heartbeat<\/h1>\n<p>Heatbeat (www.linuxha.org<\/p>\n<h1>Requests for comments&#8230;&#8230;<\/h1>\n<p>It is NOT finished&#8230;. it&#8217;s just ready for comments&#8230;. I&#8217;ve two busy to complete &#8211; please comment, and I&#8217;ll add your comments&#8230;..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Over the years I&#8217;ve been asked to produce a number of high reliability high throughout web hosting solutions. Although there are a number of off the shelf solutions that are expensive, the true high availability solutions can be realised using standard linux builds. In the following article I&#8217;ll outline aids to help you build &hellip; <a href=\"https:\/\/karlsblog.bigmight.com\/blog\/2010\/04\/09\/high-performance-hosting-unfinished\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;High Performance Hosting &#8211; Unfinished&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/karlsblog.bigmight.com\/blog\/wp-json\/wp\/v2\/posts\/16"}],"collection":[{"href":"https:\/\/karlsblog.bigmight.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/karlsblog.bigmight.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/karlsblog.bigmight.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/karlsblog.bigmight.com\/blog\/wp-json\/wp\/v2\/comments?post=16"}],"version-history":[{"count":8,"href":"https:\/\/karlsblog.bigmight.com\/blog\/wp-json\/wp\/v2\/posts\/16\/revisions"}],"predecessor-version":[{"id":25,"href":"https:\/\/karlsblog.bigmight.com\/blog\/wp-json\/wp\/v2\/posts\/16\/revisions\/25"}],"wp:attachment":[{"href":"https:\/\/karlsblog.bigmight.com\/blog\/wp-json\/wp\/v2\/media?parent=16"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/karlsblog.bigmight.com\/blog\/wp-json\/wp\/v2\/categories?post=16"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/karlsblog.bigmight.com\/blog\/wp-json\/wp\/v2\/tags?post=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}