{"id":23716,"date":"2017-06-04T15:49:43","date_gmt":"2017-06-04T15:49:43","guid":{"rendered":"https:\/\/arabhosters.com\/?page_id=23716"},"modified":"2017-09-11T13:02:24","modified_gmt":"2017-09-11T13:02:24","slug":"high-availability","status":"publish","type":"page","link":"https:\/\/arabhosters.com\/en\/high-availability\/","title":{"rendered":"High Availability"},"content":{"rendered":"<p>[vc_row full_width=&#8221;stretch_row&#8221; parallax=&#8221;content-moving-fade&#8221; parallax_image=&#8221;23531&#8243; css=&#8221;.vc_custom_1441961230876{margin-bottom: 0px !important;padding-top: 120px !important;padding-bottom: 100px !important;}&#8221;][vc_column el_class=&#8221;center&#8221;]<div class=\"boc_spacing \" style=\"height: 50px\"><\/div><h3 class=\"boc_heading high_av_head center  boc_animate_when_almost_visible boc_top-to-bottom\"  style=\"margin-bottom: 20px;margin-top: 0px;color: #ffffff;font-size: 52px;\"><span>HIGH <strong>AVAILABILITY<\/strong> <\/span><\/h3>[vc_column_text el_class=&#8221;high_desc&#8221; css=&#8221;.vc_custom_1505128259994{margin-right: 40px !important;margin-left: 40px !important;}&#8221;]<span style=\"font-weight: 400;\">Since that communication controls our daily lives, the demand of reliable, stable and high-performance infrastructures that designed to serve critical systems and ensures its stability increased; High Availability and scalability are now a must, as high availability is a quality of infrastructure design at scale that addresses the decreasing of downtime, eliminating single point of failure and handling increased system loads.<\/span>[\/vc_column_text][vc_row_inner css=&#8221;.vc_custom_1441890567087{margin-right: -6px !important;margin-left: -6px !important;}&#8221;][vc_column_inner el_class=&#8221;box_high border_bgr_clip&#8221; width=&#8221;1\/2&#8243; css=&#8221;.vc_custom_1504015279686{border-right-width: 15px !important;border-left-width: 15px !important;padding-top: 30px !important;padding-right: 30px !important;padding-bottom: 30px !important;padding-left: 30px !important;background-color: rgba(0,0,0,0.42) !important;*background-color: rgb(0,0,0) !important;border-left-color: rgba(255,255,255,0.01) !important;border-left-style: solid !important;border-right-color: rgba(255,255,255,0.01) !important;border-right-style: solid !important;}&#8221;]<div class=\"boc_icon_holder boc_icon_size_large boc_icon_pos_center  \" style=\"\"><span class=\"boc_icon icon icon-cup\" style=\"color:#ffffff;\"><\/span><\/div><div class=\"boc_spacing \" style=\"height: 20px\"><\/div><h2 class=\"boc_heading  center  \"  style=\"margin-bottom: 20px;margin-top: 0px;color: #ffffff;font-size: 23px;\"><span>DATABASE CLUSTERS<\/span><\/h2>[vc_column_text el_class=&#8221;high_desc&#8221; css=&#8221;.vc_custom_1504794395042{margin-top: 20px !important;margin-right: 20px !important;margin-bottom: 20px !important;margin-left: 20px !important;}&#8221;]KEEP DATABASES CONSISTENT AND AVAILABLE AT ALL TIMES<\/p>\n<p>Active-passive database clusters offer the accessibility of centralized storage, plus the high availability ensured by failover to redundant hot copies of your data in the event of your active database failing<br \/>\nRead more about <a href=\"https:\/\/arabhosters.com\/en\/database-clustering\/\">database clustering<\/a>[\/vc_column_text][\/vc_column_inner][vc_column_inner el_class=&#8221;box_high border_bgr_clip&#8221; width=&#8221;1\/2&#8243; css=&#8221;.vc_custom_1504015284238{border-right-width: 15px !important;border-left-width: 15px !important;padding-top: 30px !important;padding-right: 30px !important;padding-bottom: 30px !important;padding-left: 30px !important;background-color: rgba(0,0,0,0.42) !important;*background-color: rgb(0,0,0) !important;border-left-color: rgba(0,0,0,0.01) !important;border-left-style: solid !important;border-right-color: rgba(0,0,0,0.01) !important;border-right-style: solid !important;}&#8221;]<div class=\"boc_icon_holder boc_icon_size_large boc_icon_pos_center  \" style=\"\"><span class=\"boc_icon icon icon-rocket\" style=\"color:#ffffff;\"><\/span><\/div><div class=\"boc_spacing \" style=\"height: 20px\"><\/div><h2 class=\"boc_heading  center  \"  style=\"margin-bottom: 20px;margin-top: 0px;color: #ffffff;font-size: 23px;\"><span>LOAD BALANCING<\/span><\/h2>[vc_column_text el_class=&#8221;high_desc&#8221; css=&#8221;.vc_custom_1504794299952{margin-top: 20px !important;margin-right: 20px !important;margin-bottom: 20px !important;margin-left: 20px !important;}&#8221;]<strong>KEEP APPLICATIONS AVAILABLE AT ALL TIMES<\/strong>.<\/p>\n<p>Load balancing shares traffic between servers, increasing capacity, improving server performance and providing redundancy with failover in the event of hardware or application failure.[\/vc_column_text][\/vc_column_inner][\/vc_row_inner][\/vc_column][\/vc_row][vc_row][vc_column]<div class=\"boc_spacing \" style=\"height: 60px\"><\/div>[\/vc_column][\/vc_row][vc_row][vc_column]\r\n\t\t<!--New Tabs-->\r\n\t\t<div class=\"newtabs clearfix vertical high_tabs\">\r\n\t\t\t<ul class=\"resp-tabs-list\">\r\n\t\t\t<\/ul>\r\n\t\t\t<div class=\"resp-tabs-container\">\r\n\t\t<div class=\"single_tab_div\" rel-title=\"Everything On One Server\" rel-icon=\"icon icon-magnet\">[vc_row_inner][vc_column_inner][vc_single_image alignment=&#8221;center&#8221; image=&#8221;25347&#8243;][vc_column_text]The entire environment resides on a single server. For a typical web application, that would include the web server, application server, and database server. A common variation of this setup is a LAMP stack, which stands for Linux, Apache, MySQL, and PHP, on a single server.<\/p>\n<p>Use Case: Good for setting up an application quickly, as it is the simplest setup possible, but it offers little in the way of scalability and component isolation.[\/vc_column_text][vc_column_text]<\/p>\n<h3>PROS<\/h3>\n<ul>\n<li>Simple<\/li>\n<\/ul>\n<h3>CONS<\/h3>\n<ul>\n<li>Application and database contend for the same server resources (CPU, Memory, I\/O, etc.) which, aside from possible poor performance, can make it difficult to determine the source (application or database) of poor performance<\/li>\n<li>Not readily horizontally scalable<\/li>\n<\/ul>\n<p>[\/vc_column_text][\/vc_column_inner][\/vc_row_inner]<\/div><div class=\"single_tab_div\" rel-title=\"Separate Database Server\" rel-icon=\"icon icon-share\">[vc_row_inner][vc_column_inner][vc_single_image alignment=&#8221;center&#8221; image=&#8221;25349&#8243;][vc_column_text]The database management system (DBMS) can be separated from the rest of the environment to eliminate the resource contention between the application and the database, and to increase security by removing the database from the DMZ, or public internet.<\/p>\n<p>Use Case: Good for setting up an application quickly, but keeps application and database from fighting over the same system resources.<br \/>\n[\/vc_column_text][vc_column_text]<\/p>\n<h3>PROS<\/h3>\n<ul>\n<li>Application and database tiers do not contend for the same server resources (CPU, Memory, I\/O, etc.)<\/li>\n<li>You may vertically scale each tier separately, by adding more resources to whichever server needs increased capacity<\/li>\n<li>Depending on your setup, it may increase security by removing your database from the DMZ<\/li>\n<\/ul>\n<h3>CONS<\/h3>\n<ul>\n<li>Application Server without failover may cause bottleneck of failures<\/li>\n<\/ul>\n<p>[\/vc_column_text][\/vc_column_inner][\/vc_row_inner]<\/div><div class=\"single_tab_div\" rel-title=\"Load Balancer (Reverse Proxy)\" rel-icon=\"icon icon-gym\">[vc_row_inner][vc_column_inner][vc_single_image alignment=&#8221;center&#8221; image=&#8221;25353&#8243;][vc_column_text]Load balancers can be added to a server environment to improve performance and reliability by distributing the workload across multiple servers. If one of the servers that is load balanced fails, the other servers will handle the incoming traffic until the failed server becomes healthy again. It can also be used to serve multiple applications through the same domain and port, by using a layer 7 (application layer) reverse proxy.<\/p>\n<p>Examples of software capable of reverse proxy load balancing: HAProxy, Nginx, and Varnish.<\/p>\n<p>Use Case: Useful in an environment that requires scaling by adding more servers, also known as horizontal scaling.<br \/>\n[\/vc_column_text][vc_column_text]<\/p>\n<h3>PROS<\/h3>\n<ul>\n<li>Enables horizontal scaling, i.e. environment capacity can be scaled by adding more servers to it<\/li>\n<li>Can protect against DDOS attacks by limiting client connections to a sensible amount and frequency<\/li>\n<\/ul>\n<h3>CONS<\/h3>\n<ul>\n<li>The load balancer is a single point of failure; if it goes down, your whole service can go down. A high availability (HA) setup is an infrastructure without a single point of failure.<\/li>\n<\/ul>\n<p>[\/vc_column_text][\/vc_column_inner][\/vc_row_inner]<\/div><div class=\"single_tab_div\" rel-title=\"HTTP Accelerator (Caching Reverse Proxy)\" rel-icon=\"icon icon-plane\">[vc_row_inner][vc_column_inner][vc_single_image alignment=&#8221;center&#8221; image=&#8221;25351&#8243;][vc_column_text]An HTTP accelerator, or caching HTTP reverse proxy, can be used to reduce the time it takes to serve content to a user through a variety of techniques. The main technique employed with an HTTP accelerator is caching responses from a web or application server in memory, so future requests for the same content can be served quickly, with less unnecessary interaction with the web or application servers.<\/p>\n<p>Examples of software capable of HTTP acceleration: Varnish, Squid, Nginx.<\/p>\n<p>Use Case: Useful in an environment with content-heavy dynamic web applications, or with many commonly accessed files.<br \/>\n[\/vc_column_text][vc_column_text]<\/p>\n<h3>PROS<\/h3>\n<ul>\n<li>Increase site performance by reducing CPU load on web server, through caching and compression, thereby increasing user capacity<\/li>\n<li>Can be used as a reverse proxy load balancer<\/li>\n<li>Some caching software can protect against DDOS attacks<\/li>\n<\/ul>\n<h3>CONS<\/h3>\n<ul>\n<li>Requires tuning to get best performance out of it<\/li>\n<li>If the cache-hit rate is low, it could reduce performance<\/li>\n<\/ul>\n<p>[\/vc_column_text][\/vc_column_inner][\/vc_row_inner]<\/div><div class=\"single_tab_div\" rel-title=\"Master-Slave Database Replication\" rel-icon=\"icon icon-data\">[vc_row_inner][vc_column_inner][vc_single_image alignment=&#8221;center&#8221; image=&#8221;25355&#8243;][vc_column_text]One way to improve performance of a database system that performs many reads compared to writes, such as a CMS, is to use master-slave database replication. Master-slave replication requires a master and one or more slave nodes. In this setup, all updates are sent to the master node and reads can be distributed across all nodes.<\/p>\n<p>Use Case: Good for increasing the read performance for the database tier of an application.<br \/>\n[\/vc_column_text][vc_column_text]<\/p>\n<h3>PROS<\/h3>\n<ul>\n<li>Improves database read performance by spreading reads across slaves<\/li>\n<li>Can improve write performance by using master exclusively for updates (it spends no time serving read requests)<\/li>\n<\/ul>\n<h3>CONS<\/h3>\n<ul>\n<li>The application accessing the database must have a mechanism to determine which database nodes it should send update and read requests to<\/li>\n<li>Updates to slaves are asynchronous, so there is a chance that their contents could be out of date<\/li>\n<li>If the master fails, no updates can be performed on the database until the issue is corrected<\/li>\n<\/ul>\n<p>[\/vc_column_text][\/vc_column_inner][\/vc_row_inner]<\/div><div class=\"single_tab_div\" rel-title=\"Combining the Concepts\" rel-icon=\"icon icon-glasses\">[vc_row_inner][vc_column_inner][vc_single_image alignment=&#8221;center&#8221; image=&#8221;25360&#8243;][vc_column_text]<\/p>\n<p>Let\u2019s assume that the load balancer is configured to recognize static requests (like images, css, javascript, etc.) and send those requests directly to the caching servers, and send other requests to the application servers.<\/p>\n<p>Here is a description of what would happen when a user sends a requests dynamic content:<\/p>\n<ol>\n<li>The user requests dynamic content from\u00a0<a href=\"http:\/\/example.com\/\"><i>http:\/\/example.com\/<\/i><\/a>\u00a0(load balancer)<\/li>\n<li>The load balancer sends request to app-backend<\/li>\n<li>app-backend reads from the database and returns requested content to load balancer<\/li>\n<li>The load balancer returns requested data to the user<\/li>\n<\/ol>\n<p>If the user requests static content:<\/p>\n<ol>\n<li>The load balancer checks cache-backend to see if the requested content is cached (cache-hit) or not (cache-miss)<\/li>\n<li><i>If cache-hit<\/i>: return the requested content to the load balancer and jump to Step 7.\u00a0<i>If cache-miss<\/i>: the cache server forwards the request to app-backend, through the load balancer<\/li>\n<li>The load balancer forwards the request through to app-backend<\/li>\n<li>app-backend reads from the database then returns requested content to the load balancer<\/li>\n<li>The load balancer forwards the response to cache-backend<\/li>\n<li>cache-backend\u00a0<i>caches the content<\/i>\u00a0then returns it to the load balancer<\/li>\n<li>The load balancer returns requested data to the user<\/li>\n<\/ol>\n<p>This environment still has two single points of failure (load balancer and master database server), but it provides the all of the other reliability and performance benefits that were described in each section above.<\/p>\n<p>[\/vc_column_text][\/vc_column_inner][\/vc_row_inner]<\/div><\/div>\r\n\t\t\t\t<\/div>[\/vc_column][\/vc_row]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[vc_row full_width=&#8221;stretch_row&#8221; parallax=&#8221;content-moving-fade&#8221; parallax_image=&#8221;23531&#8243; css=&#8221;.vc_custom_1441961230876{margin-bottom: 0px !important;padding-top: 120px !important;padding-bottom: 100px !important;}&#8221;][vc_column el_class=&#8221;center&#8221;][vc_column_text el_class=&#8221;high_desc&#8221; css=&#8221;.vc_custom_1505128259994{margin-right: 40px !important;margin-left: 40px !important;}&#8221;]Since that communication controls our daily lives, the demand of reliable, stable and high-performance infrastructures that designed to serve critical systems and ensures its stability increased; High Availability and scalability are now a must, as high availability is a quality of infrastructure design<\/p>\n<div class=\"h10\"><\/div>\n<p><a class=\"more-link2 flat\" href=\"https:\/\/arabhosters.com\/en\/high-availability\/\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"spay_email":""},"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/P99RwU-6aw","jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/arabhosters.com\/en\/wp-json\/wp\/v2\/pages\/23716\/"}],"collection":[{"href":"https:\/\/arabhosters.com\/en\/wp-json\/wp\/v2\/pages\/"}],"about":[{"href":"https:\/\/arabhosters.com\/en\/wp-json\/wp\/v2\/types\/page\/"}],"author":[{"embeddable":true,"href":"https:\/\/arabhosters.com\/en\/wp-json\/wp\/v2\/users\/1\/"}],"replies":[{"embeddable":true,"href":"https:\/\/arabhosters.com\/en\/wp-json\/wp\/v2\/comments\/?post=23716"}],"version-history":[{"count":5,"href":"https:\/\/arabhosters.com\/en\/wp-json\/wp\/v2\/pages\/23716\/revisions\/"}],"predecessor-version":[{"id":25983,"href":"https:\/\/arabhosters.com\/en\/wp-json\/wp\/v2\/pages\/23716\/revisions\/25983\/"}],"wp:attachment":[{"href":"https:\/\/arabhosters.com\/en\/wp-json\/wp\/v2\/media\/?parent=23716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}