{"id":1146,"date":"2020-12-16T12:56:16","date_gmt":"2020-12-16T05:56:16","guid":{"rendered":"https:\/\/vticloud.io\/?p=1146"},"modified":"2021-09-20T09:34:23","modified_gmt":"2021-09-20T02:34:23","slug":"xay-dung-kien-truc-high-availability-tren-aws-cho-doanh-nghiep","status":"publish","type":"post","link":"https:\/\/vticloud.io\/en\/xay-dung-kien-truc-high-availability-tren-aws-cho-doanh-nghiep\/","title":{"rendered":"Building High Availability architecture on AWS for enterprises: Compute, Database and Storage"},"content":{"rendered":"<p><\/p>\n<p><span class=\"JLqJ4b ChMk0b\" data-language-for-alternatives=\"en\" data-language-to-translate-into=\"vi\" data-phrase-index=\"0\">When deciding on system architecture for an enterprise, there are many factors to consider, such as performance, scalability, availability, reliability, cost, and operation.<\/span> <span class=\"JLqJ4b ChMk0b\" data-language-for-alternatives=\"en\" data-language-to-translate-into=\"vi\" data-phrase-index=\"1\">In particular, ensuring high availability for the system must always be focused on interruption or inactivity) to ensure business continuity. This is always shown with the businesses&#8217; architectures, as every minute lost in system downtime can lead to a huge loss of enterprise&#8217;s revenue and reputation.\u00a0<\/span><\/p>\n<h2>The glitch of the &#8220;giants.&#8221;<\/h2>\n<p>One of the issues discussed over the past month was an AWS service crash with Kinesis Data Streams errors, which lasted for hours, resulting in a wide range of services being affected; at a low level, the application is slow, there are cases where the application is completely paralyzed, the big names affected can be mentioned as 1Passwords, Adobe Spark, Autodesk, Coinbase, DataCamp, Flickr, Roku, The Washington Post &#8230;<\/p>\n<p>Most recently, in the afternoon of December 14, 2020 (Vietnam time), Google services stopped working worldwide, with errors recorded, including Gmail, Google Calendar, YouTube, and a section of Google Search. The problem with Google affected a large number of Internet users globally. This is also the biggest Google crash in 2020.<\/p>\n<p>It is easy to see that big names like Google or AWS are inevitable problems with the system; although the probability is extremely low and rare, the damage is not small.<\/p>\n<h2>So, what is High Availability (HA)?<\/h2>\n<p><strong>High availability<\/strong> refers to the ability to avoid unplanned outages by eliminating single-point-of-failure (SPOF). High availability systems are understood as capable of continuing to function even when critical components fail, without interrupting service or losing data, and recovering seamlessly from failure. This is a measure of the hardware, operating system, middleware, and database management software reliability.<\/p>\n<p>High availability is usually measured as a percentage of uptime. The amount of &#8220;nines&#8221; is often used to indicate high availability. For example, &#8220;four nines&#8221; indicates a system that is active 99.99% of the time, meaning it has only been down for 52.6 minutes for the whole year.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-1126 size-full\" src=\"https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/Downtime-calculation.png\" alt=\"Downtime calculation\" width=\"481\" height=\"222\" srcset=\"https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/Downtime-calculation.png 481w, https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/Downtime-calculation-300x138.png 300w\" sizes=\"(max-width: 481px) 100vw, 481px\" \/><\/p>\n<p><span class=\"JLqJ4b ChMk0b\" data-language-for-alternatives=\"en\" data-language-to-translate-into=\"vi\" data-phrase-index=\"0\">Most of the challenges with implementing high availability in an enterprise environment often involve product vendor(s) or application design &#8211; especially when implementing new products.<\/span> <span class=\"JLqJ4b ChMk0b\" data-language-for-alternatives=\"en\" data-language-to-translate-into=\"vi\" data-phrase-index=\"1\">Most small businesses don&#8217;t pay too much attention to the stringent requirements of 24\/7 application support.<\/span> <span class=\"JLqJ4b ChMk0b\" data-language-for-alternatives=\"en\" data-language-to-translate-into=\"vi\" data-phrase-index=\"2\">The wrong decision-making can lead to a product architecture that is incompatible with the enterprise&#8217;s high availability solutions.<\/span><\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-1125 size-large\" src=\"https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/HA-principle-1024x576.png\" alt=\"HA principle\" width=\"1024\" height=\"576\" srcset=\"https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/HA-principle-1024x576.png 1024w, https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/HA-principle-300x169.png 300w, https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/HA-principle-768x432.png 768w, https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/HA-principle-1536x864.png 1536w, https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/HA-principle.png 1707w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<h2>Elements for a complete High availability system<\/h2>\n<ul class=\"ak-ul\">\n<li>\n<p><strong><a href=\"https:\/\/vticloud.io\/en\/10-tips-de-phat-trien-ke-hoach-aws-disaster-recovery\/\">Redundancy<\/a>:<\/strong> Ensuring that critical system components have another identical component with the same data can take over in case of failure.<\/p>\n<\/li>\n<li>\n<p><strong>Monitoring:<\/strong> Identifying problems in production systems that may disrupt or degrade service.<\/p>\n<\/li>\n<li>\n<p><strong>Failover:<\/strong> The ability to switch from an active system component to a redundant component in case of failure, imminent failure, degraded performance, or functionality.<\/p>\n<\/li>\n<li>\n<p><strong>Failback: <\/strong>The ability to switch back from a redundant component to the primary active component when it has recovered from failure.<\/p>\n<\/li>\n<\/ul>\n<h2>AWS High Availability: Compute, Databases, and Storage<\/h2>\n<p>AWS helps you achieve high availability for cloud workloads across three different dimensions:<\/p>\n<ul class=\"ak-ul\" data-indent-level=\"1\">\n<li>\n<p data-renderer-start-pos=\"3855\"><strong data-renderer-mark=\"true\">Compute<\/strong>\u00a0Amazon EC2 and other services that let you provision computing resources provide high availability features such as load balancing, auto-scaling, and provisioning across <a href=\"https:\/\/aws.amazon.com\/about-aws\/global-infrastructure\/regions_az\/?p=ngi&amp;loc=2#Availability_Zones\">Amazon Availability Zones (AZ)<\/a>, representing isolated parts of an Amazon data center.<\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"4155\"><strong data-renderer-mark=\"true\">Database:<\/strong> Amazon RDS and other managed SQL databases provide options for\u00a0automatically deploying databases\u00a0with a standby replica in a different AZ.<\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"4310\"><strong data-renderer-mark=\"true\">Storage:<\/strong> Amazon storage services, such as S3, EFS, and EBS, provide built-in high availability options. S3 and EFS automatically store data across different AZs, while EBS enables the deployment of snapshots to different AZs.<\/p>\n<\/li>\n<\/ul>\n<h3><strong><span lang=\"EN\">AWS High Availability for EC2 Instances<\/span><\/strong><\/h3>\n<p>If you are running instances on Amazon EC2, Amazon provides several built-in capabilities to achieve high availability:<\/p>\n<ul class=\"ak-ul\" data-indent-level=\"1\">\n<li>\n<p data-renderer-start-pos=\"4708\"><strong data-renderer-mark=\"true\"><span id=\"0ea82e00-b86c-44a7-bc30-1db779e30b83\" data-renderer-mark=\"true\" data-mark-type=\"annotation\" data-mark-annotation-type=\"inlineComment\" data-id=\"0ea82e00-b86c-44a7-bc30-1db779e30b83\">Elastic Load Balancing<\/span>:<\/strong> Can launch several EC2 instances and distribute traffic between them.<\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"4807\"><strong data-renderer-mark=\"true\">Availability Zones<span id=\"8b3ef0d1-8527-458f-87b6-5267ef3442bc\" data-renderer-mark=\"true\" data-mark-type=\"annotation\" data-mark-annotation-type=\"inlineComment\" data-id=\"8b3ef0d1-8527-458f-87b6-5267ef3442bc\">:<\/span><\/strong> Can place instances in different AZs.<\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"4874\"><strong data-renderer-mark=\"true\">Auto Scaling:<\/strong> Detect when loads increase, and then dynamically add more instances.<\/p>\n<\/li>\n<\/ul>\n<p>These capabilities are illustrated in the diagram below. The <strong>Elastic Load Balancing<\/strong>\u00a0distributes traffic between two or more EC2 instances, each of which can potentially be deployed in a separate subnet that resides in a separate Amazon <em>Availability Zone<\/em>. These instances can be part of an <em>Auto-Scaling Group<\/em>, with additional instances launched on-demand.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-1127 size-full\" src=\"https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/High-Availability-tren-EC2.png\" alt=\"High Availability tr\u00ean EC2\" width=\"735\" height=\"622\" srcset=\"https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/High-Availability-tren-EC2.png 735w, https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/High-Availability-tren-EC2-300x254.png 300w\" sizes=\"(max-width: 735px) 100vw, 735px\" \/><\/p>\n<h3>AWS High Availability for SQL Databases on Amazon RDS<\/h3>\n<ul>\n<li><strong data-renderer-mark=\"true\">Availability Zone:<\/strong><\/li>\n<\/ul>\n<p>Each <strong>Availability Zone<\/strong> will have one or more data centers. The Availability Zone was created to ensure that all the essential components of AWS are always active and have sufficient emergency backup capacity.<\/p>\n<p>Each Availability Zone operates independently but is still connected through its own high-speed fiber-optic network to facilitate data movement between Availability Zones within the same region.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-1128 size-large\" src=\"https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/AZ-an-toan-cho-tham-hoa-va-toi-uu-do-tre-1024x576.png\" alt=\"AZ an to\u00e0n cho th\u1ea3m h\u1ecda v\u00e0 t\u1ed1i \u01b0u \u0111\u1ed9 tr\u1ec5\" width=\"1024\" height=\"576\" srcset=\"https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/AZ-an-toan-cho-tham-hoa-va-toi-uu-do-tre-1024x576.png 1024w, https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/AZ-an-toan-cho-tham-hoa-va-toi-uu-do-tre-300x169.png 300w, https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/AZ-an-toan-cho-tham-hoa-va-toi-uu-do-tre-768x432.png 768w, https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/AZ-an-toan-cho-tham-hoa-va-toi-uu-do-tre-1536x864.png 1536w, https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/AZ-an-toan-cho-tham-hoa-va-toi-uu-do-tre.png 1666w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p style=\"text-align: center;\">Each AZ is approximately 100km apart to ensure safety from disasters while retaining optimal latency.<\/p>\n<ul>\n<li><strong data-renderer-mark=\"true\">Region:<\/strong><\/li>\n<\/ul>\n<p>Each <strong>AWS Region<\/strong> concentrates at least 02 Availability Zones (North Virginia is currently the most AWS Availability Zones with 6 zones). In addition to backing up data between Availability Zones in the same region, users can also choose to back up data between different regions and use public or private networks to ensure that business operations always go smoothly and never interrupted.<\/p>\n<p>Currently, AWS has about<a href=\"https:\/\/aws.amazon.com\/about-aws\/global-infrastructure\/\"> 77 Availability Zones spread over 24 different geographical regions<\/a>. This number is expected to increase in the future to provide customers with richer service options.<\/p>\n<h3>AWS High Availability for SQL Databases on Amazon RDS<\/h3>\n<p>RDS provides high availability using Multi-Availability Zone (Multi-AZ) deployments. This means RDS automatically provisions a\u00a0synchronous replica\u00a0of the database in a different availability zone. When the main database instance goes down, users are redirected transparently to the other availability zone.<\/p>\n<p>This provides two levels of redundancy:<\/p>\n<ul>\n<li><strong>In case the active database fails<\/strong>, there is a standby replica ready to receive requests.<\/li>\n<li><strong>In case of a disruption in the AZ<\/strong>, your main database instance runs in; there is a failover to another AZ.<\/li>\n<\/ul>\n<p>The following diagram illustrates the Multi-AZ database deployment.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-1129 size-full\" src=\"https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/High-Availability-cho-CSDL-SQL-tren-Amazon-RDS.png\" alt=\"High Availability cho CSDL SQL tr\u00ean Amazon RDS\" width=\"754\" height=\"537\" srcset=\"https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/High-Availability-cho-CSDL-SQL-tren-Amazon-RDS.png 754w, https:\/\/vticloud.io\/wp-content\/uploads\/2020\/12\/High-Availability-cho-CSDL-SQL-tren-Amazon-RDS-300x214.png 300w\" sizes=\"(max-width: 754px) 100vw, 754px\" \/><\/p>\n<p>Note that Multi-AZ deployment is not supported for read-only instances, and you should use read replicas to enable high availability for those instances.<\/p>\n<p>RDS provides the following capabilities per database type:<\/p>\n<ul>\n<li><strong>For Oracle, PostgreSQL, MySQL, and MariaDB<\/strong>\u2014high availability using Amazon Multi-AZ technology.<\/li>\n<li><strong>For SQL Server<\/strong>\u2014mirroring to another Availability Zone using Microsoft\u2019s SQL Server Database Mirroring technology.<\/li>\n<\/ul>\n<h2>AWS High Availability for Storage Services<\/h2>\n<p>Here is a summary of the high availability capabilities Amazon offers for other popular storage services:<\/p>\n<ul>\n<li><strong>Amazon S3:<\/strong><\/li>\n<\/ul>\n<p>S3 guarantees 99.999999999% (eleven 9\u2019s) durability by redundantly storing objects on multiple devices across a minimum of three AZs in an Amazon S3 Region.<\/p>\n<ul>\n<li><strong>Amazon EFS:<\/strong><\/li>\n<\/ul>\n<p>EFS guarantees up to 99.9% availability; otherwise, between 10-100% of the service fee is discounted. Every file system object is redundantly stored across multiple AZs.<\/p>\n<ul>\n<li><strong>Amazon EBS:<\/strong><\/li>\n<\/ul>\n<p>EBS volumes are created in a specific AZ. You can make a volume available in another AZ, and it can then be attached to other instances in that same Availability Zone. To make a volume available outside the AZ or create redundancy, you can create a snapshot and restore it in another AZ within the same region. You can also copy snapshots to other AWS regions to create redundancy across Amazon Web Services data centers.<\/p>\n<h2>Conclusion<\/h2>\n<p><span class=\"JLqJ4b ChMk0b\" data-language-for-alternatives=\"en\" data-language-to-translate-into=\"vi\" data-phrase-index=\"0\">High availability focuses on ensuring the system can operate with the best performance even when part of the system fails, providing enormous benefits to the system <\/span><span class=\"JLqJ4b ChMk0b\" data-language-for-alternatives=\"en\" data-language-to-translate-into=\"vi\" data-phrase-index=\"1\">that require high reliability.<\/span><\/p>\n<h2 data-renderer-start-pos=\"2970\"><strong data-renderer-mark=\"true\">About VTI Cloud<\/strong><\/h2>\n<p data-renderer-start-pos=\"6835\"><strong data-renderer-mark=\"true\">VTI Cloud<\/strong>\u00a0is an\u00a0<span style=\"color: #ff6600;\"><a class=\"sc-iELTvK jHUAie\" style=\"color: #ff6600;\" title=\"https:\/\/vticloud.io\/news_events\/vti-cloud-chinh-thuc-tro-thanh-advanced-consulting-partner-cua-aws\/\" href=\"https:\/\/vticloud.io\/news_events\/vti-cloud-chinh-thuc-tro-thanh-advanced-consulting-partner-cua-aws\/\" data-renderer-mark=\"true\">Advanced Consulting Partner<\/a>\u00a0<\/span>of AWS Vietnam with a team of over 50+ AWS certified solution engineers. With the desire to support customers in the journey of digital transformation and migration to the AWS cloud, VTI Cloud is proud to be a pioneer in consulting solutions, developing software, and deploying AWS infrastructure to customers<strong data-renderer-mark=\"true\">\u00a0in Vietnam<\/strong>\u00a0<strong data-renderer-mark=\"true\">and Japan.<\/strong><\/p>\n<p data-renderer-start-pos=\"7217\">Building safe, high-performance, flexible, and cost-effective architectures for customers is\u00a0<strong data-renderer-mark=\"true\">VTI Cloud\u2019s<\/strong>\u00a0leading mission in enterprise technology mission.<\/p>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>When deciding on system architecture for an enterprise, there are many factors to consider, such as performance, scalability, availability, reliability, cost, and operation. In particular, ensuring high availability for the system must always be focused on interruption or inactivity) to ensure business continuity. This is always shown with the businesses&#8217; architectures, as every minute lost [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":1118,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[13],"tags":[70,42,51,20],"_links":{"self":[{"href":"https:\/\/vticloud.io\/en\/wp-json\/wp\/v2\/posts\/1146"}],"collection":[{"href":"https:\/\/vticloud.io\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vticloud.io\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vticloud.io\/en\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/vticloud.io\/en\/wp-json\/wp\/v2\/comments?post=1146"}],"version-history":[{"count":1,"href":"https:\/\/vticloud.io\/en\/wp-json\/wp\/v2\/posts\/1146\/revisions"}],"predecessor-version":[{"id":3139,"href":"https:\/\/vticloud.io\/en\/wp-json\/wp\/v2\/posts\/1146\/revisions\/3139"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vticloud.io\/en\/wp-json\/wp\/v2\/media\/1118"}],"wp:attachment":[{"href":"https:\/\/vticloud.io\/en\/wp-json\/wp\/v2\/media?parent=1146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vticloud.io\/en\/wp-json\/wp\/v2\/categories?post=1146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vticloud.io\/en\/wp-json\/wp\/v2\/tags?post=1146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}